I am new to OpenAM and trying to learn by setting up an authentication solution involving a SAML2 service provider, SAML2 IdP Server, SAML2 IdP proxy.
I am able to set up a service provider, an identity provider and currently at the stage of setting up the IdP proxy "Step3: Configuring the Identity Provider Proxy (machineb)" in the guide SAMLv2 IDP Proxy Part 1. Setting up a simple Proxy scenario.
I am able to complete till "Step 3: b" and when I try "Step 3: c", I am getting the Null Pointer Exception.
My set-up is slightly different and I can map it like this:
machinea.sp.com is http://sp1.sp.com:8080 : The machine that will function as a SAML2 Service Provider (SP)
machineb.idpproxy.com is http://openam.idam.com:8080/OpenAM-11.0.0 : The machine that will work as the SAML2 IdP Proxy
machinec.idp.com is http://idp1.idp.com:8080/OpenAM-11.0.0: The machine that will assume the role of a SAML2 IdP.
Each of these are set up as a Virtual box VMs on my Mac OS X.
My circle of trust is spcot instead of cot and realm is /sprealm.
The stack trace I get on the web page after submitting the changes is:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: AMSetupFilter.doFilter
com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:134)
root cause
org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:98)
root cause
java.lang.NullPointerException
com.sun.identity.federation.cli.CreateMetaDataTemplate.buildConfigTemplate(CreateMetaDataTemplate.java:573)
com.sun.identity.federation.cli.CreateMetaDataTemplate.handleSAML2Request(CreateMetaDataTemplate.java:154)
com.sun.identity.federation.cli.CreateMetaDataTemplate.handleRequest(CreateMetaDataTemplate.java:127)
com.sun.identity.cli.SubCommand.execute(SubCommand.java:291)
com.sun.identity.cli.CLIRequest.process(CLIRequest.java:212)
com.sun.identity.cli.CLIRequest.process(CLIRequest.java:134)
com.sun.identity.cli.CommandManager.serviceRequestQueue(CommandManager.java:573)
com.sun.identity.cli.WebCLIHelper.processRequest(WebCLIHelper.java:151)
com.sun.identity.cli.WebCLIHelper.getHTML(WebCLIHelper.java:92)
org.apache.jsp.ssoadm_jsp._jspService(ssoadm_jsp.java:148)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:98)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.26 logs.
Apache Tomcat/7.0.26
The stack-trace in catalina.out is:
org.apache.jasper.JasperException: java.lang.NullPointerException
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.sun.identity.federation.cli.CreateMetaDataTemplate.buildConfigTemplate(CreateMetaDataTemplate.java:573)
at com.sun.identity.federation.cli.CreateMetaDataTemplate.handleSAML2Request(CreateMetaDataTemplate.java:154)
at com.sun.identity.federation.cli.CreateMetaDataTemplate.handleRequest(CreateMetaDataTemplate.java:127)
at com.sun.identity.cli.SubCommand.execute(SubCommand.java:291)
at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:212)
at com.sun.identity.cli.CLIRequest.process(CLIRequest.java:134)
at com.sun.identity.cli.CommandManager.serviceRequestQueue(CommandManager.java:573)
at com.sun.identity.cli.WebCLIHelper.processRequest(WebCLIHelper.java:151)
at com.sun.identity.cli.WebCLIHelper.getHTML(WebCLIHelper.java:92)
at org.apache.jsp.ssoadm_jsp._jspService(ssoadm_jsp.java:148)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
... 25 more
Please help me with this problem. Thank you.
This is due to a bug in OpenAM 11.0.0.
Upgraded to 11.0.2 and it is working fine now.
Related
I created a MobileFirst Adapter with security enabled. I generated token and when I try to call the API, I get 403 Forbidden error. The same works well when on localhost but gives this error when deployed on Server. I have attached the screenshot from REST Client below.
I'm using MFP 7.0.0 version
403 Error from REST Client
Log file:
[11/2/15 5:24:57:786 CST] 000049b7 com.ibm.ws.webcontainer.util.ApplicationErrorUtils E SRVE0777E: Exception thrown by application class 'org.apache.wink.server.internal.RequestProcessor.handleRequest:195'
javax.servlet.ServletException: java.lang.NoClassDefFoundError: com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException
at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:195)
at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.worklight.adapters.rest.JAXRSSandbox$2.doFilter(JAXRSSandbox.java:377)
at com.worklight.adapters.rest.FilterChainImpl.doFilter(FilterChainImpl.java:84)
at com.worklight.adapters.rest.JAXRSSandbox.handleRequest(JAXRSSandbox.java:382)
at com.worklight.adapters.rest.RESTAdaptersServiceServlet.doService(RESTAdaptersServiceServlet.java:69)
at com.worklight.adapters.rest.RESTAdaptersServlet.service(RESTAdaptersServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1285)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:776)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:473)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:135)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:74)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:978)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1100)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:912)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:863)
Caused by: java.lang.NoClassDefFoundError: com.sun.org.apache.xerces.internal.impl.xpath.regex.ParseException
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:253)
I have investigated this issue intensively , as our needs was to call new java adapter (JAX-RS implementation ) that is protected with #OuathSecurity via REST Clients.
But i will need to ask you few questions to give you better answer:
Is this the scenario you need ?
Did you generate token using this documentation
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/dev/c_non_mobile_to_mobile_services.html?lang=en
Or you are using the test token end point ?
Hi am working with WSO2 ESB 4.7.0
I am facing an error while accessing the wso2 esb management console as shown below.
Error says that one of my service is unable retrieve security scenario for service.
The following error details are available. Please refer logs for more details.
org.apache.axis2.AxisFault: Cannot get all services. Backend service may be unavailable
at org.wso2.carbon.service.mgt.ui.ServiceAdminClient.handleException(ServiceAdminClient.java:428)
at org.wso2.carbon.service.mgt.ui.ServiceAdminClient.getAllServices(ServiceAdminClient.java:89)
at org.apache.jsp.service_002dmgt.index_jsp._jspService(org.apache.jsp.service_002dmgt.index_jsp:167)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:177)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:161)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.axis2.AxisFault: Cannot retrieve security scenario for service GeoLocationInsertion2.0
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:367)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:413)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.wso2.carbon.service.mgt.stub.ServiceAdminStub.listServices(ServiceAdminStub.java:8211)
at org.wso2.carbon.service.mgt.ui.ServiceAdminClient.getAllServices(ServiceAdminClient.java:87)
Any Suggestions....
Thanks...!
Stop the server. Try to remove the folder content in [WSO2_HOME]\repository\deployment\server\servicemetafiles\ and start the server. Make a copy of this file in another location before that
we are using a custom login and custom security realm for authentication. It all works fine. But every time when we launch the app, and we logout, we could see the below exception in logs.
Kindly advice on how this can be avoided.
00001336 com.ibm.ws.webcontainer.util.ApplicationErrorUtils E SRVE0777E: Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationContext.checkAuthentication:570'
com.worklight.server.auth.api.WorkLightAuthenticationException
at com.worklight.core.auth.impl.AuthenticationContext.checkAuthentication(AuthenticationContext.java:570)
at com.worklight.core.auth.impl.AuthenticationContext.processRealms(AuthenticationContext.java:435)
at com.worklight.core.auth.impl.AuthenticationContext.pushCurrentResource(AuthenticationContext.java:409)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:75)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:408)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedure(DataAccessServiceImpl.java:115)
at com.worklight.gadgets.serving.handler.BackendQueryHandler.getContent(BackendQueryHandler.java:110)
at com.worklight.gadgets.serving.handler.BackendQueryHandler.doPost(BackendQueryHandler.java:64)
at com.worklight.gadgets.serving.GadgetAPIServlet.doGetOrPost(GadgetAPIServlet.java:144)
at com.worklight.gadgets.serving.GadgetAPIServlet.doPost(GadgetAPIServlet.java:107)
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:1240)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:760)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:127)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:88)
at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:204)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:208)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:85)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:949)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1029)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:78)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:885)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:252)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:584)
at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:439)
at com.ibm.ws.threading.internal.Worker.run(Worker.java:421)
at java.lang.Thread.run(Thread.java:745)
This is very normal, worklight will throw Authentication Exception every time you try to access protected resources(like invoking procedures in adapter with security test).
You can simply just ignore it.
While this is typically a benign exception, on WAS 7 it actually was causing us 500 exceptions and failures to authenticate while trying to use a custom challenge handler. To fix, we had to patch to WAS 7 FP27, and apply the setting documented above and here:
http://www-01.ibm.com/support/docview.wss?uid=swg1PM74090
ensure that a special web container flag is on:
for example: in Liberty Profile:
< webContainer com.ibm.ws.webcontainer.suppressLoggingServiceRuntimeExcep="true"/>
I'm setting up a test lab to learn a bit more about the WSO2 apps. I'm trying to re-create the scenario described here: http://wso2.org/library/tutorials/2012/12/providing-xacml-fine-grained-authorization-webapps
I'm using a single Windows 2008 server and have the WSO apps all listening on different ports. The tryit feature of WSOIS shows the policy is being correctly evaluated. However, when attempting to use the web service I receive a Must Understand Check Failed 500 error.
The full text of the error is below
I've re-created the setup and I get the same error.
TID[-1234] [AS] [2013-04-25 21:36:37,740] ERROR
{org.apache.axis2.engine.AxisEngine} - Must Understand check failed
for header
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
: Security
org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:104)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:170)
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:356)
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:413)
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224)
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
org.wso2.carbon.identity.entitlement.stub.EntitlementServiceStub.getDecision(EntitlementServiceStub.java:1108)
org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getDecision(BasicAuthEntitlementServiceClient.java:191)
org.wso2.carbon.identity.entitlement.proxy.soap.basicAuth.BasicAuthEntitlementServiceClient.getDecision(BasicAuthEntitlementServiceClient.java:62)
org.wso2.carbon.identity.entitlement.proxy.PEPProxy.getDecision(PEPProxy.java:78)
org.wso2.carbon.identity.entitlement.proxy.PEPProxy.getDecision(PEPProxy.java:122)
org.wso2.carbon.identity.entitlement.proxy.PEPProxy.getDecision(PEPProxy.java:99)
org.wso2.carbon.identity.entitlement.filter.EntitlementFilter.doFilter(EntitlementFilter.java:185)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:177)
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:161)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:722)
The root cause is you are setting mustunderstand header in the soap message, so SOAP processor process it and fails because of a missing requirement. You can go through the following article fro more clarification
I receive an error like this when invoking a request:
SEVERE: Servlet.service() for servlet [getRecomendations] in context with path [/my-webapp] threw exception
java.lang.NullPointerException
at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2803)
at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2790)
at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:228)
at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:228)
at org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel.getLongColumn(AbstractJDBCDataModel.java:725)
at org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel$ResultSetIDIterator.nextLong(AbstractJDBCDataModel.java:803)
at org.apache.mahout.cf.taste.impl.recommender.slopeone.MemoryDiffStorage.buildAverageDiffs(MemoryDiffStorage.java:320)
at org.apache.mahout.cf.taste.impl.recommender.slopeone.MemoryDiffStorage.<init>(MemoryDiffStorage.java:119)
at org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender.<init>(SlopeOneRecommender.java:72)
at org.apache.mahout.cf.taste.pwcms.core.recomender.PurchaseRecomender.<init>(PurchaseRecomender.java:31)
at org.apache.mahout.cf.taste.pwcms.core.recomender.PurchaseRecomender.<init>(PurchaseRecomender.java:27)
at org.apache.mahout.cf.taste.pwcms.core.PurchaseRecomenderSingleton.<init>(PurchaseRecomenderSingleton.java:19)
at org.apache.mahout.cf.taste.pwcms.core.PurchaseRecomenderSingleton.initializeIfNeeded(PurchaseRecomenderSingleton.java:14)
at org.apache.mahout.cf.taste.pwcms.common.PWCMSRecomendManager.initPurchaseRecommender(PWCMSRecomendManager.java:46)
at org.apache.mahout.cf.taste.pwcms.common.PWCMSRecomendManager.getRecommendations(PWCMSRecomendManager.java:129)
at org.apache.mahout.cf.taste.pwcms.common.PWCMSRecomender.getRecommendations(PWCMSRecomender.java:19)
at pwcms.GetRecommendations.doPost(GetRecommendations.java:41)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:851)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:278)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Can anyone tell why this happens?
Thanks.
Your problem kicks off here:
at pwcms.GetRecommendations.doPost(GetRecommendations.java:41)
Looks like its trying to find a recommendation when there isn't one there - or an attribute of the recommendation is set to null when it shouldn't be. I'm 100% this isn't a tomcat issue. Try taking a peak in your database to check all the data is setup correctly.
looks like deployment issue. Or may be issue with tomcat.
Can you reinstall and try?