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
Related
I tried to test Apache ode bpel example given in below url. I am calling my own rest service (Spring) which returns string and no input arguments and I am testing only GET operation from below sample and removed PUT, POST and DELETE
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/bps/3.5.0/modules/samples/product/src/main/resources/bpel/2.0/UserRestProcess/
It is giving below exception while invoking the rest service.
ode:Fault Timeout or execution error when waiting for response to MEX {MyRoleMex#hqejbhcnphrcgnb4qit326 [Client hqejbhcnphrcgnb4qit325] calling {http://wso2.org/bps/sample}UserRestProcess.process(...)} java.util.concurrent.TimeoutException: Message exchange org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture#56797a58 timed out(120000 ms) when waiting for a response! org.apache.ode.axis2.OdeFault: Timeout or execution error when waiting for response to MEX {MyRoleMex#hqejbhcnphrcgnb4qit326 [Client hqejbhcnphrcgnb4qit325] calling {http://wso2.org/bps/sample}UserRestProcess.process(...)} java.util.concurrent.TimeoutException: Message exchange org.apache.ode.bpel.engine.MyRoleMessageExchangeImpl$ResponseFuture#56797a58 timed out(120000 ms) when waiting for a response! at org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:169) at org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:69) at org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:52) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
I have placed println statements in rest method and I see statements printed on console. Not sure what is happening after it returns from rest method. I already spent lot of time trying to figure out the root cause but no luck.
Any help on this is appreciated
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
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.
In Struts 2 if action is not found I want to redirect to 404.jsp page
I have added the error code in web.xml file as below.
<error-page>
<error-code>403</error-code>
<location>/403.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
It rendering the 404.jsp page content but in log below error coming.
How to remove the below error
2014-04-07 14:07:46,706 WARN (org.apache.struts2.dispatcher.Dispatcher:64) - Could not find action or result: /struts2-test/home11
There is no Action mapped for namespace [/] and action name [home11] associated with context path [/struts2-test]. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:552)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
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:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The Struts 2 framework produces warnings if no action is found in the runtime configuration while rendering the JSP page when the application is configured to run in the struts.devMode. It helps the developer to resolve inappropriate mapping of the actions in the Struts tags. However, the action mapping not always inferred statically but at runtime. So, the tags should be able to find mappings from the attributes in the value stack. But the struts tags is only executed in the action context that won't be available when you redirect from the error page. Make sure you have correct URL that is mapped to the Struts action when redirected to it.
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?