[jboss-user] [JBoss Microcontainer Development] - ClassPool bootstrap refactoring

Kabir Khan do-not-reply at jboss.com
Mon May 10 15:06:03 EDT 2010


Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] replied to the discussion

"ClassPool bootstrap refactoring"

To view the discussion, visit: http://community.jboss.org/message/542120#542120

--------------------------------------------------------------
I ran the tests. In AS 4 it is fine apart from


> 
> $more output/reports/TEST-org.jboss.test.aop.test.ScopedAttachUnitTestCase.txt 
> 
> Testsuite: org.jboss.test.aop.test.ScopedAttachUnitTestCase
> 
> Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 2.041 sec
> 
>  
> 
> Testcase: testPOJOAdvised1 took 0.276 sec
> 
> Testcase: testPOJOAdvised2 took 0.115 sec
> 
> Testcase: testExpectedValues1 took 0.088 sec
> 
> Testcase: testExpectedValues2 took 0.073 sec
> 
> Testcase: testScoped1 took 0.324 sec
> 
> Testcase: testScoped2 took 0.275 sec
> 
>         Caused an ERROR
> 
> null
> 
> javax.management.RuntimeMBeanException
> 
>         at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
> 
>         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
> 
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> 
>         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> 
>         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 
>         at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
> 
>         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> 
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 
>         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> 
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 
>         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> 
>         at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
> 
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 
>         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> 
>         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 
>         at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
> 
>         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> 
>         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 
>         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> 
>         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> 
>         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 
>         at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
> 
>         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
> 
>         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
> 
>         at sun.rmi.transport.Transport$1.run(Transport.java:159)
> 
>         at java.security.AccessController.doPrivileged(Native Method)
> 
>         at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> 
>         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> 
>         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
> 
>         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
> 
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 
>         at java.lang.Thread.run(Thread.java:637)
> 
> Caused by: java.lang.RuntimeException: Error generating joinpoint class for joinpoint Constructor[constructor=public org.jboss.test.aop.scopedattach.POJO()]
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:310)
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.access$300(JoinPointGenerator.java:77)
> 
>         at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1730)
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:250)
> 
>         at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1059)
> 
>         at org.jboss.test.aop.scopedattach.POJO$POJOAdvisor.POJOAdvisor_new_$aop(POJO$POJOAdvisor.java)
> 
>         at org.jboss.test.aop.scopedattach.POJO.POJO_new_$aop(POJO.java)
> 
>         at org.jboss.test.aop.scopedattach.ScopedTester.testScoped(ScopedTester.java:113)
> 
>         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> 
>         ... 44 more
> 
> Caused by: javassist.CannotCompileException: Error compiling. Code 
> 
> {super($);isForInstanceAdvisor=($1.getAdvisor() instanceof org.jboss.aop.InstanceAdvisor);around2 = getAround2();around3 = getAround3();around4 = getAround4();around5 = getAround5();around6 = getAround6();}
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.createPublicConstructor(JoinPointGenerator.java:1120)
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.createConstructors(JoinPointGenerator.java:1019)
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:370)
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:285)
> 
>         ... 56 more
> 
> Caused by: javassist.CannotCompileException: [source error] no such a constructor
> 
>         at javassist.CtBehavior.setBody(CtBehavior.java:409)
> 
>         at javassist.CtBehavior.setBody(CtBehavior.java:375)
> 
>         at javassist.CtConstructor.setBody(CtConstructor.java:216)
> 
>         at javassist.CtNewConstructor.make(CtNewConstructor.java:102)
> 
>         at org.jboss.aop.instrument.JoinPointGenerator.createPublicConstructor(JoinPointGenerator.java:1113)
> 
>         ... 59 more
> 
> Caused by: compile error: no such a constructor
> 
>         at javassist.compiler.MemberCodeGen.atMethodCallCore2(MemberCodeGen.java:593)
> 
>         at javassist.compiler.MemberCodeGen.atMethodCallCore(MemberCodeGen.java:575)
> 
>         at javassist.compiler.MemberCodeGen.atCallExpr(MemberCodeGen.java:523)
> 
>         at javassist.compiler.JvstCodeGen.atCallExpr(JvstCodeGen.java:243)
> 
>         at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
> 
>         at javassist.compiler.CodeGen.atStmnt(CodeGen.java:337)
> 
>         at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> 
>         at javassist.compiler.CodeGen.atStmnt(CodeGen.java:350)
> 
>         at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
> 
>         at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:291)
> 
>         at javassist.compiler.Javac.compileBody(Javac.java:222)
> 
>         at javassist.CtBehavior.setBody(CtBehavior.java:401)
> 
>         ... 63 more
> 
>  
> 
> 

In AS 5 all tests are fine apart from


> $more output/reports/TEST-org.jboss.test.aop.test.RemotingUnitTestCase.txt 
> Testsuite: org.jboss.test.aop.test.RemotingUnitTestCase
> Tests run: 4, Failures: 0, Errors: 4, Time elapsed: 6.848 sec
> 
> Testcase: testRemoting took 0.227 sec
>         Caused an ERROR
> org/jboss/classpool/spi/ClassPoolRepositoryCallback
> java.lang.NoClassDefFoundError: org/jboss/classpool/spi/ClassPoolRepositoryCallback
>         at org.jboss.aop.AspectManager.initManager(AspectManager.java:267)
>         at org.jboss.aop.AspectManager.instance(AspectManager.java:246)
>         at org.jboss.aop.AspectManager.instance(AspectManager.java:235)
>         at org.jboss.aop.proxy.ClassProxyFactory.getProxyClass(ClassProxyFactory.java:111)
>         at org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:152)
>         at org.jboss.aop.proxy.ClassProxyFactory.newInstance(ClassProxyFactory.java:146)
>         at org.jboss.aop.proxy.MarshalledClassProxy.readResolve(MarshalledClassProxy.java:58)
>         at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>         at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
>         at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:134)
>         at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
>         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
>         at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
>         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
>         at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
>         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
>         at $Proxy0.invoke(Unknown Source)
>         at org.jboss.test.aop.test.RemotingUnitTestCase.testRemoting(RemotingUnitTestCase.java:62)
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>         at junit.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: java.lang.ClassNotFoundException: org.jboss.classpool.spi.ClassPoolRepositoryCallback
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
> 
The same error occurs for the other tests in RemotingUnitTestCase as well. ClassPoolRegistryCallback has been there since Alpha1, so I guess it is a classloader issue. I think remember Flavia mentioning something once, but not exactly what?

I'll try to dig in to the errors tomorrow, although I am not sure how much time I will spend on this since we are only really targeting AS 6 with the current AOP releases, supporting previous AS versions is just us "being nice".

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/542120#542120]

Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2115]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100510/ac3147d8/attachment-0001.html 


More information about the jboss-user mailing list