Confusion about struts.jar in classpath
Hi, I have been following the threads on struts.jar issue and this is what I have. I have deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT. Here's the strange situation: If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my own application. I get the error in the attached 'my_application_error.html' file. my_application_error.htm Now if I add struts.jar in my classpath, I can run my own application but CANNOT run struts-example now. The error I get is in 'struts_example_error.html' file struts_example_error.htm So what is the right way? -Nimmi my_application_error.htm struts_example_error.htm
Re: Confusion about struts.jar in classpath
Maybe I will give a wrong answer. I think when you have a correct full application as *.war file you do not need to use CLASSPATH for this application, but when your application is not as "good, full, packed" application you need something,... But what - CLASSPATH or put struts.jar under tomcat/lib ? I do not build yet my application and do not have your experiment. I have tested only struts-example.war. Maya Shamdasani Nimmi-ANS004 wrote: Hi, I have been following the threads on struts.jar issue and this is what I have. I have deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT. Here's the strange situation: If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my own application. I get the error in the attached 'my_application_error.html' file. my_application_error.htm Now if I add struts.jar in my classpath, I can run my own application but CANNOT run struts-example now. The error I get is in 'struts_example_error.html' file struts_example_error.htm So what is the right way? -Nimmi Name: my_application_error.htm my_application_error.htmType: Hypertext Markup Language (text/html) Encoding: quoted-printable Name: struts_example_error.htm struts_example_error.htmType: Hypertext Markup Language (text/html) Encoding: quoted-printable
RE: Confusion about struts.jar in classpath
Do you have struts.jar in the WEB-INF/lib directory of the webapp you wrote yourself? -Original Message- From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 4:08 PM To: '[EMAIL PROTECTED]' Subject: RE: Confusion about struts.jar in classpath Yes with struts-example only I don't need to put 'struts.jar' in my classpath but things are totally different if one has developed/deployed another application also. -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: Re: Confusion about struts.jar in classpath Maybe I will give a wrong answer. I think when you have a correct full application as *.war file you do not need to use CLASSPATH for this application, but when your application is not as "good, full, packed" application you need something,... But what - CLASSPATH or put struts.jar under tomcat/lib ? I do not build yet my application and do not have your experiment. I have tested only struts-example.war. Maya Shamdasani Nimmi-ANS004 wrote: Hi, I have been following the threads on struts.jar issue and this is what I have. I have deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT. Here's the strange situation: If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my own application. I get the error in the attached 'my_application_error.html' file. my_application_error.htm Now if I add struts.jar in my classpath, I can run my own application but CANNOT run struts-example now. The error I get is in 'struts_example_error.html' file struts_example_error.htm So what is the right way? -Nimmi Name: my_application_error.htm my_application_error.htmType: Hypertext Markup Language (text/html) Encoding: quoted-printable Name: struts_example_error.htm struts_example_error.htmType: Hypertext Markup Language (text/html) Encoding: quoted-printable
Re: Confusion about struts.jar in classpath
Shamdasani Nimmi-ANS004 wrote: Hi, I have been following the threads on struts.jar issue and this is what I have. I have deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT. Here's the strange situation: If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my own application. I get the error in the attached 'my_application_error.html' file. my_application_error.htm>> Are you also checking to make sure there is not a copy of struts.jar in your $JAVA_HOME/jre/lib/ext directory? All JAR files there are automatically added to the classpath as well. Now if I add struts.jar in my classpath, I can run my own application but CANNOT run struts-example now. The error I get is in 'struts_example_error.html' file struts_example_error.htm>> This error means that there was some other problem in initializing the ActionServlet instance -- check your other Tomcat log files for details. The most likely error message is a class not found exception on the User class, which is *exactly* the reason why you should not put struts.jar on your CLASSPATH. So what is the right way? See my following message -- on a new thread to ensure that it is very visible. -Nimmi Craig
RE: Confusion about struts.jar in classpath
Craig, I did a find on 'struts.jar' on my 'D drive' and these are all the occurences of 'struts.jar': D:\jakarta-struts\lib D:\mqc_struts_05\Web-inf\lib- This is a saved copy of my application with struts0.5 version D:\tomcat-3.2.1\webapps\msqc\WEB-INF\lib This is the current version of my app with struts 1.0 D:\tomcat-3.2.1\webapps\struts-documentation\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-example\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-template\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-test\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-upload\WEB-INF\lib As I said before if I DON'T add struts.jar in classpath: struts-example WORKS but my application DOES NOT WORK. If I add struts.jar in classpath: struts-example DOES NOT WORK but my application WORKS. Is something in my classpath bringing this behavior? Here are my environment variables if needed: CLASSPATH: .;d:\jdk1.3\lib\tools.jar;d:\jdk1.3\lib\dt.jar;d:\jdbc\classes12.zip;d:\tomcat-3.2.1\webapps\msqc\Webinf\classes\DbConnectionBroker1.0.11.zip;d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes PATH: D:\orant\bin;d:\jdk1.3\bin;d:\jdbc;C:\WINNT\system32;C:\WINNT;C:\Program Files\Mts JAVA_HOME: d:\jdk1.3 TOMCAT_HOME: d:\tomcat-3.2.1 -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 3:21 PM To: [EMAIL PROTECTED] Subject: Re: Confusion about struts.jar in classpath Shamdasani Nimmi-ANS004 wrote: Hi, I have been following the threads on struts.jar issue and this is what I have. I have deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT. Here's the strange situation: If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my own application. I get the error in the attached 'my_application_error.html' file. my_application_error.htm Are you also checking to make sure there is not a copy of struts.jar in your $JAVA_HOME/jre/lib/ext directory? All JAR files there are automatically added to the classpath as well. Now if I add struts.jar in my classpath, I can run my own application but CANNOT run struts-example now. The error I get is in 'struts_example_error.html' file struts_example_error.htm This error means that there was some other problem in initializing the ActionServlet instance -- check your other Tomcat log files for details. The most likely error message is a class not found exception on the User class, which is *exactly* the reason why you should not put struts.jar on your CLASSPATH. So what is the right way? See my following message -- on a new thread to ensure that it is very visible. -Nimmi Craig servlet.log jasper.log
Re: Confusion about struts.jar in classpath
Shamdasani Nimmi-ANS004 wrote: Craig, I did a find on 'struts.jar' on my 'D drive' and these are all the occurences of 'struts.jar': D:\jakarta-struts\lib D:\mqc_struts_05\Web-inf\lib- This is a saved copy of my application with struts0.5 version D:\tomcat-3.2.1\webapps\msqc\WEB-INF\lib This is the current version of my app with struts 1.0 D:\tomcat-3.2.1\webapps\struts-documentation\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-example\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-template\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-test\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-upload\WEB-INF\lib As I said before if I DON'T add struts.jar in classpath: struts-example WORKS but my application DOES NOT WORK. If I add struts.jar in classpath: struts-example DOES NOT WORK but my application WORKS. Is something in my classpath bringing this behavior? Possibly. You have the following directory on the end of your classpath: d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes which is going to cause any classes found there to be loaded from the "wrong" class loader. Try it without this directory on your classpath. It also looks like your CLASSPATH entry for the connection broker has a typo in it ("webinf" instead of "web-inf"). Here are my environment variables if needed: CLASSPATH: .;d:\jdk1.3\lib\tools.jar;d:\jdk1.3\lib\dt.jar;d:\jdbc\classes12.zip;d:\tomcat-3.2.1\webapps\msqc\Webinf\classes\DbConnectionBroker1.0.11.zip;d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes PATH: D:\orant\bin;d:\jdk1.3\bin;d:\jdbc;C:\WINNT\system32;C:\WINNT;C:\Program Files\Mts JAVA_HOME: d:\jdk1.3 TOMCAT_HOME: d:\tomcat-3.2.1 If the above doesn't solve it, could you double check the contents of "d:\jdk1.3\jre\lib\ext" just to make sure there is nothing suspicious there? In addition, could you post (or send me privately) the contents of the log files that Tomcat creates when trying to access your own application? You will need to shut Tomcat down afterwards in order for the log files to have any contents, due to Windows limitations. Craig
RE: Confusion about struts.jar in classpath - THAT DID IT
Thanks Craig, Removing 'd:\tomcat-3.2.1\webapps\msqc\Web-inf\classes' from my classpath did the trick. BTW webinf instead of web-inf was a typo in my e-mail -Nimmi -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 4:57 PM To: [EMAIL PROTECTED] Subject: Re: Confusion about struts.jar in classpath Shamdasani Nimmi-ANS004 wrote: Craig, I did a find on 'struts.jar' on my 'D drive' and these are all the occurences of 'struts.jar': D:\jakarta-struts\lib D:\mqc_struts_05\Web-inf\lib- This is a saved copy of my application with struts0.5 version D:\tomcat-3.2.1\webapps\msqc\WEB-INF\lib This is the current version of my app with struts 1.0 D:\tomcat-3.2.1\webapps\struts-documentation\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-example\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-template\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-test\WEB-INF\lib D:\tomcat-3.2.1\webapps\struts-upload\WEB-INF\lib As I said before if I DON'T add struts.jar in classpath: struts-example WORKS but my application DOES NOT WORK. If I add struts.jar in classpath: struts-example DOES NOT WORK but my application WORKS. Is something in my classpath bringing this behavior? Possibly. You have the following directory on the end of your classpath: d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes which is going to cause any classes found there to be loaded from the "wrong" class loader. Try it without this directory on your classpath. It also looks like your CLASSPATH entry for the connection broker has a typo in it ("webinf" instead of "web-inf"). Here are my environment variables if needed: CLASSPATH: .;d:\jdk1.3\lib\tools.jar;d:\jdk1.3\lib\dt.jar;d:\jdbc\classes12.zip;d:\tomcat-3.2.1\webapps\msqc\Webinf\classes\DbConnectionBroker1.0.11.zip;d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes PATH: D:\orant\bin;d:\jdk1.3\bin;d:\jdbc;C:\WINNT\system32;C:\WINNT;C:\Program Files\Mts JAVA_HOME: d:\jdk1.3 TOMCAT_HOME: d:\tomcat-3.2.1 If the above doesn't solve it, could you double check the contents of "d:\jdk1.3\jre\lib\ext" just to make sure there is nothing suspicious there? In addition, could you post (or send me privately) the contents of the log files that Tomcat creates when trying to access your own application? You will need to shut Tomcat down afterwards in order for the log files to have any contents, due to Windows limitations. Craig