Announcement Announcement Module
Collapse
No announcement yet.
switching from load-time to compile-team weaving Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • switching from load-time to compile-team weaving

    Hi,

    I'm trying to change from load-time weaving to compile-time weaving. Currently I'm trying to get this working in Eclipse (I'll address the Ant build later). The steps I've taken so far are

    - Install the AspectJ plugin and convert the project to an AspectJ project
    - Add the output dir to both the inpath and the aspect path, because this location contains both the classes to be woven and the aspects themselves
    - Remove '-javaagent' argument from the JVM arguments
    - Remove <context:load-time-weaver...> from the Spring config

    However, when I run the unit tests I'm now getting the error appended to the end of this message.

    Thanks in advance for any suggestions,
    DM

    2008-06-03 13:06:24,637 ERROR [org.springframework.test.context.TestContextManage r] Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.Dependenc yInjectionTestExecutionListener@278e83] to prepare test instance [com.example.test.web.transactional.CalendarTest@fd 66a5]
    java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.TestContext.getAp plicationContext(TestContext.java:203)
    at org.springframework.test.context.support.Dependenc yInjectionTestExecutionListener.injectDependencies (DependencyInjectionTestExecutionListener.java:109 )
    at org.springframework.test.context.support.Dependenc yInjectionTestExecutionListener.prepareTestInstanc e(DependencyInjectionTestExecutionListener.java:75 )
    at org.springframework.test.context.TestContextManage r.prepareTestInstance(TestContextManager.java:255)
    at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.createTest(SpringJUnit4ClassRunner.j ava:93)
    at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.invokeTestMethod(SpringJUnit4ClassRu nner.java:130)
    at org.junit.internal.runners.JUnit4ClassRunner.runMe thods(JUnit4ClassRunner.java:51)
    at org.junit.internal.runners.JUnit4ClassRunner$1.run (JUnit4ClassRunner.java:44)
    at org.junit.internal.runners.ClassRoadie.runUnprotec ted(ClassRoadie.java:27)
    at org.junit.internal.runners.ClassRoadie.runProtecte d(ClassRoadie.java:37)
    at org.junit.internal.runners.JUnit4ClassRunner.run(J Unit4ClassRunner.java:42)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestR eference.run(JUnit4TestReference.java:38)
    at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'adminService': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'searchIndexWriter': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'searchService' defined in URL [file:WebRoot/WEB-INF/applicationContext-service.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateExcep tion; nested PropertyAccessExceptions (9) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationExceptio n: Property 'maxTerms' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 2: org.springframework.beans.MethodInvocationExceptio n: Property 'maxResult' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 3: org.springframework.beans.MethodInvocationExceptio n: Property 'maxSimilar' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 4: org.springframework.beans.MethodInvocationExceptio n: Property 'maxNumberOfWordPermutations' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 5: org.springframework.beans.MethodInvocationExceptio n: Property 'levenshteinThreshold' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 6: org.springframework.beans.MethodInvocationExceptio n: Property 'categorySearchBaseThreshold' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 7: org.springframework.beans.MethodInvocationExceptio n: Property 'advancedSearchBaseThreshold' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 8: org.springframework.beans.MethodInvocationExceptio n: Property 'keywordSearchBaseThreshold' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    PropertyAccessException 9: org.springframework.beans.MethodInvocationExceptio n: Property 'packageBaseThreshold' threw exception; nested exception is java.lang.ClassFormatError: Repetitive field name/signature in class file com/example/service/interceptor/ExceptionInterceptor
    at org.springframework.context.annotation.CommonAnnot ationBeanPostProcessor.postProcessAfterInstantiati on(CommonAnnotationBeanPostProcessor.java:293)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:957)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:470)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:220)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:729)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:381)
    at org.springframework.test.context.support.AbstractG enericContextLoader.loadContext(AbstractGenericCon textLoader.java:96)
    at org.springframework.test.context.support.AbstractG enericContextLoader.loadContext(AbstractGenericCon textLoader.java:44)
    at org.springframework.test.context.TestContext.loadA pplicationContext(TestContext.java:173)
    at org.springframework.test.context.TestContext.getAp plicationContext(TestContext.java:199)
    ... 16 more
Working...
X