I have a test, UserServiceTest, that extends AbstractAspectjJpaTests -- it works perfectly.
Now I create a subclass of AbstractAspectjJpaTests:
This yields dozens of the following exceptions (note, the test still pass):Code:public abstract class IntegrationAspectjJpaTestCase extends AbstractAspectjJpaTests { @Override protected String[] getConfigLocations() { return new String[] { "META-INF/itest-server.ctx.xml" }; } } public class UserServiceTest extends IntegrationAspectjJpaTestCase { ... }
I can move the method getConfigLocations() from IntegrationAspectjJpaTestCase to UserServiceTest and get the same results. What is the magic that allows only the spring impl of AbstractJpaTests?Code:java.lang.NullPointerException at org.aspectj.weaver.bcel.BcelWeaver.weaveParentTypeMungers(BcelWeaver.java:1353) at org.aspectj.weaver.bcel.BcelWeaver.weaveParentsFor(BcelWeaver.java:1223) at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1058) at org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(WeavingAdaptor.java:279) at org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAdaptor.java:212) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:65) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:55) at org.springframework.instrument.classloading.ShadowingClassLoader.applyTransformers(ShadowingClassLoader.java:119) at org.springframework.instrument.classloading.ShadowingClassLoader.doLoadClass(ShadowingClassLoader.java:101) at org.springframework.instrument.classloading.ShadowingClassLoader.loadClass(ShadowingClassLoader.java:58) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.aspectj.weaver.loadtime.Options.parse(Options.java:66) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerOptions(ClassLoaderWeavingAdaptor.java:209) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions(ClassLoaderWeavingAdaptor.java:178) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:123) at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.initialize(Aj.java:130) at org.aspectj.weaver.loadtime.Aj$ExplicitlyInitializedClassLoaderWeavingAdaptor.getWeavingAdaptor(Aj.java:135) at org.aspectj.weaver.loadtime.Aj$WeaverContainer.getWeaver(Aj.java:101) at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:61) at org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:55) at org.springframework.instrument.classloading.ShadowingClassLoader.applyTransformers(ShadowingClassLoader.java:119) at org.springframework.instrument.classloading.ShadowingClassLoader.doLoadClass(ShadowingClassLoader.java:101) at org.springframework.instrument.classloading.ShadowingClassLoader.loadClass(ShadowingClassLoader.java:58) at org.apache.commons.logging.impl.LogFactoryImpl$1.run(LogFactoryImpl.java:441) at java.security.AccessController.doPrivileged(Native Method) at org.apache.commons.logging.impl.LogFactoryImpl.loadClass(LogFactoryImpl.java:435) at org.apache.commons.logging.impl.LogFactoryImpl.isLog4JAvailable(LogFactoryImpl.java:505) at org.apache.commons.logging.impl.LogFactoryImpl.getLogClassName(LogFactoryImpl.java:327) at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:368) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.springframework.util.FileCopyUtils.<clinit>(FileCopyUtils.java:49) at org.springframework.instrument.classloading.ShadowingClassLoader.doLoadClass(ShadowingClassLoader.java:100) at org.springframework.instrument.classloading.ShadowingClassLoader.loadClass(ShadowingClassLoader.java:58) at org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:175) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:228) at junit.framework.TestSuite.run(TestSuite.java:223) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


Reply With Quote