rest - error invoking RESTful webservice on WebSphere 8.5.5.2 server -
i have deployed restful application using apache wink packaged in ear on websphere 8.5.5.2 nd. when application starts gives me "initialization successful" message:
[5/14/15 15:56:03:588 cdt] 0000006d restservlet org.apache.wink.server.internal.servlet.restservlet getapplication system using my.domain.mobile.rest.restfulresourceloader jax-rs application class named in javax.ws.rs.application init-param initialization parameter. [5/14/15 15:56:03:605 cdt] 0000006d systemout o 15:56:03,605 info [user=] [restfulresourceloader] loading resource classes [5/14/15 15:56:03:684 cdt] 0000006d applicationpr org.apache.wink.server.internal.application.applicationprocessor process following jax-rs application has been processed: my.domain.mobile.rest.restfulresourceloader [5/14/15 15:56:03:688 cdt] 0000006d resources org.apache.wink.server.internal.log.resources logresourceinfo server has registered jax-rs resource class my.domain.mobile.resources.restfullogin @path(login). [5/14/15 15:56:03:690 cdt] 0000006d providers org.apache.wink.server.internal.log.providers log class my.domain.mobile.restexceptionhandler registered jax-rs exceptionmapper provider java.lang.exception java types. [5/14/15 15:56:03:974 cdt] 0000006d servletwrappe com.ibm.ws.webcontainer.servlet.servletwrapper init srve0242i: [myapplication] [/context_root] [jax-rs servlet]: initialization successful.
but hit url, server gives me below error:
[5/14/15 15:59:55:006 cdt] 000000b5 systemout o 15:59:55,006 info [user=] [requestinterceptor] initializing request hanlder [5/14/15 15:59:55:010 cdt] 000000b5 systemout o 15:59:55,010 info [user=] [responseinterceptor] initializing response interceptor [5/14/15 15:59:55:068 cdt] 000000b5 systemout o 15:59:55,068 info [user=] [requestinterceptor] uri path "/login" invoked on [my.domain.mobile.resources.restfullogin@978a19b] [5/14/15 15:59:55:070 cdt] 000000b5 requestproces org.apache.wink.server.internal.requestprocessor logexception following error occurred during invocation of handlers chain: noclassdeffounderror message org.apache.wink.server.internal.handlers.searchresult while processing post request sent http://my.domain.name:81/context_root/rest/login [5/14/15 15:59:55:071 cdt] 000000b5 requestproces e org.apache.wink.server.internal.requestprocessor handlerequest unhandled exception occurred propagated container. java.lang.noclassdeffounderror: org.apache.wink.server.internal.handlers.searchresult @ my.domain.mobile.handler.requestinterceptor.handlerequest(requestinterceptor.java:48) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.handlers.createinvocationparametershandler.handlerequest(createinvocationparametershandler.java:54) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.handlers.findresourcemethodhandler.handleresourcemethod(findresourcemethodhandler.java:151) @ org.apache.wink.server.internal.handlers.findresourcemethodhandler.handlerequest(findresourcemethodhandler.java:65) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.handlers.findrootresourcehandler.handlerequest(findrootresourcehandler.java:95) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.handlers.headmethodhandler.handlerequest(headmethodhandler.java:53) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.handlers.optionsmethodwadlhandler.handlerequest(optionsmethodwadlhandler.java:51) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.handlers.searchresulthandler.handlerequest(searchresulthandler.java:33) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.log.resourceinvocation.handlerequest(resourceinvocation.java:92) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.internal.log.requests.handlerequest(requests.java:76) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:26) @ org.apache.wink.server.handlers.requesthandlerschain.handle(requesthandlerschain.java:22) @ org.apache.wink.server.handlers.abstracthandlerschain.dochain(abstracthandlerschain.java:75) @ org.apache.wink.server.handlers.abstracthandlerschain.run(abstracthandlerschain.java:60) @ org.apache.wink.server.internal.requestprocessor.handlerequestwithoutfaultbarrier(requestprocessor.java:207) @ org.apache.wink.server.internal.requestprocessor.handlerequest(requestprocessor.java:154) @ org.apache.wink.server.internal.servlet.restservlet.service(restservlet.java:124) @ javax.servlet.http.httpservlet.service(httpservlet.java:668) @ com.ibm.ws.webcontainer.servlet.servletwrapper.service(servletwrapper.java:1230) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:779) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:478) @ com.ibm.ws.webcontainer.servlet.servletwrapperimpl.handlerequest(servletwrapperimpl.java:178) @ com.ibm.ws.webcontainer.filter.webappfilterchain.invoketarget(webappfilterchain.java:136) @ com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter(webappfilterchain.java:79) @ com.ibm.ws.webcontainer.filter.webappfiltermanager.dofilter(webappfiltermanager.java:960) @ com.ibm.ws.webcontainer.filter.webappfiltermanager.invokefilters(webappfiltermanager.java:1064) @ com.ibm.ws.webcontainer.webapp.webapp.handlerequest(webapp.java:3837) @ com.ibm.ws.webcontainer.webapp.webgroup.handlerequest(webgroup.java:304) @ com.ibm.ws.webcontainer.webcontainer.handlerequest(webcontainer.java:981) @ com.ibm.ws.webcontainer.wswebcontainer.handlerequest(wswebcontainer.java:1662) @ com.ibm.ws.webcontainer.channel.wcchannellink.ready(wcchannellink.java:200) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.handlediscrimination(httpinboundlink.java:459) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.handlenewrequest(httpinboundlink.java:526) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.processrequest(httpinboundlink.java:312) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.ready(httpinboundlink.java:283) @ com.ibm.ws.tcp.channel.impl.newconnectioninitialreadcallback.sendtodiscriminators(newconnectioninitialreadcallback.java:214) @ com.ibm.ws.tcp.channel.impl.newconnectioninitialreadcallback.complete(newconnectioninitialreadcallback.java:113) @ com.ibm.ws.tcp.channel.impl.aioreadcompletionlistener.futurecompleted(aioreadcompletionlistener.java:175) @ com.ibm.io.async.abstractasyncfuture.invokecallback(abstractasyncfuture.java:217) @ com.ibm.io.async.asyncchannelfuture.firecompletionactions(asyncchannelfuture.java:161) @ com.ibm.io.async.asyncfuture.completed(asyncfuture.java:138) @ com.ibm.io.async.resulthandler.complete(resulthandler.java:204) @ com.ibm.io.async.resulthandler.runeventprocessingloop(resulthandler.java:775) @ com.ibm.io.async.resulthandler$2.run(resulthandler.java:905) @ com.ibm.ws.util.threadpool$worker.run(threadpool.java:1864) caused by: java.lang.classnotfoundexception: org.apache.wink.server.internal.handlers.searchresult @ java.net.urlclassloader.findclass(urlclassloader.java:600) @ com.ibm.ws.bootstrap.extclassloader.findclass(extclassloader.java:214) @ java.lang.classloader.loadclasshelper(classloader.java:772) @ java.lang.classloader.loadclass(classloader.java:749) @ com.ibm.ws.bootstrap.extclassloader.loadclass(extclassloader.java:120) @ java.lang.classloader.loadclass(classloader.java:726) @ com.ibm.ws.classloader.protectionclassloader.loadclass(protectionclassloader.java:62) @ com.ibm.ws.classloader.protectionclassloader.loadclass(protectionclassloader.java:58) @ com.ibm.ws.classloader.compoundclassloader.loadclass(compoundclassloader.java:584) @ java.lang.classloader.loadclass(classloader.java:726) @ com.ibm.ws.classloader.compoundclassloader.loadclass(compoundclassloader.java:584) @ java.lang.classloader.loadclass(classloader.java:726) ... 69 more
earlier deploying same application on websphere 7 , working fine. know websphere 8.5 comes wink jars removed jars ear , deployed on server. also, enabled verbose class loading on server , found class loading when server starts. though, when checked in class loader viewer console couldn't found class. adding jars shared library did not work me. great if can point me right direction solve error.
edit
following statement giving error inside handler:
searchresult result = context.getattribute(org.apache.wink.server.internal.handlers.searchresult.class);
was 8.5 comes inbuilt apache wink 1.1. can follow these steps migrate application on 8.5:
1) remove apache wink jar application lib folder.
2) building application can use these 2 websphere jar, com.ibm.ws.prereq.jaxrs.jar , com.ibm.ws.prereq.jackson.jar. can find these jars in was_home/plugins folder.
3) build application these jars not package these jars application ear or war.
4) if application type ear make sure restful resources , class extends application class part of war.
5) redeploy application, should work fine now.
Comments
Post a Comment