[jboss-user] [JBoss Microcontainer Development] - Duplicate classloading with Javassist Reflect
Ales Justin
do-not-reply at jboss.com
Mon Apr 19 12:17:55 EDT 2010
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Duplicate classloading with Javassist Reflect"
To view the discussion, visit: http://community.jboss.org/message/538334#538334
--------------------------------------------------------------
I'm getting this unexpected behavior while testing my Scanning lib.
org.jboss.reflect.spi.CannotCompileException: javassist.CannotCompileException: by java.lang.LinkageError: loader (instance of org/jboss/classloader/spi/base/BaseClassLoader): attempted duplicate class definition for name: "org/jboss/test/scanning/annotations/support/FilteredAnnotationScanningPluginFactory"
at org.jboss.reflect.plugins.javassist.JavassistUtil.ctClassToClass(JavassistUtil.java:56)
at org.jboss.reflect.plugins.javassist.JavassistTypeInfo.getType(JavassistTypeInfo.java:195)
at org.jboss.metadata.spi.signature.Signature.convertParameterTypes(Signature.java:151)
at org.jboss.metadata.spi.signature.ConstructorSignature.<init>(ConstructorSignature.java:77)
at org.jboss.metadata.spi.signature.Signature.getSignature(Signature.java:121)
at org.jboss.scanning.plugins.visitor.ClassHierarchyResourceVisitor.handleAnnotations(ClassHierarchyResourceVisitor.java:200)
I think this should not happen, since there should be only one instance of matching TypeInfo/ClassInfo.
But it looks like we're missing a check if the CtClass is already loaded by the underlying classloader inside that TI/CI instance.
Or some other mechanism that would prevent it from getting this duplicate behavior.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538334#538334]
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/20100419/1b1c7581/attachment.html
More information about the jboss-user
mailing list