Problem With Struts/Using Tomacat need instructions.

Discussions

Web tier: servlets, JSP, Web frameworks: Problem With Struts/Using Tomacat need instructions.

  1. hi friends~!~~

    need the help of experts...

    I am trying to use the struts in a web application , this is my first time i m using it, and i am facing the following error



    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error instantiating servlet class MyActionServlet
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:895)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:479)

    root cause
    java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:232)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:886)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:479)



    for verfying that i am placing the class files in the right directory i wrote one more application code and tried to run , it worked absolutely fine ,I am using the tomcat 4.0 server and i placed the class files in the directory

    TOMCATROOT\webapps\application-context\web-inf\classes



    it worked fine , but when i am using the struts framework i am facing the above error , i would like to mention what changes i have done before running the struts based web application

    (1) I PALCED THE struts-config.xml file in the directory TOMCATROOT\webapps\application-root\web-inf
    (2) WITH THAT I HAVE PLACED THE struts.jar file in TOMCATRPPT\webapps\application-context\web-inf\lib

    do i need to do some more changes or need to mention few more things..

    i would also like t o mention what i thought of the probelm., i think that the problem coud be with the location where we should have a copy of struts.jar file in the tomcat server or it could be a version conflict that is may be there could be a stipulation about specific verison of struts.xml file to be used with this version of tomacat

     I BADLY NEED HELP ON THIS


     I WILL REALLY APPRECIATE ANY KIND OF SUGGESTION/HELP AS I AM RELLY STUCK IN THIS AND BEING A FIRST ATTEMPT I COUDNT THINK MORE AND NOT ABLE TO DO MUCH IN THIS....

    THXS A LOT
  2. Problem using Struts[ Go to top ]

    hi friends~!~~

    >
    > need the help of experts...
    >
    > I am trying to use the struts in a web application , this is my first time i m using it, and i am facing the following error
    >
    >
    >
    > type Exception report
    > message Internal Server Error
    > description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    > exception
    > javax.servlet.ServletException: Error instantiating servlet class MyActionServlet
    > at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:895)
    > at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
    > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    > at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    > at java.lang.Thread.run(Thread.java:479)
    >
    > root cause
    > java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
    > at java.lang.Class.newInstance0(Native Method)
    > at java.lang.Class.newInstance(Class.java:232)
    > at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:886)
    > at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
    > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    > at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    > at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    > at java.lang.Thread.run(Thread.java:479)
    >
    >
    >
    > for verfying that i am placing the class files in the right directory i wrote one more application code and tried to run , it worked absolutely fine ,I am using the tomcat 4.0 server and i placed the class files in the directory
    >
    > TOMCATROOT\webapps\application-context\web-inf\classes
    >
    >
    >
    > it worked fine , but when i am using the struts framework i am facing the above error , i would like to mention what changes i have done before running the struts based web application
    >
    > (1) I PALCED THE struts-config.xml file in the directory TOMCATROOT\webapps\application-root\web-inf
    > (2) WITH THAT I HAVE PLACED THE struts.jar file in TOMCATRPPT\webapps\application-context\web-inf\lib
    >
    > do i need to do some more changes or need to mention few more things..
    >
    > i would also like t o mention what i thought of the probelm., i think that the problem coud be with the location where we should have a copy of struts.jar file in the tomcat server or it could be a version conflict that is may be there could be a stipulation about specific verison of struts.xml file to be used with this version of tomacat
    >
    >  I BADLY NEED HELP ON THIS
    >
    >
    >  I WILL REALLY APPRECIATE ANY KIND OF SUGGESTION/HELP AS I AM RELLY STUCK IN THIS AND BEING A FIRST ATTEMPT I COUDNT THINK MORE AND NOT ABLE TO DO MUCH IN THIS....
    >
    > THXS A LOT

    try placing the struts.jar in java/jre/lib/ext directory
  3. THe problem is not with the location of struts.jar
    If you look at the stack trace carefully, the root cause is:
    >java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
    which means the JVM can't find the class for Converter.

    This class is not a part of struts.jar - its included in commons-beanutils.jar
    Put commons-beanutils.jar in the WEB-INF/lib of your application - should work.

    cheers! Preeti
  4. Hi,

     You have to place all the .jar files in \\webapps\YOUR_CONTEXT|WEB-INF\lib,

    when the container is loaded it looks for the .jar files in the lib folder.

    Hope this works..

    Shridhar..