No result defined for action com.ccarc.Contact and result success - struts2

I must be missing something here. I have the following struts.xml file
<?xml version="1.0" encoding="UTF-8"?>
<struts>
<package name="myName" namespace="/myName" extends="struts-default">
<action name="contact" class="com.ccarc.Contact">
<result>/jsp/Contact.jsp</result>
<result name="success">/jsp/Contact.jsp</result>
</action>
</package>
</struts>
I am getting the following error
No result defined for action com.ccarc.Contact and result success
and for my class I have the following (I took out some of the code to make it more readable)
package com.ccarc;
import com.opensymphony.xwork2.ActionSupport;
public class Contact extends ActionSupport {
public String execute() {
System.out.println("in the action");
return SUCCESS; // as defined by Action interface as "success"
}
}
I have looked around and have not found an answer, most are asked by people that forgot the name in the result (but as you can see I have the name success listed)
Also my web.xml file is below
<?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>myApp</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.ccarc</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
I should also note that I have tried chaning the class in the struts.xml to just "Contact" and I still get the same error message.
I have also verified that /WebConent/classes/com/ccarc/Contact.class does exist.
Also I should note in the console of eclipse I am seeing the out put from the class, so the object is being called, but when it returns from the class is where the issue is coming up.
Here is the full stack trace
Aug 1, 2012 1:33:25 AM org.apache.struts2.dispatcher.Dispatcher serviceAction
SEVERE: Could not find action or result
No result defined for action com.ccarc.Contact and result success
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
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:225)
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: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:1001)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

One of the reason for this is the URL http://localhost:8080/FieldDayLogger/contact.action
in you mapping file <package name="myName" namespace="/myName" extends="struts-default"> you have defined you namespace as /myName while you are not using in your URL.
Struts2 have a mechanism by which it looks for the namespace and if nothing found will go to the default one, in your case its unable to find it.
Namespace are not hierarchical like a file system path. There is one namespace level. For example if the URL /barspace/myspace/bar.action is requested, the framework will first look for namespace /barspace/myspace. If the action does not exist at /barspace/myspace, the search will immediately fall back to the default namespace "". The framework will not parse the namespace into a series of "folders". In the Namespace Example, the bar action in the default namespace would be selected.
I strongly suggest you to look at the doc of namespace and see how it works
namespace-configuration
another solution is if you are creating action in your from tag or other such tag there is a property namely namespace add /myName to that.
hope this will help you.

EDIT:
Change your URL to:
http://localhost:8080/FieldDayLogger/myName/contact.action
Or if you want to use the same URL then change the namespace to "/" in your struts.xml.
Here is a good link to understand namespace configuration and explanation. :)

I guess "contact" like is a key word in Struts2.
please rename com.ccarc.Contact to com.ccarc.MyContact and try again...

It's better to use namespace always.
you can use namespace="/" if the files are to be accessed is inside WebContent or you can use any name other than "/" according to your directory structure of file.
Try the following.
<package name="myName" namespace="/myName" extends="struts-default">
<action name="contact" class="com.ccarc.Contact">
<result name="success">jsp/Contact.jsp</result>
</action>

I was missing definition in tiles.xml:
<tiles-definitions>
...
<definition name="foobar" template="/jsp/template.jsp">
<put-attribute name="viewId" value="foobar"/>
<put-attribute name="workArea" value="/jsp/foobar.jsp"/>
</definition>
...
</tiles-definitions>
check the docs: https://www.springbyexample.org/examples/simple-tiles-spring-mvc-webapp-tiles-xml-config.html

Related

Unable to use Response.Status.METHOD_NOT_ALLOWED in Neo4J 2.3.1

I am creating a REST api with a dynamic path like this:
#DELETE
#Path("/{path: .+}")
#Produces(MediaType.APPLICATION_JSON)
public void delete() {
...
}
When I do not find a single node by the path I would like to return a 405 "Method not allowed" response. To do this I tried this:
return Response.status(Response.Status.METHOD_NOT_ALLOWED).build();
This result in an exception and the server gives a 500 "Server Error" response. This is what I get:
java.lang.NoSuchFieldError: METHOD_NOT_ALLOWED
... my boring classes...
at com.sun.jersey.spi.container.ContainerResponse.mapException(ContainerResponse.java:480)
at com.sun.jersey.spi.container.ContainerResponse.mapMappableContainerException(ContainerResponse.java:417)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1477)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:620)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540)
at java.lang.Thread.run(Thread.java:745)
Any ideas? :)
METHOD_NOT_ALLOWED should just be int 405. So william-lyon's response should be the correct one:
return Response.status(405).build();
But it looks like we should request neo4j 3.0 upgrade jax-rs to 2 from 1.1.
Can you please create raise an issue on github? https://github.com/neo4j/neo4j/issues

using Action class in struts2 to connect to couchDb

im trying to make a simple login page using struts2 and couch Db as database.i have written a code that checks the values that user enters against the values in the database. I tried connecting to the database first by making a simple java class and retrieving documents that was successful. But when i put the same code in the Action class its giving exception.
Debugging shows that its giving exception at the line where i call the 'Session' object.
My code snippet and stack trace are given below.
package net.sarah.struts2;
import java.util.List;
import com.fourspaces.couchdb.Database;
import com.fourspaces.couchdb.Document;
import com.fourspaces.couchdb.Session;
import com.fourspaces.couchdb.ViewResults;
public class LoginAction {
private String username;
private String password;
public final String LOGIN_ID ="loginid";
public final String LOGIN_PWD ="passwd";
public String execute() {
try{
Session dbSession = new Session("localhost", 5984);
String dbname = "hello-world";
List <String> listofdb = dbSession.getDatabaseNames();
System.out.println(listofdb);
Database db = dbSession.getDatabase(dbname);
ViewResults results = db.getAllDocuments();
// System.out.println(results.toString());
List<Document> studentDocuments = results.getResults();
for(Document couchDocument: studentDocuments){
String id = couchDocument.getJSONObject().getString("id");
Document studentRow = db.getDocument(id);
System.out.println(studentRow.get("_id"));
if(studentRow.containsKey(LOGIN_ID)){
if(LOGIN_ID.equals(username) && LOGIN_PWD.equals(password))
return "success";
else
return "error";
}
}
}
catch(Exception e)
{
e.getCause();
}
return "result";
}
Stack trace -
INFO: Detected AnnotationActionValidatorManager, initializing it...
Nov 25, 2014 10:55:03 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [default] in context with path [/Demo] threw exception [java.lang.reflect.InvocationTargetException] with root cause
java.lang.ClassNotFoundException: com.fourspaces.couchdb.Session
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at net.sarah.struts2.LoginAction.execute(LoginAction.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:184)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
Make sure you have all required libraries in web-inf/lib.
This resource could help you Apache CouchDB.

Omnifaces ValidateOrder throws null pointer exception when end date is null

I am using omnifaces validate order component in JSF application to validate start date and end date similar to one show cased. But, when end date is null in my application this throws null pointer exception below. How to handle this.
<app:calendar label="#{msg['gang.effectiveDate']}" property="effectiveDate" required="true"/>
<app:calendar label="#{msg['gang.expiryDate']}" property="expiryDate"/>
<o:validateOrder id="order" type="lte" components="effectiveDate expiryDate"
message="#{msg['startdate.lte.enddate']}" showMessageFor="effectiveDate" />
Exception thrown
java.lang.NullPointerException
at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:290)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:157)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
at java.util.Arrays.sort(Arrays.java:472)
at java.util.Collections.sort(Collections.java:155)
at org.omnifaces.component.validator.ValidateOrder$Type$2.invoke(ValidateOrder.java:75)
at org.omnifaces.component.validator.ValidateOrder$Type$2.invoke(ValidateOrder.java:71)
at org.omnifaces.component.validator.ValidateOrder$Type.validateOrder(ValidateOrder.java:105)
at org.omnifaces.component.validator.ValidateOrder.validateValues(ValidateOrder.java:141)
at org.omnifaces.component.validator.ValidateMultipleFields.validateComponents(ValidateMultipleFields.java:187)
at org.omnifaces.component.validator.ValidatorFamily.processValidators(ValidatorFamily.java:63)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.panel.Panel.processValidators(Panel.java:287)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIForm.processValidators(UIForm.java:253)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.dialog.Dialog.processValidators(Dialog.java:385)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at
You can either check for expiryDate value before submit to prevent nullPointerException or add this code to your <o:validateOrder> to disable it when expiryDate is null :
<o:validateOrder ... disabled="#{empty param['yourForm:yourNullableField']}" />
See : OmniFaces validateOrder disabling

TwitterException+HTTP response code: 403 for URL: http://api.twitter.com/oauth/request_token

I am trying to login on twitter through the following code. I have checked the Consumer key and Consumer secret they are correct what I am putting in my code. Still I am facing the exception
#RequestMapping(value = "/signin", method = RequestMethod.GET)
public void signIn(HttpServletRequest request, HttpServletResponse response) throws TwitterException, IOException {
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true).setOAuthConsumerKey("xxx")//xxx=Consumer key
.setOAuthConsumerSecret("yyy");//yyy=Consumer Secret
TwitterFactory tf = new TwitterFactory(cb.build());
StringBuffer callbackURL = request.getRequestURL();
int index = callbackURL.lastIndexOf("/");
callbackURL.replace(index, callbackURL.length(), "").append("/callback");
Twitter twitter = tf.getInstance();
request.getSession().setAttribute("twitter", twitter);
RequestToken requestToken = twitter.getOAuthRequestToken(callbackURL.toString());
request.getSession().setAttribute("requestToken", requestToken);
response.sendRedirect(requestToken.getAuthenticationURL());
}
Stack Trace:
TwitterException{exceptionCode=[10f5ada3-e574403a b8c63e52-c913c2ce b8c63e52-c913c2cc], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.3}] with root cause
java.io.IOException: Server returned HTTP response code: 403 for URL: http://api.twitter.com/oauth/request_token
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at twitter4j.internal.http.HttpResponseImpl.<init>(HttpResponseImpl.java:34)
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:156)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:98)
at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:122)
at twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:104)
at twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:281)
at com.test.web.controller.TwitterController.signIn(TwitterController.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
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:99)
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:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
I have checked the URL http://www.google.co.jp/search?q=10f5ada3 and http://www.google.co.jp/search?q=e574403a. Still, I am facing the same problem.
What version of Twitter4j are you using? I had this exact same problem and fixed it by upgrading to the latest version (3.0.5).

struts2 upgrade - java.lang.NoSuchmethoderror

we are upgrading struts2 version from 2.0.9 to 2.3.14.2. I am getting following exception when try to print pdf file. I have googled for this error, found its related struts.xml configuration. But dont know what changes are need to do. anyone can help me with this?
java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/Object;)Ljava/lang/Object;
at org.apache.struts2.views.jasperreports.JasperReportsResult.doExecute(JasperReportsResult.java:199)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:546)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
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.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)
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.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
thanks in advance,
12,143 ant-launcher-1.7.1.jar
445,288 antlr-2.7.7.jar
4,467 aopalliance-1.0.jar
95,536 apache-mime4j-core-0.7.2.jar
51,348 appbase-0.0.jar
26,361 asm-1.5.3.jar
38,275 asm-commons-3.3.jar
21,503 asm-tree-3.3.jar
116,218 aspectjrt-1.7.0.jar
1,789,756 aspectjweaver-1.7.0.jar
63,966 avalon-framework-4.1.3.jar
420,860 axiom-api-1.2.13.jar
201,829 axiom-dom-1.2.13.jar
158,091 axiom-impl-1.2.13.jar
1,632,995 axis-1.3.jar
33,514 axis-ant-1.3.jar
32,062 axis-jaxrpc-1.3.jar
19,419 axis-saaj-1.3.jar
2,302,195 axis2-1.6.2.jar
688,884 axis2-adb-1.6.2.jar
180,677 axis2-adb-codegen-1.6.2.jar
107,281 axis2-clustering-1.6.2.jar
254,405 axis2-codegen-1.6.2.jar
147,181 axis2-corba-1.6.2.jar
16,437 axis2-fastinfoset-1.6.2.jar
27,749 axis2-java2wsdl-1.6.2.jar
28,700 axis2-jaxbri-1.6.2.jar
743,899 axis2-jaxws-1.6.2.jar
35,742 axis2-jibx-1.6.2.jar
19,191 axis2-json-1.6.2.jar
1,045,467 axis2-kernel-1.6.2.jar
432,494 axis2-metadata-1.6.2.jar
13,946 axis2-mtompolicy-1.6.2.jar
90,445 axis2-saaj-1.6.2.jar
33,756 axis2-soapmonitor-servlet-1.6.2.jar
11,466 axis2-spring-1.6.2.jar
152,926 axis2-transport-http-1.6.2.jar
16,117 axis2-transport-local-1.6.2.jar
27,446 axis2-xmlbeans-1.6.2.jar
515,920 bcel-5.1.jar
1,070,477 bcprov-jdk15-133.jar
4,136 benchmark-1.0.jar
175,348 bsf-2.3.jar
281,694 bsh-2.0b4.jar
487,360 c3p0-0.9.0.jar
193,391 carol-2.0.5.jar
282,338 cglib-2.1_3.jar
324,238 cglib-nodep-2.1_3.jar
37,854 classworlds-1.1.jar
36,342 commons-attributes-api-2.1.jar
188,671 commons-beanutils-1.7.0.jar
90,001 commons-chain-1.1.jar
41,123 commons-cli-1.2.jar
46,725 commons-codec-1.3.jar
575,389 commons-collections-3.2.1.jar
100,776 commons-dbcp-1.1.jar
143,602 commons-digester-1.8.jar
71,442 commons-discovery-0.2.jar
112,341 commons-el-1.0.jar
52,543 commons-exec-1.1.jar
68,622 commons-fileupload-1.3.jar
279,383 commons-httpclient-3.0.jar
87,776 commons-io-1.3.2.jar
245,274 commons-lang-2.3.jar
315,805 commons-lang3-3.1.jar
60,686 commons-logging-1.1.1.jar
44,598 commons-logging-api-1.1.jar
39,523 commons-pool-1.1.jar
138,956 commons-validator-1.3.1.jar
17,978 connector-1.0.jar
36,479 connector-api-1.5.jar
56,404 cos-05Nov2002.jar
281,014 cssparser-0.9.8.jar
201,909 defaulttheme-0.0.jar
219,244 displaytag-1.2.patch.jar
12,799 displaytag-export-poi-1.2.patch.jar
8,785 displaytag-portlet-1.2.jar
313,898 dom4j-1.6.1.jar
208,048 ehcache-1.2.3.jar
29,557 errorhandler-0.0.jar
291,834 FastInfoset-1.2.7.jar
931,168 freemarker-2.3.19.jar
34,126 geronimo-activation_1.1_spec-1.0.2.jar
12,232 geronimo-annotation_1.0_spec-1.1.jar
204,953 geronimo-javamail_1.4_spec-1.6.jar
60,214 geronimo-jaxws_2.2_spec-1.0.jar
15,649 geronimo-jta_1.1_spec-1.1.jar
29,445 geronimo-saaj_1.3_spec-1.0.1.jar
28,804 geronimo-stax-api_1.0_spec-1.0.1.jar
14,611 geronimo-ws-metadata_2.0_spec-1.1.2.jar
189,285 gson-2.2.2.jar
2,189,117 guava-14.0.1.jar
76,643 hamcrest-core-1.1.jar
111,504 hamcrest-library-1.1.jar
81,271 hibernate-commons-annotations-4.0.1.Final
4,495,624 hibernate-core-4.1.8.Final.jar
102,661 hibernate-jpa-2.0-api-1.0.1.Final.jar
79,981 howl-1.0.1-1.jar
72,741 howl-logger-0.1.11.jar
1,230,705 htmlunit-2.11.jar
1,009,889 htmlunit-core-js-2.11.jar
428,353 httpclient-4.2.2.jar
223,571 httpcore-4.2.2.jar
26,594 httpmime-4.2.2.jar
1,145,105 itext-1.3.jar
107,344 jamon-2.4.jar
1,673,552 jasperreports-1.3.3.jar
96,121 java-cup-11a.jar
614,203 javassist-3.11.0.GA.jar
648,253 javassist-3.15.0-GA.jar
73,081 jaxb-api-2.0.jar
786,408 jaxb-impl-2.0.1.jar
854,901 jaxb-impl-2.1.7.jar
2,985,821 jaxb-xjc-2.0.1.jar
3,126,580 jaxb-xjc-2.1.7.jar
223,395 jaxen-1.1.3.jar
28,492 jaxrpc-api-1.1.jar
23,618 jaxws-api-2.0.jar
509,137 jaxws-tools-2.1.3.jar
60,768 jboss-logging-3.1.0.GA.jar
11,209 jboss-transaction-api_1.1_spec-1.0.0.Fina
380,196 jcifs-1.2.19.jar
488,686 jcommon-1.0.16.jar
6,727 jdbc-stdext-2.0.jar
153,253 jdom-jdom-1.0.jar
3,896,379 jdtcore-3.2.0.v_658.jar
54,187 jettison-1.0-RC2.jar
94,129 jetty-http-8.1.7.v20120910.jar
103,077 jetty-io-8.1.7.v20120910.jar
279,588 jetty-util-8.1.7.v20120910.jar
125,273 jetty-websocket-8.1.7.v20120910.jar
1,077,819 jfreechart-1.0.1.jar
407,900 jibx-bind-1.2.jar
128,520 jibx-run-1.2.jar
69,288 jmock-1.0.1.jar
138,197 jmock-2.5.1.jar
8,569 jmock-junit4-2.5.1.jar
14,535 jmock-legacy-2.5.1.jar
1,008,730 jna-3.4.0.jar
3,305 jndi-0.0.jar
570,478 joda-time-2.1.jar
124,316 jotm-2.0.10.jar
5,860 jotm-jrmp-stubs-1.5.3.jar
42,377 jotm_iiop_stubs-2.0.10.jar
5,798 jotm_jrmp_stubs-2.0.10.jar
813,521 js-1.6R7.jar
358,115 jsf-api-1.1.jar
791,660 jsf-impl-1.1_02.jar
183,696 jsfcl-0.0.jar
37,875 json-20080701.jar
46,047 jsr173-1.0.jar
49,672 jsr173_api-1.0.jar
44,263 jsr311-api-1.0.jar
20,682 jstl-1.1.2.jar
8,812 jta-1.0.1B.jar
285,638 jtds-1.2.jar
107,364 jts-1.0.jar
18,980 juli-6.0.16.jar
245,039 junit-4.11.jar
142,405 junit-dep-4.4.jar
489,884 log4j-1.2.17.jar
521,157 mail-1.4.7.jar
33,243 mex-1.6.2-impl.jar
235,867 myfaces-api-1.1.0.jar
71,320 neethi-3.0.2.jar
124,478 nekohtml-1.9.17.jar
1,121,434 netty-3.5.2.Final.jar
28,569 objenesis-1.0.jar
227,997 ognl-3.0.6.jar
8,717 opencsv-1.8.jar
105,026 opensaml-1.0.1.jar
153,253 org.jdom-jdom-1.0.jar
65,261 oro-2.0.8.jar
46,875 pager-taglib-2.0.jar
913,436 platform-3.4.0.jar
219,380 plexus-container-default-1.0-alpha-10.jar
172,956 plexus-utils-1.2.jar
1,820,323 poi-3.8.jar
38,489 poi-contrib-3.7-beta3.jar
933,010 poi-ooxml-3.8.jar
4,706,775 poi-ooxml-schemas-3.8.jar
1,186,887 poi-scratchpad-3.8.jar
17,090 portlet-api-1.0.jar
101,495 provider-0.0.jar
79,151 qdox-1.5.jar
436,583 quartz-1.6.0.jar
29,871 regexp-1.2.jar
126,268 rowset-0.0.jar
18,817 saaj-api-1.3.jar
274,208 saaj-impl-1.3.jar
15,808 sac-1.3.jar
299,794 selenium-android-driver-2.28.0.jar
140,533 selenium-api-2.28.0.jar
10,539 selenium-chrome-driver-2.28.0.jar
2,088,917 selenium-firefox-driver-2.28.0.jar
52,823 selenium-htmlunit-driver-2.28.0.jar
10,466 selenium-ie-driver-2.28.0.jar
13,461 selenium-iphone-driver-2.28.0.jar
441,199 selenium-java-2.28.0.jar
233,523 selenium-remote-driver-2.28.0.jar
24,096 selenium-safari-driver-2.28.0.jar
123,367 selenium-support-2.28.0.jar
278,281 serializer-2.7.1.jar
181,259 sitemesh-2.4.2.jar
22,338 slf4j-api-1.5.6.jar
9,678 slf4j-log4j12-1.5.6.jar
7,583 slf4j-simple-1.5.6.jar
307,017 smack-3.2.1.jar
666,380 smackx-3.2.1.jar
332,641 spring-aop-3.1.2.RELEASE.jar
53,082 spring-asm-3.1.2.RELEASE.jar
592,232 spring-beans-3.1.2.RELEASE.jar
832,018 spring-context-3.1.2.RELEASE.jar
107,014 spring-context-support-3.1.2.RELEASE.jar
449,649 spring-core-3.1.2.RELEASE.jar
176,087 spring-expression-3.1.2.RELEASE.jar
404,535 spring-jdbc-3.1.2.RELEASE.jar
199,112 spring-jms-3.1.2.RELEASE.jar
379,860 spring-orm-3.1.2.RELEASE.jar
5,643,983 spring-security-acl-2.0.8.RELEASE.jar
788,627 spring-security-core-2.0.8.RELEASE.jar
15,326 spring-security-ntlm-2.0.8.RELEASE.jar
20,194 spring-security-taglibs-2.0.8.RELEASE.jar
31,193 spring-struts-3.1.2.RELEASE.jar
117,045 spring-support-2.0.8.jar
229,461 spring-test-3.1.2.RELEASE.jar
245,031 spring-tx-3.1.2.RELEASE.jar
548,703 spring-web-3.1.2.RELEASE.jar
577,502 spring-webmvc-3.1.2.RELEASE.jar
200,136 sqlx-0.0.jar
393,259 standard-1.1.2.jar
26,514 stax-api-1.0.1.jar
113,780 stax-utils-20040917.jar
549,876 struts-1.2.9.jar
329,441 struts-core-1.3.10.jar
34,581 struts2-codebehind-plugin-2.3.14.2.jar
45,111 struts2-config-browser-plugin-2.3.14.2.ja
797,152 struts2-core-2.3.14.2.jar
14,856 struts2-jasperreports-plugin-2.0.9.jar
15,475 struts2-jfreechart-plugin-2.3.14.2.jar
15,932 struts2-pell-multipart-plugin-2.3.14.2.ja
23,215 struts2-plexus-plugin-2.3.14.2.jar
43,036 struts2-sitegraph-plugin-2.3.14.2.jar
35,898 struts2-sitemesh-plugin-2.3.14.2.jar
21,829 struts2-spring-plugin-2.3.14.2.jar
32,972 struts2-struts1-plugin-2.3.14.2.jar
21,830 struts2-tiles-plugin-2.3.14.2.jar
16,238 tiles-api-2.0.4.jar
125,843 tiles-core-2.0.4.jar
47,328 tiles-jsp-2.0.4.jar
228,175 tribes-6.0.16.jar
289,881 vecmath-1.3.1.jar
392,124 velocity-1.5.jar
698,567 velocity-dep-1.5.jar
165,120 webbit-0.4.14.jar
4,063,019 webui-1.0.jar
150,102 woden-api-1.0M9.jar
186,268 woden-impl-commons-1.0M9.jar
48,704 woden-impl-dom-1.0M9.jar
148,522 wsdl4j-1.6.1.jar
541,211 wss4j-1.5.1.jar
504,969 wstx-asl-3.2.0.jar
3,176,148 xalan-2.7.1.jar
91,815 xapool-1.5.0.jar
179,491 xbean-spring-2.8.jar
1,223,877 xercesImpl-2.9.0.jar
131,385 xfire-aegis-1.2.6.jar
903,729 xfire-all-1.2.6.jar
28,704 xfire-annotations-1.2.6.jar
423,605 xfire-core-1.2.6.jar
64,061 xfire-generator-1.2.6.jar
25,055 xfire-java5-1.2.6.jar
20,278 xfire-jaxb2-1.2.6.jar
43,912 xfire-jaxws-1.2.6.jar
8,074 xfire-jsr181-api-1.0-M1.jar
55,761 xfire-spring-1.2.6.jar
14,588 xfire-ws-security-1.2.6.jar
11,936 xfire-xmlbeans-1.2.6.jar
194,354 xml-apis-1.3.04.jar
84,091 xml-resolver-1.2.jar
2,722,970 xmlbeans-2.5.0.jar
124,724 xmlParserAPIs-2.6.2.jar
127,961 XmlSchema-1.1.jar
148,829 XmlSchema-1.4.7.jar
284,773 xmlsec-1.3.0.jar
24,677 xpp3_min-1.1.3.4.O.jar
545,752 xstream-1.2.jar
637,221 xwork-core-2.3.14.2.jar
OMG.
I've already seen a lot of dependency in a project, but you beat them all. Note this is NOT a good thing.
BTW, a quick look at the stacktrace and to the dependencies list shows that you are using struts2-jasperreports-plugin-2.0.9.jar. To be consistent with others struts 2 libraries, you should upgrade to struts2-jasperreports-plugin-2.3.14.2.jar.
The issue is that the struts 2 'required' tag attribute has been replaced by 'requiredLabel'. You need to search for things like required="true" or required="false" in your JSP struts 2 tags, and replace by requiredLabel="true" or requiredLabel="false"
we were also facing this problem.
But in our case we are not using jasper and json.
while upgrading struts we were just replacing new jar files, but this is not enough.
we need to recompile the java files(The modules which uses strus and xwork APIs) with new struts jars.
After that the issue is resolved.

Resources