[aspectwerkz-dev] [jira] Deleted: (AW-107) Problems with using cglib and online mode
"
[email protected] (JIRA)" <jira-yCVjj/
[email protected]>
Fri, 3 Aug 2007 07:06:50 +1000 (EST)
| Newsgroups |
gmane.comp.java.aspectwerkz.devel |
| Message-ID |
<[email protected]> |
[ http://jira.codehaus.org/browse/AW-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
[email protected] deleted AW-107:
---------------------------------
> Problems with using cglib and online mode
> -----------------------------------------
>
> Key: AW-107
> URL: http://jira.codehaus.org/browse/AW-107
> Project: AspectWerkz
> Issue Type: Bug
> Reporter: Chad Woolley
>
> Bug described in post on Nov 01 2003:
> http://lists.codehaus.org/pipermail/aspectwerkz-user/2003-November/000546.html
> -----------------
> Hi,
> I recently converted my unit tests to use a new patch for EasyMock, which
> utilizes cglib (http://cglib.sourceforge.net/) to intercept calls to classes.
> When I did this, my unit tests which use the online mode (nativehotswap and
> transparentbootclasspath) started getting errors.
> These errors do not occur when I use AspectJ, or when I use aspectwerkz offline
> mode. They are different errors in different cases, but most (not all) seem to
> relate to a NoClassDefFound exception on this line in the easymock patch:
> Class enhancedClass = Enhancer.enhanceClass(classToMock, null, null, null);
> I have tried explicitly excluding all cglib and easymock packages from weaving
> in aspectwerkz.xml, but this does not help.
> Any ideas?
> Thanks,
> Chad
> ------------------
> Chris Nokleberg wrote:
> > Chad Woolley wrote:
> >
> >>I have tried explicitly excluding all cglib and easymock packages from
> >>weaving in aspectwerkz.xml, but this does not help.
> >
> >
> > Have you also excluded the ASM classes? From your stacktrace it looks like
> > the problem is
> > at org.objectweb.asm.Type.getInternalName(Unknown Source)
> Excluding org.objectweb.asm.. did not help. Only excluding CGLIB makes
> a different - it gives this stacktrace instead of the original (which
> was without CGLIB excluded):
> AspectWerkz - WARN - Error pre-processing class null in Thread[main,5,main]
> java.lang.NullPointerException
> at
> org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor.filter(AspectWerkzPreProcessor.java:323)
> at
> org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor.preProcess(AspectWerkzPreProcessor.java:119)
> at
> org.codehaus.aspectwerkz.hook.impl.ClassPreProcessorHelper.defineClass0Pre(ClassPreProcessorHelper.java:89)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:379)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at net.sf.cglib.CodeGenerator.defineClass(CodeGenerator.java:205)
> at net.sf.cglib.CodeGenerator.define(CodeGenerator.java:175)
> at net.sf.cglib.KeyFactory.create(KeyFactory.java:114)
> at net.sf.cglib.Enhancer.<clinit>(Enhancer.java:99)
> at org.easymock.MockControl.setupMockForClass(MockControl.java:198)
> at org.easymock.MockControl.<init>(MockControl.java:173)
> at org.easymock.MockControl.<init>(MockControl.java:169)
> at org.easymock.MockControl$4.<init>(MockControl.java:43)
> at org.easymock.MockControl.createControl(MockControl.java:43)
> at
> test.EasyMockTestCase.___AW_original_method$setUp$1$test_EasyMockTestCase(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint.invokeOriginalMethod(MethodJoinPoint.java:354)
> at
> org.virtualmock.aspect.aspectwerkz.DynamicExcludeJoinPointController.proceed(Unknown
> Source)
> at
> org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint.proceed(MethodJoinPoint.java:321)
> at test.EasyMockTestCase.setUp(Unknown Source)
> at
> test.VerificationManagerTest.___AW_original_method$setUp$1$test_VerificationManagerTest(Unknown
> Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint.invokeOriginalMethod(MethodJoinPoint.java:354)
> at
> org.virtualmock.aspect.aspectwerkz.DynamicExcludeJoinPointController.proceed(Unknown
> Source)
> at
> org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint.proceed(MethodJoinPoint.java:321)
> at test.VerificationManagerTest.setUp(Unknown Source)
> at junit.framework.TestCase.runBare(TestCase.java:125)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at junit.textui.TestRunner.doRun(TestRunner.java:116)
> at junit.textui.TestRunner.doRun(TestRunner.java:109)
> at junit.textui.TestRunner.run(TestRunner.java:72)
> at test.AllTests.___AW_original_method$main$1(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint.invokeOriginalMethod(MethodJoinPoint.java:354)
> at
> org.virtualmock.aspect.aspectwerkz.DynamicExcludeJoinPointController.proceed(Unknown
> Source)
> at
> org.codehaus.aspectwerkz.joinpoint.MethodJoinPoint.proceed(MethodJoinPoint.java:321)
> at test.AllTests.main(Unknown Source)
> AspectWerkz - WARN - Error pre-processing class null in Thread[main,5,main]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email