Back Forum Reply New

Strange behavior on AspectJ compiler with 1.1.1?

Is it me, am I crazy? ( The proper answer is yes, and yes).

I'm working on revamping some samples for Roo in Action where I'm testing some relationships using the DataOnDemand classes and the Integration Test framework.

Every so often, and stickily, I get stuck in a situation where neither maven nor STS can build my application to test it.  I've tried mvn test, mvn package (which calls test), etc., including a clean - mvn clean test, etc., to no avail.

I get Code:

[INFO] ------------------------------------------------------------------------
[INFO] Building coursemanagerch4
[INFO]    task-segment: [integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] [aspectj:compile {execution: default}]
[WARNING] advice defined in org..scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org..mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org..mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [aspectj:test-compile {execution: default}]
[ERROR] Missing code implementation in the compiler
[WARNING] advice defined in org..orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org..mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org..mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org..mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in org..scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Compiler errors :
error at (no source information available)
/Users/kenrimple/Documents/SpringRooInAction/Example-Code/chapter-04/coursemanagerch4/src/test/java/org/rooina/coursemanager/model/CourseIntegrationTest.java:1:0::0 Missing code implementation in the compiler
It's extremely frustrating to debug this.  STS doesn't complain, I've commented out any code that might be offensive, and the error gives me absolutely no clue as to why it is failing.

I can get unstuck with this situation if I do an eclipse clean (or something, not 100% sure as it's quite intermittent) and I get the exception below - it's trying to autowire the DoD.  I also get ClassNotFound errors on the test itself, etc...  Something bad is happening to my project.

I am about to re-create it from scratch and re-do my examples, just to see quot;is it me?quot;  But has anyone run into this, and is there any way to get the AspectJ compiler to be less stingy when it comes to what the errors are?

I'm on a Mac, my system JDK is 6.0.22, and I'm on Roo 1.1.1 with Maven 2.2.1.  STS 2.5.2.  I do have the new 6.0.23 Apple JDK loaded but it's not the default.  I cleaned and got a similar message to this stack trace... about missing code implementation in the compiler.Code:

2011-01-19 00:39:24,731 [main] ERROR org..test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org..test.context.s
upport.DependencyInjectionTestExecutionListener@1294aa42] to prepare test instance [org.rooina.coursemanager.model.CourseIntegrationTest@5e35dc95]
org..beans.factory.BeanCreationException: Error creating bean with name 'org.rooina.coursemanager.model.CourseIntegrationTest': Injection of autowired dependencies f
ailed; nested exception is org..beans.factory.BeanCreationException: Could not autowire field: private org.rooina.coursemanager.model.CourseDataOnDemand org.rooina.c
oursemanager.model.CourseIntegrationTest.dod; nested exception is org..beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.rooina.coursemanage
r.model.CourseDataOnDemand] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org..
beans.factory.annotation.Autowired(required=true)}
at org..beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285)
at org..beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at org..beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:374)
at org..test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:110)
at org..test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
at org..test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321)
at org..test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220)
at org..test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org..test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303)
at org..test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org..test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org..test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org..test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org..beans.factory.BeanCreationException: Could not autowire field: private org.rooina.coursemanager.model.CourseDataOnDemand org.rooina.coursemanager.mod
el.CourseIntegrationTest.dod; nested exception is org..beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.rooina.coursemanager.model.CourseDa
taOnDemand] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org..beans.factory.an
notation.Autowired(required=true)}
at org..beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:502)
at org..beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at org..beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:282)
... 26 more
Caused by: org..beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.rooina.coursemanager.model.CourseDataOnDemand] found for dependency: expec
ted at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org..beans.factory.annotation.Autowired(required=true)}
at org..beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:920)
at org..beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:789)
at org..beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
at org..beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:474)
... 28 moreA follow-up.  I manually re-created the project, re-ran the roo commands, and so far the tests are all running.  I'm thinking something corrupted my Roo project.  I can save it off and do some research later, but I'm really confused about what happened to it.
¥
Back Forum Reply New