0

I have a jax-ws service that is calling a JAX-RS service using Wink client. When I deployed the code to the server (WAS 7.0.0.29) and tested the service I got an exception that wasn't occurring in RAD (included below).

With more tracing all I could find was java.lang.reflect.UndeclaredThrowableException being thrown. The exception is coming out of the JsonProvider.writeTo when it attempts to get the callback parameter.

Unable to determine what was causing the exception I took the JsonProvider source and added an additional catch for Throwable and placed this class in the classpath before the class from the Wink distribution. This allowed my service to succeed (since we are not using a callback).

Now I know where the exception is from, but I am not able to determine what class it really is trying to indicate is missing. I need help figuring out what may be missing.

[7/24/15 6:41:55:984 PDT] 00000046 WebServiceExc E org.apache.axis2.jaxws.WebServiceExceptionLogger log A java.lang.NoClassDefFoundError throwable was caught.  The detail message is:  at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
    at com.sun.proxy.$Proxy60.getQueryParameters(Unknown Source)
    at org.apache.wink.providers.json.JsonProvider.writeTo(JsonProvider.java:96)
    at org.apache.wink.providers.json.JsonProvider.writeTo(JsonProvider.java:53)
    at org.apache.wink.client.internal.handlers.AbstractConnectionHandler.writeEntity(AbstractConnectionHandler.java:116)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.access$200(ApacheHttpClientConnectionHandler.java:72)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler$EntityWriter.writeTo(ApacheHttpClientConnectionHandler.java:405)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:98)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:122)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:271)
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.sendRequestEntity(ManagedClientConnectionImpl.java:197)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:257)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:713)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:518)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.processRequest(ApacheHttpClientConnectionHandler.java:113)
    at org.apache.wink.client.internal.handlers.httpclient.ApacheHttpClientConnectionHandler.handle(ApacheHttpClientConnectionHandler.java:87)
    at org.apache.wink.client.internal.handlers.HandlerContextImpl.doChain(HandlerContextImpl.java:52)
    at org.apache.wink.client.internal.handlers.AcceptHeaderHandler.handle(AcceptHeaderHandler.java:79)
    at org.apache.wink.client.internal.handlers.HandlerContextImpl.doChain(HandlerContextImpl.java:52)
    at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:228)
    at org.apache.wink.client.internal.ResourceImpl.invoke(ResourceImpl.java:189)
    at org.apache.wink.client.internal.ResourceImpl.post(ResourceImpl.java:315)
    at net.flowers.ecommerce.personalization.PersonalizationClient.createKey(Unknown Source)
    at com.bco.retail.externalservices.esb.personalization.servicefacade.PersonalizationService.createKey(Unknown Source)
    at com.bco.retail.externalservices.esb.personalization.servicefacade.PersonalizationServiceDelegate.createKey(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:600)
    at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:120)
    at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:117)
    at org.apache.axis2.jaxws.server.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:189)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1442)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
    at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:576)
    at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:250)
    at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:259)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:944)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:507)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3954)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:945)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)
    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:1656)

I also have the following from the Wink Trace logging that is logging out right after starting the call to getQueryParameters and continues to repeat (more times than shown below) and seems to end when the exception is thrown.

[7/24/15 16:46:01:840 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:840 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null
[7/24/15 16:46:01:840 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - Getting ContextResolver for interface javax.ws.rs.core.UriInfo which has @Produces compatible with */*
[7/24/15 16:46:01:841 PDT] 00000054 SystemOut     O TRACE  ProvidersRegistry - ContextResolvers MediaTypeMap was empty so returning null

I greatly appreciate any assistance in fixing this problem.

thank you

mmphantom
  • 21
  • 2

0 Answers0