Classloading issues with XFire and JCA --------------------------------------
Key: XFIRE-1082 URL: http://jira.codehaus.org/browse/XFIRE-1082 Project: XFire Issue Type: Bug Components: Aegis Module Affects Versions: 1.2.6 Environment: Windows, Java 1.5, JBoss 4.2.0 Reporter: Peter Liljenberg Assignee: Dan Diephouse Priority: Critical Java version: 1.5 JBoss version: JBoss 4.2.0GA XFire version: 1.2.6 I'm having trouble with JBoss and classloading (isolation?). I have an "architecture" like this: XFire Servlets for Webservices (packaged as WAR files, containing all JARs needed) JCA for integration with other systems (packaged as RAR files, containing all JARs needed) The WARs and RARs are then packaged in an EAR file which is deployed in JBoss (default). The Webservices use the JCA ConnectionFactory/Connection interfaces to access external systems. Here I encountered the first problem. The Webservices throws ClassCastException since the RAR file contains a JAR with the ConnectionFactory/Connection interfaces and the Webservice WAR contains the same. This seems to be a common problem with JCA(?) and the issue was resolved by removing the JAR from the WAR files, allowing JBoss to load it from the RAR file instead, which intuitively sounds like a bad design for Classloading? So now we have access to the JCA from the WAR files and it's seems just fine. Now we want integrate with an external system that is running Webservices, so we use XFire as a Client in a JCA connector. This results in a new ClassCastException when XFire tries to load its dependencies. XFire does Thread.currentThread().getContextClassLoader() to dynamically load classes, this returns the Webservice (our WAR) classloader, which is probably correct but all other classes in the context is loaded by the RAR classloader. java.lang.ClassCastException: org.codehaus.xfire.aegis.type.java5.DurationType at org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry.registerIfAvailable(DefaultTypeMappingRegistry.java:434) Is there a workaround for this? -- 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