Re: PLEASE PRETTY PLEASE HELP ME
"Craig R. McClanahan" wrote: > > * Use a special shell script that temporarily adds struts.jar > to the classpath just for compilation. > I guess I should really give an example of this. You can easily create a script that includes this (Unix syntax, but the same idea works in .bat scripts): javac -classpath /path/to/struts.jar:$CLASSPATH $@ Craig
Re: PLEASE PRETTY PLEASE HELP ME
Ted Husted wrote: > The condurum is that you need STRUTS.JAR in the classpath when building > struts applications, but it must not be in the classpath while running > Struts Web Applications. This is because Tomcat can get confused about > which STRUTS.JAR to use. > More specifically, you need it on the classpath your *compiler* sees -- it does not have to be on your CLASSPATH environment variable. Several general approaches to this issue: * Use ANT for building your projects -- it can easily assemble classpaths for the compiler. (This is how Struts itself is built, plus Tomcat and a bunch of other Java-based projects). * Use a special shell script that temporarily adds struts.jar to the classpath just for compilation. * Use an IDE where you can configure the "class path" used for compilation independent of the CLASSPATH environment variable. > > So, if you are building and testing on the same machine, then the > solution is to use a tool like ANT to add Struts to the classpath > dynamically. But it should not otherwise be on the classpath of the > machine serving the Struts application. (Too many cooks!) > Having "struts.jar" on the class path that your servlet container sees, and exposes to webapps, is a definite no-no. Craig McClanahan
RE: PLEASE PRETTY PLEASE HELP ME
The condurum is that you need STRUTS.JAR in the classpath when building struts applications, but it must not be in the classpath while running Struts Web Applications. This is because Tomcat can get confused about which STRUTS.JAR to use. So, if you are building and testing on the same machine, then the solution is to use a tool like ANT to add Struts to the classpath dynamically. But it should not otherwise be on the classpath of the machine serving the Struts application. (Too many cooks!) *** REPLY SEPARATOR *** On 1/8/2001 at 4:47 PM Nishant Baranwal wrote: I had a similar problem with tomcat... Having looked at your classpath setting.i find struts.jar being set in the classpath..struts.jar file needs to be in the lib directory of your web application i.e. /web-inf/lib.. only. I removed struts.jar from my class path and had it only in the lib folder. This actually solved my problem. You can try this too. Nishant Baranwal Project Leader Nihilent Technologies Pvt. Ltd., Pune Phone: 91-20-6054452/6052253 Mobile: 9823078613 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 06, 2001 6:02 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: PLEASE PRETTY PLEASE HELP ME Hi, I have WLS 5.1 with SP6, Struts 0.5, Xalan-j_1_2_2 and xercs-1_2_3 installed on my machine. I have added the classpaths to weblogic and here is a sample. WebLogic startup settings are presently: CLASSPATH Prefix D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar CLASSPATH D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar;D:\weblogic\jre1_2\lib\tools.jar;D:\weblogic\jre1_2\jre\lib\r t.ja r;D: \weblogic\jre1_2\jre\lib\i18n.jar;D:\weblogic\license;D:\weblogic\classe s\bo ot;D :\weblogic\classes;D:\weblogic\lib\weblogicaux.jar;D:\weblogic\eval\clou dsca pe\l ib\cloudscape.jar JAVA_HOME D:\weblogic\jre1_2 WEBLOGIC_LICENSEDIR D:\weblogic\license WEBLOGIC_HOME D:\weblogic system properties: java.security.manager java.security.policy==D:\weblogic\weblogic.policy weblogic.system.home=D:\weblogic java.compiler=symcjit weblogic.class.path=D:\weblogic\lib\weblogic510sp6.jar;d:\We blogic\license;d:\Weblogic\classes;d:\Weblogic\myserver\serverclasses;d: \Web logi c\lib\weblogicaux.jar INITIAL_HEAP64 MB MAX_HEAP64 MB SERVERCLASSPATH D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar;D:\weblogic\jre1_2\jre\lib\rt.jar;D:\weblogic\jre1_2\jre\lib\ i18n .jar ;D:\weblogic\classes\boot;D:\weblogic\eval\cloudscape\lib\cloudscape.jar When weblogic starts up it fails with the following error: Fri Jan 05 19:13:52 EST 2001: Invoking T3StartupDef StartDatabaseServlet weblogic.servlet.utils.ServletStartup with {servlet=db} Fri Jan 05 19:13:52 EST 2001: db: init Fri Jan 05 19:13:53 EST 2001: db: Database load exception java.lang.ClassNotFoundException: org/apache/struts/example/User at org.apache.struts.digester.Digester.startElement(Digester.java, Compiled Code) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java, Compiled Code) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVal idat or.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentSc anne r.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc h(XM LDocumentScanner.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan ner. java, Compiled Code) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) at org.apache.struts.digester.Digester.parse(Digester.java:748) at org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:282) at org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:175) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl. java :474) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp l.ja va, Compiled Code) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl .jav a:421) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl .jav a:342) at weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36) at weblogic.t3.srvr.StartupThread.ru
RE: PLEASE PRETTY PLEASE HELP ME
I had a similar problem with tomcat... Having looked at your classpath setting.i find struts.jar being set in the classpath..struts.jar file needs to be in the lib directory of your web application i.e. /web-inf/lib.. only. I removed struts.jar from my class path and had it only in the lib folder. This actually solved my problem. You can try this too. Nishant Baranwal Project Leader Nihilent Technologies Pvt. Ltd., Pune Phone: 91-20-6054452/6052253 Mobile: 9823078613 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 06, 2001 6:02 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: PLEASE PRETTY PLEASE HELP ME Hi, I have WLS 5.1 with SP6, Struts 0.5, Xalan-j_1_2_2 and xercs-1_2_3 installed on my machine. I have added the classpaths to weblogic and here is a sample. WebLogic startup settings are presently: CLASSPATH Prefix D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar CLASSPATH D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar;D:\weblogic\jre1_2\lib\tools.jar;D:\weblogic\jre1_2\jre\lib\r t.ja r;D: \weblogic\jre1_2\jre\lib\i18n.jar;D:\weblogic\license;D:\weblogic\classe s\bo ot;D :\weblogic\classes;D:\weblogic\lib\weblogicaux.jar;D:\weblogic\eval\clou dsca pe\l ib\cloudscape.jar JAVA_HOME D:\weblogic\jre1_2 WEBLOGIC_LICENSEDIR D:\weblogic\license WEBLOGIC_HOME D:\weblogic system properties: java.security.manager java.security.policy==D:\weblogic\weblogic.policy weblogic.system.home=D:\weblogic java.compiler=symcjit weblogic.class.path=D:\weblogic\lib\weblogic510sp6.jar;d:\We blogic\license;d:\Weblogic\classes;d:\Weblogic\myserver\serverclasses;d: \Web logi c\lib\weblogicaux.jar INITIAL_HEAP64 MB MAX_HEAP64 MB SERVERCLASSPATH D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar;D:\weblogic\jre1_2\jre\lib\rt.jar;D:\weblogic\jre1_2\jre\lib\ i18n .jar ;D:\weblogic\classes\boot;D:\weblogic\eval\cloudscape\lib\cloudscape.jar When weblogic starts up it fails with the following error: Fri Jan 05 19:13:52 EST 2001: Invoking T3StartupDef StartDatabaseServlet weblogic.servlet.utils.ServletStartup with {servlet=db} Fri Jan 05 19:13:52 EST 2001: db: init Fri Jan 05 19:13:53 EST 2001: db: Database load exception java.lang.ClassNotFoundException: org/apache/struts/example/User at org.apache.struts.digester.Digester.startElement(Digester.java, Compiled Code) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java, Compiled Code) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVal idat or.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentSc anne r.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc h(XM LDocumentScanner.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan ner. java, Compiled Code) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) at org.apache.struts.digester.Digester.parse(Digester.java:748) at org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:282) at org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:175) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl. java :474) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp l.ja va, Compiled Code) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl .jav a:421) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl .jav a:342) at weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36) at weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182) at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java, Compiled Code) at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62 ) Fri Jan 05 19:13:53 EST 2001: T3StartupDef StartDatabaseServlet weblogic.servlet.utils.ServletStartup reports:servlet: db unable to initialize. javax.servlet.UnavailableException: Cannot load database from 'null' at org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:180) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at weblogic.servlet.internal
Re: PLEASE PRETTY PLEASE HELP ME
There's been a lot of questions about Weblogic. I didn't follow it all, but you could try a search at < http://www.mail-archive.com/struts-user%40jakarta.apache.org/ > You will also get better answers to questions like these on the USER list, where I know there are a lot of WebLogic people. This list is meant for people writing new versions of Struts, rather than about using an existing version. *** REPLY SEPARATOR *** On 1/5/2001 at 7:32 PM [EMAIL PROTECTED] wrote: Hi, I have WLS 5.1 with SP6, Struts 0.5, Xalan-j_1_2_2 and xercs-1_2_3 installed on my machine. I have added the classpaths to weblogic and here is a sample. WebLogic startup settings are presently: CLASSPATH Prefix D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar CLASSPATH D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar;D:\weblogic\jre1_2\lib\tools.jar;D:\weblogic\jre1_2\jre\lib\r t.ja r;D: \weblogic\jre1_2\jre\lib\i18n.jar;D:\weblogic\license;D:\weblogic\classe s\bo ot;D :\weblogic\classes;D:\weblogic\lib\weblogicaux.jar;D:\weblogic\eval\clou dsca pe\l ib\cloudscape.jar JAVA_HOME D:\weblogic\jre1_2 WEBLOGIC_LICENSEDIR D:\weblogic\license WEBLOGIC_HOME D:\weblogic system properties: java.security.manager java.security.policy==D:\weblogic\weblogic.policy weblogic.system.home=D:\weblogic java.compiler=symcjit weblogic.class.path=D:\weblogic\lib\weblogic510sp6.jar;d:\We blogic\license;d:\Weblogic\classes;d:\Weblogic\myserver\serverclasses;d: \Web logi c\lib\weblogicaux.jar INITIAL_HEAP64 MB MAX_HEAP64 MB SERVERCLASSPATH D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2 _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakarta-struts- 0.5\ lib\ struts.jar;D:\weblogic\jre1_2\jre\lib\rt.jar;D:\weblogic\jre1_2\jre\lib\ i18n .jar ;D:\weblogic\classes\boot;D:\weblogic\eval\cloudscape\lib\cloudscape.jar When weblogic starts up it fails with the following error: Fri Jan 05 19:13:52 EST 2001: Invoking T3StartupDef StartDatabaseServlet weblogic.servlet.utils.ServletStartup with {servlet=db} Fri Jan 05 19:13:52 EST 2001: db: init Fri Jan 05 19:13:53 EST 2001: db: Database load exception java.lang.ClassNotFoundException: org/apache/struts/example/User at org.apache.struts.digester.Digester.startElement(Digester.java, Compiled Code) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java, Compiled Code) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVal idat or.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentSc anne r.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc h(XM LDocumentScanner.java, Compiled Code) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan ner. java, Compiled Code) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at javax.xml.parsers.SAXParser.parse(SAXParser.java:143) at org.apache.struts.digester.Digester.parse(Digester.java:748) at org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:282) at org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:175) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl. java :474) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp l.ja va, Compiled Code) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl .jav a:421) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl .jav a:342) at weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36) at weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182) at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java, Compiled Code) at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62 ) Fri Jan 05 19:13:53 EST 2001: T3StartupDef StartDatabaseServlet weblogic.servlet.utils.ServletStartup reports:servlet: db unable to initialize. javax.servlet.UnavailableException: Cannot load database from 'null' at org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:180) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl. java :474) at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp l.ja va, Compiled Code) at weblogic.servle