aspose file tools*
The moose likes Web Services and the fly likes Problem with Webservice in IBM WebSphere Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with Webservice in IBM WebSphere Server " Watch "Problem with Webservice in IBM WebSphere Server " New topic
Author

Problem with Webservice in IBM WebSphere Server

kishorebabu karnam
Greenhorn

Joined: Jun 04, 2008
Posts: 8
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!

org.codehaus.xfire.XFireRuntimeException: Error invoking 'dk.acure.meteor.server.AppIntegration.login(int, java.lang.String, java.lang.String)'. Nested exception is java.lang.reflect.InvocationTargetException: null

java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:615)

at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:59)

at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:320)

at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:86)

at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:134)

at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:109)

at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)

at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)

at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)

at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)

at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)

at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)

at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)

at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)

at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)

at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)

at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)

at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)

at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:96)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)

at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)

at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)

at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)

at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)

at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)

at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)

at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)

at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)

at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

Caused by:

java.lang.NoSuchMethodError: org/apache/xerces/impl/dv/util/Base64.encode([B)[B

at dk.acure.meteor.business.AbstractBusinessFacade.long2Id(AbstractBusinessFacade.java:1513)

at dk.acure.meteor.business.AbstractBusinessFacade.saveBinary(AbstractBusinessFacade.java:1550)

at dk.acure.meteor.business.AbstractBusinessFacade.saveSerializable(AbstractBusinessFacade.java:1614)

at dk.acure.meteor.business.AbstractBusinessFacade.saveLoginSessionImpl(AbstractBusinessFacade.java:1658)

at dk.acure.meteor.business.impl.pojo.PojoBusinessFacade.setSessionId(PojoBusinessFacade.java:1563)

at dk.acure.meteor.server.AppIntegrationImpl.login(AppIntegrationImpl.java:221)

... 42 more

[04/06/08 11:29:00:023 BST] 0000002e SystemOut O DBCP: maxActive:8 active:0 idle:1

[04/06/08 11:30:00:013 BST] 00000032 SystemOut O DBCP: maxActive:8 active:0 idle:1

--------------------------------------------------------------------------

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.


PLease HELP me out....!!!

Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

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.


apigee, a better way to API!
kishorebabu karnam
Greenhorn

Joined: Jun 04, 2008
Posts: 8
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.
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

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 ]
kishorebabu karnam
Greenhorn

Joined: Jun 04, 2008
Posts: 8
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.
kishorebabu karnam
Greenhorn

Joined: Jun 04, 2008
Posts: 8
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.

Thank YOU very much...!!!
 
Consider Paul's rocket mass heater.
 
subject: Problem with Webservice in IBM WebSphere Server