Hi, I am Facing problem in my project with IBM Websphere Server.My Project is using XFire Webservices. We are trying to use one of the services which is created using Xfire. one of the services is working with tomcat and not with Websphere. The Logs reads like the below. ---------------------------------------------------------------------------- [04/06/08 11:28:31:974 BST] 00000030 SystemOut O 11:28:31,974 [WebContainer : 0] ERROR org.codehaus.xfire.handler.DefaultFaultHandler - Fault occurred!
It shows java.lang.NoSuchMethodError: org/apache/xerces/impl/dv/util/Base64.encode([B)[B
i understand that IBm Websphere has internally a Base64 class which has the encode method and the arguments are not in sync with what my application wants. But i have a XercesImpl.jar in my application which has the supported encode method. So, Why it is not taking it? Why it is Working with TOMCAT and not with IBMWebsphere.
From the exception message, you would see that the package of the faulty class is: org.apache.xerces.impl.dv.util
So, it is not a problem that websphere might have a Base64Encode class. It indeed is a xerces class that is incompatible with your code. It may be that websphere has a different version of this class ahead of your version in the classpath. So, instead of the version of the class you intend to load, a different version is loaded which apparently does not have the same method signature as your code is expecting. You would have to find out whether any other xerces.jar is present in the classpath. If yes, then either you have to remove that jar or change your method signature or make websphere load your jar first.
Hi Nitesh, Thankyou very Verymuch for your Reply. I have few doubts. We are using xercesImpl2.0.2 and IBM Websphere has xercesImpl2.8.2. so do you think it does not contain the supporting class? . Is there any need to change in the settings in IBMwebsphere if so could you please suggest me the changes what needs to be done. Thank you once again, Kishore.
kishorebabu: so do you think it does not contain the supporting class?
It does contain the class but from the exception it looks like the method signature is not the same as you expect.
kishorebabu: Is there any need to change in the settings in IBMwebsphere if so could you please suggest me the changes what needs to be done. Thank you once again, Kishore.
I have no idea about websphere. You would have to instruct Websphere to look for the class in your libraries first. Casual googling gave me this article, may be you would get some hints here. Look for parent first attribute for a classloader. If it does not help you, try asking the moderators, to move this to WebSphere forum. [ June 04, 2008: Message edited by: Nitesh Kant ]
Joined: Jun 04, 2008
Thank you once again Nitesh for your reply.
please anybody tell me if you know where exactly IBMWebsphere6.1 is loading org/apache/xerces/impl/dv/util/Base64 class from? If anybody from IBM websphere administration could help me . If any of your friends know please let me know.
Joined: Jun 04, 2008
Hi Again i got the solution for the problem. what i did is i removed Base64.class from the XML.jar from the path "java/jre/lib/xml.jar" which is loaded by the Websphere and now it is loading from my Application specific jar file.