SAP-archive / cloud-weatherapp

New sample application demonstrating the interplay of several HCP services to develop a full fledged application.
Apache License 2.0
17 stars 17 forks source link

Unable to run REST API in Insomania/Postman #5

Open prashanthonashetti opened 6 years ago

prashanthonashetti commented 6 years ago

Hi All,

I am new baby to this SOAP/REST API world, I followed the steps as per the document and at the end i can see the URL is working fine but when i am passing some inputs to the code i am getting below error.

Apache Tomcat/7.0.56 - Error report

HTTP Status 500 - org.apache.cxf.interceptor.Fault: org/apache/commons/lang3/StringEscapeUtils


type Exception report

message org.apache.cxf.interceptor.Fault: org/apache/commons/lang3/StringEscapeUtils

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: org/apache/commons/lang3/StringEscapeUtils
    org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:368)
    org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
    org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
    org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

org.apache.cxf.interceptor.Fault: org/apache/commons/lang3/StringEscapeUtils
    org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:163)
    org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:129)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:211)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
    org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
    org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
    org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
    org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
    org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringEscapeUtils
    com.ingrian.security.nae.NAESession.getSession(NAESession.java:180)
    com.safenet.token.TokenServiceImpl.a(Unknown Source)
    com.safenet.token.TokenServiceImpl.<init>(Unknown Source)
    com.safenet.token.TokenService.a(Unknown Source)
    com.safenet.token.TokenService.<init>(Unknown Source)
    com.safenet.token.TokenServiceRestAPI.getTokenService(TokenServiceRestAPI.java:225)
    com.safenet.token.TokenServiceRestAPI.insertToken(TokenServiceRestAPI.java:649)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:601)
    org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
    org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:211)
    org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
    org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
    org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
    org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
    org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)
    org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
    org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.56 logs.


Apache Tomcat/7.0.56

It would be great if someone help me on this.

Regards Prashant Honashetti