Topic
  • No replies
SystemAdmin
SystemAdmin
2768 Posts

Pinned topic Issue with Websphere 6.1 and Struts2

‏2010-07-18T02:02:31Z |
Hi Everyone!!

I'm facing right now with a weird issue.

I'm making an application that consumes webservices with JAX-WS. My JDK is 1.5 and i'm using Websphere 6.1.

The first question that i have to you is. Is it completely necessary to install the WebServices Feature Pack for WebSphere 6.1 to use JAX-WS?? I have already installed but i have read that is not completely necessary.

I got this error on my SystemOut.log:


at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497) Caused by: java.lang.NoSuchMethodError: com/sun/xml/bind/api/JAXBRIContext.newInstance([Ljava/lang/Class;Ljava/util/Collection;Ljava/util/Map;Ljava/lang/String;ZLcom/sun/xml/bind/v2/model/annotation/RuntimeAnnotationReader;)Lcom/sun/xml/bind/api/JAXBRIContext; at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:73) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:159) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:152) at java.security.AccessController.doPrivileged(AccessController.java:242) at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:151) at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:94) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:256) at com.sun.xml.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:698) at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:686) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:341) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:324) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306) at javax.xml.ws.Service.getPort(Service.java:41) at com.bcp.utilitario.hbk.ws.mbcocl.beans.ConsultaClienteService.getConsultaClientePort(ConsultaClienteService.java:79) at com.bcp.utilitario.hbk.ws.callers.CallMBCOCLSrv.callMBCOCLByCIC(CallMBCOCLSrv.java:115) at com.bcp.utilitario.hbk.persistencia.FindCustomerInf.getCustInfoCons(FindCustomerInf.java:94) at com.bcp.utilitario.hbk.acciones.FindCustInfAct.getCustomerInfo(FindCustInfAct.java:112)


After looking the solution on the web, i found several websites that indicates that this problem can be resolved changing the ClassLoader Policies on the WAS Administrative Console, setting PARENT_LAST in the WAR and the EAR.

I did it, but then i got this error:


[17/07/10 19:46:06:429 COT] 00000019 WebApp        E   [Servlet Error]-[Filter [struts2]: not a filter 

class]: java.lang.ClassCastException: org.apache.struts2.dispatcher.FilterDispatcher incompatible with javax.servlet.Filter at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:428) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:386) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:245) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:303) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:797) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:747) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:700) at com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:115) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:849) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:785) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3507) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267) 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:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)


Honestly i'm couldn't find the solution to this problem and that's why i'm looking for your help. This is the third day trying to find out the problem but i don't get it :(

Any help would be very appreciated!!!

Thanks in advance !!

Andrey Bottoni