aspose file tools
The moose likes Struts and the fly likes Strut and Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Strut and Exception" Watch "Strut and Exception" New topic
Author

Strut and Exception

Mahesh Kulkarni
Ranch Hand

Joined: Jul 05, 2001
Posts: 62
Hi Friends,
I'm working with struts and successfully could run some egs. But for one specific eg when I changed the form beans, application is not working and giving me the exception.The struts.jar file is in lib directory.
EXCEPTION
======================
10/08 14:36:20 user FileServlet: init
10/08 14:36:21 error Unhandled exception thrown from /index1.jsp:17
[1]java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at jrunx.util.JRunURLClassLoader.defineClass(JRunURLClassLoader.java:168)
at jrunx.util.JRunURLClassLoader.findClass(JRunURLClassLoader.java:133)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:79)
at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:79)
at jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:71)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:563)
at jrun__index12ejspb._jspService(jrun__index12ejspb.java:97)
at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
at jrun.jsp.JSPServlet.service(JSPServlet.java:106)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:414)
at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:387)
at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:172)
at jrun.servlet.file.FileServlet.service(FileServlet.java:339)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
[0]jrun.jsp.runtime.UncaughtPageException: Unhandled exception thrown from /index1.jsp:17
at jrun.jsp.runtime.Utils.handleException(Utils.java:57)
at jrun.jsp.runtime.JRunPageContext.handlePageException(JRunPageContext.java:381)
at jrun__index12ejspb._jspService(jrun__index12ejspb.java:247)
at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
at jrun.jsp.JSPServlet.service(JSPServlet.java:106)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:414)
at jrun.servlet.JRunRequestDispatcher.forwardInvoke(JRunRequestDispatcher.java:387)
at jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:172)
at jrun.servlet.file.FileServlet.service(FileServlet.java:339)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
======================================
strut-config.xml
=========================
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>

<!-- ========== Form Bean Definitions =================================== -->
<form-beans>
<form-bean name="login"
type="com.struts.ejb.LogonForm"/>
</form-beans>
<!-- ========== Global Forward Definitions ============================== -->
<global-forwards>
<forward name="start" path="/index.jsp"/>
</global-forwards>
<!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>
<action
path="/logon"
type="com.struts.ejb.LogonAction"
name="login"
input="/logon.jsp">
<forward name="home" path="/home.jsp"/>
<forward name="logon" path="/logon.jsp"/>
</action>
</action-mappings>
</struts-config>
===============================
Please help me
Thx in advance
Mahesh
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 567
Hi Mahesh,
it's difficult starting to learn struts for everyone, but it's also difficult trying to work out what you might be doing wrong, so I'm going to ask a bunch of questions you might think stupid:
you say you had struts working already - do any of the other examples still work? If so, then you are right, struts.jar is in the right place (if you're using tomcat, it's /tomcat/webapps/my_app/WEB-INF/lib )
where my_app is the directory name of the example application you are working with.
What developer environment do you have?


I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
 
Don't get me started about those stupid light bulbs.
 
subject: Strut and Exception
 
It's not a secret anymore!