[aspectwerkz-dev] [jira] Deleted: (AW-235) typed annotation deserialization with WAR CL

"[email protected] (JIRA)" <jira-yCVjj/[email protected]> Fri, 3 Aug 2007 07:12:04 +1000 (EST)
Newsgroups gmane.comp.java.aspectwerkz.devel
Message-ID <[email protected]>
     [ http://jira.codehaus.org/browse/AW-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

[email protected] deleted AW-235:
---------------------------------


> typed annotation deserialization with WAR CL
> --------------------------------------------
>
>                 Key: AW-235
>                 URL: http://jira.codehaus.org/browse/AW-235
>             Project: AspectWerkz
>          Issue Type: Bug
>            Reporter: Jonas Boner
>
> Greetings.
> I've tried to use typed annotations in online mode and it works just fine in flat classloader environment. But when i've tried it under caucho resin i've got ClassNotFoundException ..
> I've lauched resin this aspectwerkz.bat script in bin...
> And got :
> java.lang.ClassNotFoundException: t.TypedAnnotationSample
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:219)
>         at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:558)
>         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
>         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
>         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
>         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
>         at org.codehaus.aspectwerkz.annotation.instrumentation.asm.AsmAttributeExtractor$2.visitMethod(AsmAttributeExtractor.java:125)
>         at org.objectweb.asm.ClassReader.accept(ClassReader.java:426)
>         at org.codehaus.aspectwerkz.annotation.instrumentation.asm.AsmAttributeExtractor.getMethodAttributes(AsmAttributeExtractor.java:110)
>         at org.codehaus.aspectwerkz.annotation.instrumentation.Attributes.searchForMethodAttributes(Attributes.java:178)
>         at org.codehaus.aspectwerkz.annotation.instrumentation.Attributes.getAttributes(Attributes.java:60)
>         at org.codehaus.aspectwerkz.annotation.Annotations.getAnnotationInfos(Annotations.java:204)
>         at org.codehaus.aspectwerkz.reflect.impl.java.JavaMethodInfo.getAnnotations(JavaMethodInfo.java:91)
>         at org.codehaus.aspectwerkz.expression.ExpressionVisitor.visitAttributes(ExpressionVisitor.java:501)
>         at org.codehaus.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:249)
>         at org.codehaus.aspectwerkz.expression.ast.ASTMethodPattern.jjtAccept(ASTMethodPattern.java:30)
>         at org.codehaus.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:150)
>         at org.codehaus.aspectwerkz.expression.ast.ASTExecution.jjtAccept(ASTExecution.java:17)
>         at org.codehaus.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:98)
>         at org.codehaus.aspectwerkz.expression.ast.ASTExpression.jjtAccept(ASTExpression.java:17)
>         at org.codehaus.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:94)
>         at org.codehaus.aspectwerkz.expression.ExpressionVisitor.match(ExpressionVisitor.java:85)
>         at org.codehaus.aspectwerkz.aspect.management.PointcutManager.getPointcuts(PointcutManager.java:230)
>         at org.codehaus.aspectwerkz.aspect.management.AspectRegistry.getPointcuts(AspectRegistry.java:442)
>         at org.codehaus.aspectwerkz.aspect.management.AspectManager.getPointcuts(AspectManager.java:313)
>         at org.codehaus.aspectwerkz.joinpoint.management.JoinPointRegistry.registerJoinPoint(JoinPointRegistry.java:265)
>         at org.codehaus.aspectwerkz.joinpoint.management.JoinPointRegistry.registerJoinPoint(JoinPointRegistry.java:101)
>         at org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.proceedWithExecutionJoinPoint(JoinPointManager.java:210)
>         at t.Worker.work(Worker.java)
>         at t.Main.main(Main.java:11)
>         at t.TestServlet.doGet(TestServlet.java:14)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
>         at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
>         at com.caucho.server.http.Invocation.service(Invocation.java:315)
>         at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
>         at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
>         at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
>         at java.lang.Thread.run(Thread.java:534)
> I think the trouble is that AsmAttributeExtractor tries deserialize AnnotationInfo instance which has reference to my typed annotation and cause AsmAttributeExtractor uses ObjectInputStream, which in turn uses first classloader available on invokation stack, ObjectInputStream tries to find type annotation proxy class on application classloader (but not in webapp classloader, where actually typed annotation proxy class is )
> I have following classloader hierarchy :
> ===================================
> class name : t.TypedAnnotationSample
> ClassLoader : com.caucho.java.CompilingClassLoader
> ClassLoader : com.caucho.util.DynamicClassLoader
> ClassLoader : com.caucho.util.DynamicClassLoader
> ClassLoader : sun.misc.Launcher$AppClassLoader ClassLoader : sun.misc.Launcher$ExtClassLoader ===================================
> class name : org.codehaus.aspectwerkz.annotation.instrumentation.asm.AsmAttributeExtractor
> ClassLoader : sun.misc.Launcher$AppClassLoader ClassLoader : sun.misc.Launcher$ExtClassLoader =====================================
> in attach where are srcs and annotated ) t.jar file ..
> Good luck in development ...
> --
> Best regards,
>  Dmitry                            mailto:pekar-2pEG9j94/T8C2s6I/[email protected]

-- 
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