0

I am developing a web application using Apache Struts, to be deployed on JBoss Server. Using eclipse for development.

I have configured web.xml to forward all *.do requests to ActionServlet.

A JSP page (abc.jsp) has a form with action="newgoal.do".

The struts-config.xml file has the following entry:

 <action path="/newgoal" type="com.misys.trng.AddingNewGoalAction">
 </action>

I have verified that the path of the class is correct.

All other .do forwards in my web application are working perfectly fine. When I submit the form from abc.jsp, I get the following exception:

2:13:43,793 ERROR [RequestProcessor] No action instance for path /newgoal could be created
java.lang.ClassNotFoundException: com.misys.trng.AddingNewGoalAction
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)
at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:280)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:218)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

I cannot fathom what the error could be. Why isn't my application able to load 1 particular class, when all others are working fine. Please help.

2
  • Does the class exists under the WEB-INF/classes on your JBoss installation? Commented Feb 25, 2011 at 7:00
  • It does not, but neither do all the other classes that are loading/instantiating without any issues. Commented Feb 25, 2011 at 9:45

2 Answers 2

1

The class must exist under WEB-INF/classes or be inside a .jar file under WEB-INF/lib. Make sure it does.

Sign up to request clarification or add additional context in comments.

2 Comments

The other Action classes, which are all working fine, are not present in WEB-INF/classes or as part of a jar in WEB-INF/lib. So I don't understand how that alone could be the problem.
The .java files are in a folder 'Java resources: src'. The META-INF folder has a single folder 'MANIFEST.MF'. The WEB-INF/lib folder is empty. And my application is working fine for the most part. What am I missing here?
1

Perhaps something is static in your action? I had the same problem. One static variable was initialized with a value in properties that did not exist, then the action not is initialized.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.