Hi all, any taker on this issue? Thanks, Michele Michele Curioni Senior Software Engineer
direct +44 (0)1252 644 028 email [email protected]<mailto:[email protected]> [cid:signature390c.jpg] <http://www.the-logic-group.com/> The Logic Group Enterprises Limited, Logic House, Waterfront Business Park, Fleet Road, Fleet, Hampshire, GU51 3SB, United Kingdom. Registered in England. Registered No. 2609323 The information in this email and any attachments are confidential and may be legally privileged and protected by law. It is for the intended recipient only. If you are not the intended recipient you may not use, disclose, copy, distribute, print or rely on the content of this email or its attachments. If this email has been received by you in error please advise the sender and delete the email from your system. ________________________________ From: Michele Curioni Sent: 15 September 2009 09:44 To: '[email protected]' Subject: NoSuchMethodError: org.exolab.castor.xml.util.XMLFieldDescriptorImpl.setClassDescriptor(Lorg/exolab/castor/xml/XMLClassDescriptor;)V Hi there, I'm trying to upgrade from Castor 0.9 to 1.3, but it's proving very difficult. I removed castor.0.9...jar files from my system and replaced them with 1.3 jars; I generate classes from an xml schema ok, and I can compile the code; I'm using JBoss 4.3 to run my application. When I deploy the code (my app is an ear file and I package castor jars within the ear) I get a ClassNotFoundException XMLFieldDescriptorImpl when invoking unmarshaller.unmarshal. Strangely the same call works when invoked from within an MBean, but it fails when called from an EJB. I guess classloading issue in JBoss. I think the problem is that some class within Castor uses reflection to load XMLFieldDescriptorImpl by calling Class.load() instead of using Thread.currentThread().getContextClassLoader().loadClass(name); To overcome the problem I decided to deploy castor jars inside JBoss lib folder, instead of within the ear file. This solved the ClassNotFoundException, but now I get NoSuchMethodError: org.exolab.castor.xml.util.XMLFieldDescriptorImpl.setClassDescriptor(Lorg/exolab/castor/xml/XMLClassDescriptor;)V It seems to me that the ClassNotFoundException and the NoSuchMethodError are linked somehow, and from my experience this would be caused by an old version of castor being accessed at runtime, instead of the new version, but I cannot find it anywhere. Do you guys have any idea how to get to the bottom of this? Thanks, Michele Michele Curioni Senior Software Engineer direct +44 (0)1252 644 028 email [email protected]<mailto:[email protected]>
<<attachment: signature390c.jpg>>

