I have JAX-RS JSON channel:
#Path("/data")
public class DataChannel {
#GET
#Produces(MediaType.APPLICATION_JSON)
public Response getGridData(#HeaderParam("Range") String rangeHeader) {
The problem is that (usually) on first call I got the exception from Wink's HtmlProvider, while the subsequent calls are processed correclty and the JSON is returned:
0000006f servlet E
com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: An
exception was thrown by one of the service methods of the servlet
[de.datev.qmrzsv.rest.ApplicationConfig] in application [qmslmsv_ear].
Exception created : [javax.ws.rs.WebApplicationException:
com.ibm.ws.jsp.webcontainerext.JSPErrorReport: JSPG0036E: Failed to
find resource /HtmlDefaultRepresentation/defaultHtmlEntry.jsp at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.include(HtmlProvider.java:78)
at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.writeTo(HtmlProvider.java:112)
at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.writeTo(HtmlProvider.java:46)
at
org.apache.wink.server.internal.providers.entity.html.HtmlSyndEntryProvider.writeTo(HtmlSyndEntryProvider.java:81)
at
org.apache.wink.server.internal.providers.entity.html.HtmlSyndEntryProvider.writeTo(HtmlSyndEntryProvider.java:38)
at
org.apache.wink.common.internal.providers.entity.FormatedExceptionProvider.writeTo(FormatedExceptionProvider.java:108)
at
org.apache.wink.common.internal.providers.entity.FormatedExceptionProvider.writeTo(FormatedExceptionProvider.java:48)
at
org.apache.wink.server.internal.handlers.FlushResultHandler.handleResponse(FlushResultHandler.java:199)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:38)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.internal.log.Responses.handleResponse(Responses.java:90)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
at
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
at
org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:60)
at
org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:232)
at
org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
at
org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1225)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:775)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:457)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1032)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:975)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:87)
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:138) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1815) Caused by:
com.ibm.ws.jsp.webcontainerext.JSPErrorReport: JSPG0036E: Failed to
find resource /HtmlDefaultRepresentation/defaultHtmlEntry.jsp at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:447)
at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.getServletWrapper(AbstractJSPExtensionProcessor.java:338)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:965)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:548)
at
org.apache.wink.server.internal.providers.entity.html.HtmlProvider.include(HtmlProvider.java:75)
... 58 more Caused by: java.io.FileNotFoundException: JSPG0036E:
Failed to find resource
/HtmlDefaultRepresentation/defaultHtmlEntry.jsp ... 64 more
The runtime environment is WebSphere server 8.5.
It looks as on the first time the wrong provider is chosen, the header explicitely states that JSON should be used as response. The HTTP headers sent from client side also implicite state that JSON is expected:
Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Encoding gzip, deflate Accept-Language en,de;q=0.5
Content-Type application/json
What is causing that problem and how to avoid it?
Check the log for previous errors.
When the exception is thrown while generating response, the alternative provider (in that case - HtmlProvider) is used.
Exception can be caused by configuration problem or missing dependency.
Related
WebServiceContext object is null when Soap Services are deployed on WebSphere V9.0.5.10 .
I am trying to migrate the SOAP Web Services from WebSphere V8.5.5.20 to V9.0.5.10 and
one of Web service is using WebServiceContext object to get the message context.
The WebServiceContext and MessageContext objects are created as follows -
#Resource
WebServiceContext ctx;
public void getHeaderData(){
MessageContext msgctx = ctx.getMessageContext(); /// ctx is NULL
}
However, this code works on WebSphere V8.5.5.20 but throws NULLPointerException on V9.0.5.10 as WebServiceContext object is null.
I tried to inject the WebService Context as -
WebServiceContext ctx;
#Resource
public WebServiceContext setContext(WebServiceContext ctx){
this.ctx = ctx;
}
but this code did not work.
The Exception Stack trace is -
java.lang.NullPointerException : null
at com.app.soap.service.AppSoapWebService.getHeaderData(AppSoapWebService.java:1530)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) ~[?:1.8.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0]
at java.lang.reflect.Method.invoke(Method.java:508) ~[?:1.8.0]
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:120) [org.apache.axis2.jar:?]
at org.apache.axis2.jaxws.server.dispatcher.JabaBeanDispatcher.invoke(JabaBeanDispatcher.java:118)
at org.apache.axis2.jaxws.server.dispatcher.EndpointController.invoke(EndpointController.java:111)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:212)
at org.apache.axis2.transport.http.HttpTransportUtil.processHTTPPostRequest(HttpTransportUtil.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1633)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilter(WebAppFilterManager.java:1134)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:966)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1187)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:694)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompltedCallback.complete(SSLReadServiceContext.java:1833)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
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:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
Is there any fix available for this error ?
Thank you in advance.
You can open this link https://github.com/quarkiverse/quarkus-cxf/issues/92 in the answer section of neXus1987 (commented on Jan 11, 2021). Hope it can help your problem
We have an application to consume webservice over SSL.
We have created stub using AXIS2 1.6.2 and application is deployed in websphere 8.5.5.4.
Below error is thrown when it initiates the request over SSL.
Please advise whether any extra settings required on the Websphere side.
´9/23/15 0:50:17:219 SGT] 000001f1 HttpMethodDir I org.apache.commons.httpclient.HttpMethodDirector executeWithRetry I/O exception (javax.net.ssl.SSLException) caught when processing request: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.
[9/23/15 0:50:17:219 SGT] 000001f1 HttpMethodDir I org.apache.commons.httpclient.HttpMethodDirector executeWithRetry Retrying request
[9/23/15 0:50:17:219 SGT] 000001f1 HttpMethodDir I org.apache.commons.httpclient.HttpMethodDirector executeWithRetry I/O exception (javax.net.ssl.SSLException) caught when processing request: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.
[9/23/15 0:50:17:219 SGT] 000001f1 HttpMethodDir I org.apache.commons.httpclient.HttpMethodDirector executeWithRetry Retrying request
[9/23/15 0:50:17:219 SGT] 000001f1 HttpMethodDir I org.apache.commons.httpclient.HttpMethodDirector executeWithRetry I/O exception (javax.net.ssl.SSLException) caught when processing request: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.
[9/23/15 0:50:17:219 SGT] 000001f1 HttpMethodDir I org.apache.commons.httpclient.HttpMethodDirector executeWithRetry Retrying request
[9/23/15 0:50:17:219 SGT] 000001f1 HTTPSender I org.apache.axis2.transport.http.HTTPSender sendViaPost Unable to sendViaPost to url[https://10.91.35.41:37157/Services/EventInq]
javax.net.ssl.SSLException: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.
at com.ibm.websphere.ssl.protocol.SSLSocketFactory.createSocket(SSLSocketFactory.java:334)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:116)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.avaya.aps.cep.stub.EventInqStub.eventInq(EventInqStub.java:220)
at com.avaya.aps.selfservice.host.services.impl.CEPServiceImpl.getCEPEventDetails(CEPServiceImpl.java:138)
at flow.CEPLookup.servletImplementation(CEPLookup.java:65)
at com.avaya.sce.runtime.BasicServlet.handleRequest(BasicServlet.java:99)
at com.avaya.sce.runtime.AppServlet.processRequest(AppServlet.java:96)
at com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:285)
at com.avaya.sce.runtime.SCEServlet.doPost(SCEServlet.java:190)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1111)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3901)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
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:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1865)
[9/23/15 0:50:17:219 SGT] 000001f1 SystemOut O - [12423435435353]AxisFault while connecting to CEPSSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.
´
I had this problem as well in my case I had to change the JREs <JRE_HOME>\lib\security\java.security file.
See javax.net.ssl.SSLException: SSLSocketFactory is null
I am currently migrating a webservice from Websphere 7 to Websphere 8.5.5.2
The application worked in version 7, but not completely in 8.5
It works in the happy path, but generates a IllegalStateException when I want to throw a SOAPFault.
I am happy to provide more information, but I am not sure what is relevant.
The web.xml version was 2.5, but I also tried version 3.0
<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
The webservice is annotated using #javax.jws.WebService and uses a local ejb injection
#javax.ejb.Stateless
#javax.jws.WebService(endpointInterface = "com.example.DialogService", targetNamespace = "http://services.example.com/DialogService", serviceName = "DialogService", portName = "DialogService")
public class DialogServiceImpl {
#EJB
Service service;
public DialogResponseType get(DialogRequestType dialogMessage) throws DialogMessageFault {
try {
DialogMsg response = service.process(dialogMessage);
return response.respond();
} catch (Exception e) {
DialogMessageFault dialogMessageFault = new DialogMessageFault(SERVICE_ERROR, e);
throw dialogMessageFault;
}
}
}
The exception:
#javax.xml.ws.WebFault(name = "messageFault", targetNamespace = "http://services.example.com/DialogService")
public class DialogMessageFault extends Exception
Stacktrace:
AxisEngine E
org.apache.axis2.engine.AxisEngine receive java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
org.apache.axis2.AxisFault: java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:242)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:212)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1583)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1071)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
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:175)
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:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
Caused by: javax.xml.ws.WebServiceException: java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
at org.apache.axis2.jaxws.server.EndpointController.responseReady(EndpointController.java:710)
at org.apache.axis2.jaxws.server.EndpointController.handleResponse(EndpointController.java:439)
at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:130)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
... 29 more
Caused by: java.lang.IllegalStateException: WSEJBEndpointManager.ejbPostInvoke already called.
at com.ibm.ejs.container.WSEJBWrapper.ejbPostInvoke(WSEJBWrapper.java:246)
at com.ibm.ws.websvcs.server.WSEJBInvocationListener.responseReady(WSEJBInvocationListener.java:416)
at com.ibm.ws.websvcs.server.WSEJBInvocationListener.notify(WSEJBInvocationListener.java:102)
at org.apache.axis2.jaxws.server.EndpointController.responseReady(EndpointController.java:707)
... 32 more
Apparently the application used an extra setting to prevent this exact exception in an earlier version of Websphere. Removal of this setting fixed the problem:
com.ibm.websphere.websvcs.EJBPostInvokeCallOnException
See: IBM PM59231
We have an java web application and we need to access a web service which is a https web service. So i add the ssl certificate to Websphere;
SSL certificate and key management > Key stores and certificates > NodeDefaultKeyStore > Signer Certificates
SSL certificate and key management > Key stores and certificates > NodeDefaultTrustStore > Signer Certificates
When application trying to access the web service an exception was thrown like this:
tr.biznet.msign.service.signature.SignatureException: Mobil signature certificate query is failed. Unknown error.
at tr.biznet.msign.service.signature.SignatureService.queryMobileSignCertificateRef(SignatureService.java:440)
at tr.biznet.msign.controller.signature.BsspController.queryMobileSignCertificateRef(BsspController.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:434)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:372)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
at tr.biznet.msign.controller.NoCacheFilter.doFilter(NoCacheFilter.java:68)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
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:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)
Caused by: javax.xml.ws.WebServiceException: The following WSDL exception occurred: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1202)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.(ServiceDescriptionImpl.java:249)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.(ServiceDescriptionImpl.java:172)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:143)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:79)
at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:78)
at org.apache.axis2.jaxws.spi.ServiceDelegate.(ServiceDelegate.java:218)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:83)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:79)
at javax.xml.ws.Service.(Service.java:57)
at com.turkcelltech.mobilesignature.validation.soap.MSSProfileQueryService.(MSSProfileQueryService.java:50)
at tr.biznet.msign.service.signature.SignatureService.queryMobileSignCertificateRef(SignatureService.java:411)
... 50 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:234)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.(WSDL4JWrapper.java:156)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1182)
... 61 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:203)
... 63 more
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: WEBSERVICELINK
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1479)
at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:63)
at org.apache.axis2.jaxws.util.WSDL4JWrapper$14.run(WSDL4JWrapper.java:974)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.getInputStream(WSDL4JWrapper.java:971)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:189)
... 63 more
I masked the private web service address (WEBSERVICELINK)
On the other hand I tested the application with weblogic and tomcat. I can access the secure web service.
So i need some help about the websphere. Is there any configuration for this?
Problem
IBM Was use own axis framework for web service client. Problem is when you use third part library for web service client, (axis2, jax-ws) client code is generated by third part library. There can be a discrepancy between generated code and was ws library.
Solution
Use local classloader first for your application. (WAS administration console)
Enterprise Applications > "your_app" > Manage Modules > "module_name" > Custom properties
add: com.ibm.websphere.webservices.DisableIBMJAXWSEngine = true
Enterprise Applications > "your_app" > Manage Modules > "module_name"
select: "local classloader first (parent last)"
Enterprise Applications > "your_app" > Class loader
tick: Override class reloading settings for Web and EJB modules
tick: Classes loaded with local class loader first (parent last)
tick: Class loader for each WAR file in application
I got a servlet running in websphere. I am on the client's end.. I got to call a Apache CXF web service which expects a encrypted user id and password in soap header...it requires usage of WSSE Security Header..Now this request is working when fired in SOAP UI. But throwing security exception in Java.. I am putting in the SOAP Request and Exception here.. What am I missing? I googled and found little help
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="0">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="EXTSYSTEMSADMIN">
<wsse:Username>lZvdO0sQNLqlxfDe4jUzgg==</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">za/jVwHhQROvEnGvXQHsOIbUiSdP3ZBrJXio6gQqMeU=</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
.......
</soapenv:Body>
</soapenv:Envelope>
This is the stack trace...
servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet xxxx in application XXX. Exception created : javax.xml.ws.soap.SOAPFaultException: An error was discovered processing the <wsse:Security> header
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.createSystemException(MethodMarshallerUtils.java:1310)
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.demarshalFaultResponse(MethodMarshallerUtils.java:1036)
at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedMethodMarshaller.demarshalFaultResponse(DocLitWrappedMethodMarshaller.java:558)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.getFaultResponse(JAXWSProxyHandler.java:473)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createResponse(JAXWSProxyHandler.java:436)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:351)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:159)
at $Proxy45.getDataFromClarity(Unknown Source)
at legal.vzwcorp.com.TestWS.doGet(TestWS.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
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:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)