Thursday, 15 July 2010

java - Jersey throws mapMappableContainerException,when i deployed on server ,it's working fine with local machine -



java - Jersey throws mapMappableContainerException,when i deployed on server ,it's working fine with local machine -

i have written rest web services using bailiwick of jersey 1.9.1 , works local machine when deployed on server gives me below error

nov 06, 2014 9:34:49 com.sun.jersey.spi.container.containerresponse mapmappab lecontainerexception severe: runtimeexception not mapped response, re-throwing t http container java.lang.nullpointerexception @ com.xxx.webservices.checkpassword.getcheckpassword(checkpassword.java :58) @ com.xxx.wsresource.mobresource.checkpassword(apwmobresource.java:4 0) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl. java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodacces sorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606)

my java file

checkpassword checkpassword=new checkpassword(); javatojason javatojason=new javatojason(); @get @produces(mediatype.application_json) public jsonobject checkpassword(@queryparam("username") string username, @queryparam("userpassword") string userpassword) throws jsonexception { response rb = null; jsonobject json = new jsonobject(); system.out.println("here in check password1111 username=>"+username+" userpassword==>"+userpassword); string result=checkpassword.getcheckpassword(username, userpassword); jsonobject jresult = javatojason.convertstring(result); homecoming jresult;

}

i getting error @

string result=checkpassword.getcheckpassword(username, userpassword);

value of username , password coming fine have tested sop

my web.xml

<?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <display-name>mobapplication</display-name> <servlet> <servlet-name>jersey</servlet-name> <servlet-class>com.sun.jersey.spi.container.servlet.servletcontainer</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>com.wns;com.wns.jackson.jaxrs</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>jersey</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app>

i using tomcat both @ local server. appreciate if can help me solve problem. in advance

java web-services rest java-ee jersey

No comments:

Post a Comment