RE: java.lang.NoClassDefFoundError: sun/tools/javac/Main
Are you sure you have the %JAVA_HOME%\lib\tools.jar?...this jar contains the java compiler that tomcats needs in order to compile jsps pages. Hope this helps. Martín. -Mensaje original- De: Anoop kumar V [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 15 de Junio de 2005 01:30 p.m. Para: Tomcat Users List Asunto: java.lang.NoClassDefFoundError: sun/tools/javac/Main I am using Tomcat 4.1.30 standalone and am repeatedly facing this issue of java.lang.NoClassDefFoundError: sun/tools/javac/Main whenever I try to serve up a jsp from a specific folder within webapps. I know that this is a classpath issue - but i have checked my JAVA_HOME and it is pointing correctly to my jdk. I mean I have lots of other applications working fine in the webapps folder so JAVA_HOME has never been the issue. (the other jsp files from other folders in webapps are served just fine) Also from a google search someone pointed out that TOMCAT_HOME or CATALINA_HOME needs to be set. I tried setting this too in startup.bat and catalina.bat (even setclasspath.bat) but in vain. I know that tomcat 4.1.30 completely ignores the system classpath - so I have not tried to change that. Another point is that I compiled using JDK1.5_01 but the tomcat4.1.30 I am using points to jdk1.4.2. On Tomcat5.5 (pointing to jdk1.5) this worked like a charm - I just dropped the war in webapps and the jsp was displayed. Can anybody give me some pointers as to how I can automatically fix this in 4.1.30? Thanks in advance, Anoop -- Thanks and best regards, Anoop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 267.7.3 - Release Date: 14/06/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 267.7.3 - Release Date: 14/06/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: sun/tools/javac/Main
Yes - I am sure - This is a line in the setclasspath.bat set CLASSPATH=%JAVA_HOME%\lib\tools.jar And my other webapps which have jsp work. But for some reason this jsp which is in the struts-blank.war gives this exception. Anoop On 6/15/05, Martín Cabrera [EMAIL PROTECTED] wrote: Are you sure you have the %JAVA_HOME%\lib\tools.jar?...this jar contains the java compiler that tomcats needs in order to compile jsps pages. Hope this helps. Martín. -Mensaje original- De: Anoop kumar V [mailto:[EMAIL PROTECTED] Enviado el: Miércoles, 15 de Junio de 2005 01:30 p.m. Para: Tomcat Users List Asunto: java.lang.NoClassDefFoundError: sun/tools/javac/Main I am using Tomcat 4.1.30 standalone and am repeatedly facing this issue of java.lang.NoClassDefFoundError: sun/tools/javac/Main whenever I try to serve up a jsp from a specific folder within webapps. I know that this is a classpath issue - but i have checked my JAVA_HOME and it is pointing correctly to my jdk. I mean I have lots of other applications working fine in the webapps folder so JAVA_HOME has never been the issue. (the other jsp files from other folders in webapps are served just fine) Also from a google search someone pointed out that TOMCAT_HOME or CATALINA_HOME needs to be set. I tried setting this too in startup.bat and catalina.bat (even setclasspath.bat) but in vain. I know that tomcat 4.1.30 completely ignores the system classpath - so I have not tried to change that. Another point is that I compiled using JDK1.5_01 but the tomcat4.1.30 I am using points to jdk1.4.2. On Tomcat5.5 (pointing to jdk1.5) this worked like a charm - I just dropped the war in webapps and the jsp was displayed. Can anybody give me some pointers as to how I can automatically fix this in 4.1.30? Thanks in advance, Anoop -- Thanks and best regards, Anoop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 267.7.3 - Release Date: 14/06/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 267.7.3 - Release Date: 14/06/2005 -- Thanks and best regards, Anoop - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: sun/tools/javac/Main
Another point is that I compiled using JDK1.5_01 but the tomcat4.1.30 I am using points to jdk1.4.2. On Tomcat5.5 (pointing to jdk1.5) this worked like a charm - I just dropped the war in webapps and the jsp was displayed. Can anybody give me some pointers as to how I can automatically fix this in 4.1.30? Different versions of JDK should be the problem. I had similar issues with 1.3 and 1.4. I built Tomcat from source using one jdk and run Tomcat using another jdk and I got similar errors. Also post the full stack trace. Perhaps copying tools.jar(of 1.4) to CATALINA_HOME\common\lib may solve the problem. -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError
On 5/18/05, Hari Om [EMAIL PROTECTED] wrote: SUBJECT: java.lang.NoClassDefFoundError I am using Tomcat 4.1.31 on SuSE Linux 8.1 and Java 1.4 I have my application as following: /local/tomcat/webapps/hari /local/tomcat/webapps/hari/index.html /local/tomcat/webapps/hari/WEB-INF/classes/util/BatchUpload1.class /local/tomcat/webapps/hari/WEB-INF/classes/util/*.class /local/tomcat/webapps/hari/WEB-INF/lib/cos.jar (this is Oreilly's predefined classes) /local/tomcat/webapps/hari/WEB-INF/web.xml I access my WEB application as http://us.hari.com/uhin/BatchUpload and get following error wonder why: description: The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error instantiating servlet class util.BatchUpload1 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:865) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NoClassDefFoundError: com/oreilly/servlet/multipart/FileRenamePolicy at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618) at java.lang.Class.getConstructor0(Class.java:1930) at java.lang.Class.newInstance0(Class.java:278) at java.lang.Class.newInstance(Class.java:261) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:856) --- I am using Oreilly's predefined classes which are stored in cos.jar file and under WEB-INF/lib/ directory... I have also added this to the CLASSPATH... When I un-jar my cos.jar file I get follwing files... com/oreilly/servlet/*.classes Any pointer on this would be appreciated... THANKS! HARI OM _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] You tried restarting Tomcat or the machine ? Which jar file is in the classpath when you compiled the servlet. The one in WEB-INF/lib ?. -- rgds Anto Paul
Re: java.lang.NoClassDefFoundError: org/apache/tools/ant/types/RedirectorElement
Found the answer to this one. I needed Ant 1.6.2.. Rob :) On Sat, 19 Mar 2005 22:01:58 +1100, Robert Mark Bram [EMAIL PROTECTED] wrote: Hi All! I have just installed Tomcat 5.5 on Windows XP Pro with apache-ant-1.6.1. I have placed the catalina-ant.jar in in apache-ant-1.6.1's lib dir and am attempting to install my first app. I am using the basic build.xml file from the local Application Developer's Guide and am seeing the following error when I attempt to install on the command line: F:\cml\websiteant -version Apache Ant version 1.6.1 compiled on February 12 2004 F:\cml\websiteant install Buildfile: build.xml prepare: compile: install: BUILD FAILED java.lang.NoClassDefFoundError: org/apache/tools/ant/types/RedirectorElement Total time: 6 seconds F:\cml\website I got exactly the same result when I moved the website dir to C:\temp\website as well. Any advice would be most appreciated! Rob :) -- Robert Mark Bram http://phd.netcomp.monash.edu.au/RobertMarkBram/default.asp B.Comp.(Systems Development/Business Systems) B.Net.Comp.(Hons) Doctor of Philosophy Student School of Network Computing Faculty of Information Technology Monash University Peninsula Campus McMahons Rd Frankston, VIC 3199 AUSTRALIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError
Hi, The CLASSPATH environment variable is meaningless to Tomcat: it's ignored. You need to put the class (the compiled .class file) in WEB-INF/classes, or a jar containing the class in WEB-INF/lib. If you just put the class in WEB-INF/classes, make sure to do so in the appropriate subdirectory, e.g. WEB-INF/classes/net/sourceforge/jradius. And make sure all its dependencies are available in the same repository (WEB-INF/lib or WEB-INF/classes). Yoav Shapira http://www.yoavshapira.com -Original Message- From: Mohamed Ganna [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 10:58 AM To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError Hi there, I'm newbie to Tomcat. I'm using Tomcat 4.1.31 under Linux RedHat9.0, and I set up all the necessary CLASSPATH and sample servlets are running great. I built up a Servlet for user's authentication using freeradius 0.9.2 and a Java based radius client (jradius-client). The servlet works fine with JSWDK + freeradius + jradius-client, but I wanted to encrypt the information exchanged between the user's form and the webserver using SSL (https based form), that I couldn't do with JSWDK. So, I've installed tomcat and tried to use the same servlet (I've made all the necessary changes in server.xml, I think so!!!). I've put my ServletForm class in $CATALINA_HOME$/webapps/ROOT/WEB-INF/classes and the html form in $CATALINA_HOME$/webapps/ROOT/. I access the form using https://localhost:8443/ (the form called index.html), but when running the servlet I get this error: java.lang.NoClassDefFoundError: net/sourceforge/jradiusclient/RadiusAttribute at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610) at java.lang.Class.getConstructor0(Class.java:1922) at java.lang.Class.newInstance0(Class.java:278) at java.lang.Class.newInstance(Class.java:261) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.ja va:8 56) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java: 621) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet .jav a:369) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java: 169) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j ava:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j ava:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j ava: 199) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23 58) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:13 3) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve .java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:11 6) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
Re: java.lang.NoClassDefFoundError
Hi Yoav, Thank's for your advice. I put the .jar in a WEB-INF/lib that I created and it's working. Thank's for your help NzM Shapira, Yoav wrote: Hi, The CLASSPATH environment variable is meaningless to Tomcat: it's ignored. You need to put the class (the compiled .class file) in WEB-INF/classes, or a jar containing the class in WEB-INF/lib. If you just put the class in WEB-INF/classes, make sure to do so in the appropriate subdirectory, e.g. WEB-INF/classes/net/sourceforge/jradius. And make sure all its dependencies are available in the same repository (WEB-INF/lib or WEB-INF/classes). Yoav Shapira http://www.yoavshapira.com -Original Message- From: Mohamed Ganna [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 10:58 AM To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError Hi there, I'm newbie to Tomcat. I'm using Tomcat 4.1.31 under Linux RedHat9.0, and I set up all the necessary CLASSPATH and sample servlets are running great. I built up a Servlet for user's authentication using freeradius 0.9.2 and a Java based radius client (jradius-client). The servlet works fine with JSWDK + freeradius + jradius-client, but I wanted to encrypt the information exchanged between the user's form and the webserver using SSL (https based form), that I couldn't do with JSWDK. So, I've installed tomcat and tried to use the same servlet (I've made all the necessary changes in server.xml, I think so!!!). I've put my ServletForm class in $CATALINA_HOME$/webapps/ROOT/WEB-INF/classes and the html form in $CATALINA_HOME$/webapps/ROOT/. I access the form using https://localhost:8443/ (the form called index.html), but when running the servlet I get this error: java.lang.NoClassDefFoundError: net/sourceforge/jradiusclient/RadiusAttribute at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610) at java.lang.Class.getConstructor0(Class.java:1922) at java.lang.Class.newInstance0(Class.java:278) at java.lang.Class.newInstance(Class.java:261) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.ja va:8 56) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java: 621) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet .jav a:369) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java: 169) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j ava:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j ava:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j ava: 199) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23 58) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:13 3) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve .java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:11 6) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 433)
Re: java.lang.NoClassDefFoundError: org/apache/tomcat/logging/Logger
Hi, One of the main reasons for getting NotClassDefFoundError is tomcat is encountering two different versions of Logger class. Looks like you have two different versions of Log4j library in Tomcat(Search and Verify all the Log4J library files in Tomcat and Webapps). Do not hesitate to contact me back for any clarification. Regards, Avinash R S - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 11:33 PM Subject: java.lang.NoClassDefFoundError: org/apache/tomcat/logging/Logger Configuration: Solaris 9, Apache 1.3, Tomcat 5.0.7, JSDK 1.4Hello All,I recently upgraded from Tomcat 4.0.1 to 5.2.7 and things have gone pretty smooth, except when I attempt to load a jsp page I get the following error. I have looked all over for a reference to org/apache/tomcat/logging/Logger, but I cannot find it, (server.xml, web.xmlcatalina.sh, startup.sh) Any Suggestions??Thanks in advance...javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:534) root cause java.lang.NoClassDefFoundError: org/apache/tomcat/logging/Logger org.apache.jasper.Constants.message(Constants.java:244) org.apache.jasper.servlet.JspServlet.init(JspServlet.java:265) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:534) DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: org/apache/tomcat/logging/Logger
Thanks for your response, but I only found the following when I searched my entire system. /usr/apache/jakarta-tomcat-5.0.27/common/lib/log4j-1.2.8.jar /usr/apache/jakarta-tomcat-5.0.27/server/lib/log4j-1.2.8.jar I executed the following command: find / -name log*.jar This is getting crazy... I can't lauch my admin application or my manager application..since I'm getting these errors everywhere. I noticed that I can't even find a Logger.java file on my system. Is that because the file is in a .jar? Thanks again, Kenshinmax - Original Message - From: Avinash R S [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, September 16, 2004 5:29 AM Subject: Re: java.lang.NoClassDefFoundError: org/apache/tomcat/logging/Logger Hi, One of the main reasons for getting NotClassDefFoundError is tomcat is encountering two different versions of Logger class. Looks like you have two different versions of Log4j library in Tomcat(Search and Verify all the Log4J library files in Tomcat and Webapps). Do not hesitate to contact me back for any clarification. Regards, Avinash R S - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 11:33 PM Subject: java.lang.NoClassDefFoundError: org/apache/tomcat/logging/Logger Configuration: Solaris 9, Apache 1.3, Tomcat 5.0.7, JSDK 1.4Hello All,I recently upgraded from Tomcat 4.0.1 to 5.2.7 and things have gone pretty smooth, except when I attempt to load a jsp page I get the following error. I have looked all over for a reference to org/apache/tomcat/logging/Logger, but I cannot find it, (server.xml, web.xmlcatalina.sh, startup.sh) Any Suggestions??Thanks in advance...javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:534) root cause java.lang.NoClassDefFoundError: org/apache/tomcat/logging/Logger org.apache.jasper.Constants.message(Constants.java:244) org.apache.jasper.servlet.JspServlet.init(JspServlet.java:265) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) java.lang.Thread.run(Thread.java:534) DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: javax/mail/Address
activation.jar mailapi.jar make sure these are in your $CATALINA_HOME$/common/lib On Wed, 24 Mar 2004, [Windows-1252] Honza Spurný wrote: Date: Wed, 24 Mar 2004 12:33:17 +0100 From: [Windows-1252] Honza Spurný [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], [Windows-1252] Honza Spurný [EMAIL PROTECTED] To: Tomcat Maillisting [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError: javax/mail/Address - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Check you servler/lib directory. commons-logging.jat should be there. It comes with Tomcat destribution. - Original Message - From: Bernhard Erdmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 29, 2004 1:42 PM Subject: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory Hi, I'm using Tomcat 4.1.18 and mod_jk2 (2.0.4-dev) with Apache2 on Linux, Sun JDK 1.4.2_03. When Tomcat starts, it writes an error to catalina.out SEVERE: Can't create apr - java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory What do I miss? INFO: Initializing Coyote HTTP/1.1 on port 8079 Starting service Tomcat-Standalone Apache Tomcat/4.1.18 Jan 29, 2004 11:50:40 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8079 Jan 29, 2004 11:50:40 AM org.apache.jk.server.JkMain newHandler SEVERE: Can't create apr java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.jk.apr.AprImpl.clinit(AprImpl.java:340) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.jk.server.JkMain.newHandler(JkMain.java:556) at org.apache.jk.server.JkMain.processProperty(JkMain.java:537) at org.apache.jk.server.JkMain.processProperties(JkMain.java:505) at org.apache.jk.server.JkMain.start(JkMain.java:346) at org.apache.jk.server.JkCoyoteHandler.start(JkCoyoteHandler.java:169) at org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1056) at org.apache.catalina.core.StandardService.start(StandardService.java:506) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Jan 29, 2004 11:50:40 AM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8017 Jan 29, 2004 11:50:40 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=2/121 config=/opt/tomcat/conf/jk2.properties - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Dima Gutzeit wrote: Check you servler/lib directory. commons-logging.jat should be there. It comes with Tomcat destribution. Hi, commons-logging.jar is in $CATALINA_HOME/server/lib. Disabling apr.NativeSo in $CATALINA_HOME/conf/jk2.properties suppresses the error message (# apr.NativeSo=/opt/apache/lib/libjkjni.so). Can someone explain me what's going on here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Howdy, Going back to the original error: it's likely that a different version of Commons Logging is in your runtime classpath than was in your compile-time classpath. Alternatively, maybe the error has to do with having commons-logging.jar instead of commons-logging-api.jar. Yoav Shapira Millennium ChemInformatics -Original Message- From: Bernhard Erdmann [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 7:15 AM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory Dima Gutzeit wrote: Check you servler/lib directory. commons-logging.jat should be there. It comes with Tomcat destribution. Hi, commons-logging.jar is in $CATALINA_HOME/server/lib. Disabling apr.NativeSo in $CATALINA_HOME/conf/jk2.properties suppresses the error message (# apr.NativeSo=/opt/apache/lib/libjkjni.so). Can someone explain me what's going on here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
Devinder, if you are on windows put your classes12.jar in common/lib if you on linux/unix - just make it a symlink in common/lib for the same .jar -Original Message- From: Sachdeva, Devinder [mailto:[EMAIL PROTECTED] Sent: 06 2004 . 17:10 To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver All- I'm getting the following error ,though Oracle driver classes(zip)are in tomcat/common/lib placed. java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver Any clue--- Thanks Devinder -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
Trying renaming classes12.zip to classes12.jar -Original Message- From: Sachdeva, Devinder [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 06, 2004 10:10 AM To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver All- I'm getting the following error ,though Oracle driver classes(zip)are in tomcat/common/lib placed. java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver Any clue--- Thanks Devinder -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
I'm using Oracle 9i and have no problems. I placed the oracle classes12.jar within the common/lib directory and use a resource description within the server.xml to identify the database where I store XML and other documents within a generic event logging framework with no problem. Here are a few items to consider: 1. Do you have the correct jar file in common/lib 2. If using a Resource definition: is your resource configured with the proper class definition (e.g. valueoracle.jdbc.driver.OracleDriver/value) 2.1 Is the resource within the proper context (e.g. Context path=/DBC_Logger docBase=DBC_Logger.war... Resource name=jdbc/DBC_Logger auth=Container type=javax.sql.DataSource/ ... ResourceParams name=jdbc/DBC_Logger ... Hope this helps. Regards, Dick Brooks B2B Application Integration and CyberSecurity Consultant http://www.tech-comm.com/dbc Telephone: 602-684-1484 -Original Message- From: Sachdeva, Devinder [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 06, 2004 10:10 AM To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver All- I'm getting the following error ,though Oracle driver classes(zip)are in tomcat/common/lib placed. java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver Any clue--- Thanks Devinder -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission
In an earlier post, From: Scott Shorter Subject: java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission Date: Wed, 13 Mar 2002 16:55:00 -0500 All, I'm working on migrating an app from one Solaris machine to another. Using Java 1.4.0, Tomcat 4.0.3 I've copied $JAVA_HOME/jre/lib/ext/*.jar and $CATALINA_HOME/common/lib/*.jar from the old machine to the new, but when we first try to view a JSP page, we get the following stack trace: javax.servlet.ServletException: org/apache/naming/JndiPermission at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:485) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at I'm having exactly the same exception. I'm trying to install tomcat 4.1.27, on a linux box running [EMAIL PROTECTED] /home/ezust/school/CSI5389/jakarta-tomcat-4.1.27/bin ./startup.sh Using CATALINA_BASE: /home/ezust/school/CSI5389/jakarta-tomcat-4.1.27 Using CATALINA_HOME: /home/ezust/school/CSI5389/jakarta-tomcat-4.1.27 Using CATALINA_TMPDIR: /home/ezust/school/CSI5389/jakarta-tomcat-4.1.27/temp Using JAVA_HOME: /usr/local/j2eesdk1.4_beta2/jdk [EMAIL PROTECTED] I installed it yesterday, ran it immediately, and all was well. I rebooted, and tried running it again today. Now i see the above message. Is Scott Shorter still on this list? Did you or anyone else find a resolution to this problem? I've done a bunch of searches but have not seen any resolutions. -- alan ezust ottawa, canada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError
Looks like you've using OpenEJB ;) The OpenEJB distro comes with a war file, which looks like it's been expanded to a context by your tomcat install. However, the war file doesn't contain the required OpenEJB jar files (which probably need to be put in common/lib or server/lib). The class file for org/openejb/OpenEJB is in the openejb-0.9.1.jar. Deploy that and you should be set (well, this error will go away, at least) . HTH, Jon Jeremy Whitlock wrote: Tomcat List, This might not be a Tomcat problem but I imagine that you might be able to help anyways. Every time I start Tomcat, I get this error: StandardContext[/openejb_loader-0.9.1]: Servlet /openejb_loader-0.9.1 threw load() exception javax.servlet.ServletException: Servlet.init() for servlet loader threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:962) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy er.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:36 8) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) - Root Cause - java.lang.NoClassDefFoundError: org/openejb/OpenEJB at org.openejb.loader.EmbeddedLoader.load(EmbeddedLoader.java:58) at org.openejb.loader.EmbeddingLoader.load(EmbeddingLoader.java:84) at org.openejb.client.LocalInitialContextFactory.getInitialContext(LocalIni tialContextFactory.java:65) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:660) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241) at javax.naming.InitialContext.init(InitialContext.java:217) at javax.naming.InitialContext.init(InitialContext.java:193) at org.openejb.loader.LoaderServlet.init(LoaderServlet.java:82) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:934) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3420) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy er.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502) at
RE: java.lang.NoClassDefFoundError -- solved
This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work. An actual path is required. - Some set it to point to the OpenEJB /bin directory. - The rest are usually typos in the path. Hope this helps everyone out. As an archive-searcher, I always appreciate finding emails like this. If anyone has any ideas on making the integration process even easier, I am all ears. -David -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:44 PM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError Looks like you've using OpenEJB ;) The OpenEJB distro comes with a war file, which looks like it's been expanded to a context by your tomcat install. However, the war file doesn't contain the required OpenEJB jar files (which probably need to be put in common/lib or server/lib). The class file for org/openejb/OpenEJB is in the openejb-0.9.1.jar. Deploy that and you should be set (well, this error will go away, at least) . HTH, Jon Jeremy Whitlock wrote: Tomcat List, This might not be a Tomcat problem but I imagine that you might be able to help anyways. Every time I start Tomcat, I get this error: StandardContext[/openejb_loader-0.9.1]: Servlet /openejb_loader-0.9.1 threw load() exception javax.servlet.ServletException: Servlet.init() for servlet loader threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(Standard Wrapper.ja v a:962) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper .java:821) at org.apache.catalina.core.StandardContext.loadOnStartup(Standa rdContext. j ava:3420) at org.apache.catalina.core.StandardContext.start(StandardContex t.java:360 8 ) at org.apache.catalina.core.ContainerBase.addChildInternal(Conta inerBase.j a va:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase .java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(Standar dHostDeplo y er.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig. java:502) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig. java:410) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostCon fig.java:3 6 8) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( LifecycleS u pport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine. java:347) at org.apache.catalina.core.StandardService.start(StandardServic e.java:497 ) at org.apache.catalina.core.StandardServer.start(StandardServer. java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512
RE: java.lang.NoClassDefFoundError -- solved
Filip, I didn't register my servlet in web.xml because I didn't know I had to. I have this same setup on my Windows 2000 machine and I didn't have a web.xml file for that EJB. Also, your first statement, can you give me an example of how you do that? Thanks, Jeremy -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:33 PM To: Tomcat Users List Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work. An actual path is required. - Some set it to point to the OpenEJB /bin directory. - The rest are usually typos in the path. Hope this helps everyone out. As an archive-searcher, I always appreciate finding emails like this. If anyone has any ideas on making the integration process even easier, I am all ears. -David -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:44 PM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError Looks like you've using OpenEJB ;) The OpenEJB distro comes with a war file, which looks like it's been expanded to a context by your tomcat install. However, the war file doesn't contain the required OpenEJB jar files (which probably need to be put in common/lib or server/lib
RE: java.lang.NoClassDefFoundError -- solved
1. If you have the invoker servlet, you can access it that way, but you need the full classname look in the docs for the invoker servlet, it is a shortcut in Tomcat so you don't have to register your servlets in web.xml. Or search the archives for the invoker servlet. http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB and it also means that HelloOpenEJB has to have the package org.acme; statement in it. 2. Be default you have to register the servlets in web.xml to map them to a request. Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:36 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved Filip, I didn't register my servlet in web.xml because I didn't know I had to. I have this same setup on my Windows 2000 machine and I didn't have a web.xml file for that EJB. Also, your first statement, can you give me an example of how you do that? Thanks, Jeremy -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:33 PM To: Tomcat Users List Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work. An actual path is required. - Some set it to point to the OpenEJB /bin directory. - The rest
RE: java.lang.NoClassDefFoundError -- solved
Filip, Which web.xml? There is one in the $CATALINA_HOME/conf directory and I can also put one in the WEB-INF directory of the app. I'm new to OpenEJB. I have configured it many times but with my current schedule, I haven't had time to play with EJBs for awhile. Thanks for your help, Jeremy -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:48 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError -- solved 1. If you have the invoker servlet, you can access it that way, but you need the full classname look in the docs for the invoker servlet, it is a shortcut in Tomcat so you don't have to register your servlets in web.xml. Or search the archives for the invoker servlet. http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB and it also means that HelloOpenEJB has to have the package org.acme; statement in it. 2. Be default you have to register the servlets in web.xml to map them to a request. Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:36 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved Filip, I didn't register my servlet in web.xml because I didn't know I had to. I have this same setup on my Windows 2000 machine and I didn't have a web.xml file for that EJB. Also, your first statement, can you give me an example of how you do that? Thanks, Jeremy -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:33 PM To: Tomcat Users List Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat
RE: java.lang.NoClassDefFoundError -- solved
David, I have deployed the myHelloEjb.jar and it's in the /usr/local/openejb/openejb-0.9.1/bean directory. I haven't copied it or moved it. In my Windows install, I had to do some weird things for my EJB to work with OpenEJB. I had to move the META-INF, org and myHelloEjb.jar files from the classes directory into some other directory. If I didn't do that, it wouldn't work. Now, when I deploy the app: ./openejb.sh deploy -a -m /usr/local/share/development/openejb/WEB-INF/classes/myHelloEjb.jar everything goes as planned and the myHelloEjb.jar gets copied to the /usr/local/openejb/openejb-0.9.1/beans directory What do I do next? The META-INF and org directories are still there, should they be? Here are my steps: 1) Create all .java files for the bean example 2) javac all .java files 3) jar META-INF and org 4) deploy myHelloEjb.jar 5) Start Tomcat Did I leave any steps out? I don't know what to do next. Please help. Thanks, Jeremy P.S. - I tried the http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB but it didn't work. Anymore ideas? -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:58 PM To: 'Tomcat Users List' Cc: 'OpenEJB Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved Filip is correct, follow that advice. Also, once you deploy the EJB's into OpenEJB, just leave them in the OpenEJB beans directory. Don't copy the contents of you EJB jar into the webapps dir, ejbs are not simple libraries, they must stay in the EJB container. Putting them in the webapps classes dir or lib dir will just cause classloader issues. OpenEJB will make sure all your EJBs are visible all your Servlets and JSPs at run time. You can easily tell OpenEJB where to look for ejbs on your file system, but again, this shouldn't be the classes or lib directories of your webapp. You could create a directory under your WEB-INF dir called ejbs, then add that dir to your openejb.conf as such: Deployments dir=/usr/local/share/development/openejb/WEB-INF/ejbs / When you deploy, just leave of the -m or -c options as those will move or copy the ejb jar into the OpenEJB/beans directory. You want them to stay where they are, which is your new WEB-INF/ejbs directory. -David -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 2:33 PM To: Tomcat Users List Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment
RE: java.lang.NoClassDefFoundError -- solved
Filip, I'm sorry man but I'm lost on your advice. Please give me the dummy terms to explain this. I am new to this. Thanks, Jeremy -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:48 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError -- solved 1. If you have the invoker servlet, you can access it that way, but you need the full classname look in the docs for the invoker servlet, it is a shortcut in Tomcat so you don't have to register your servlets in web.xml. Or search the archives for the invoker servlet. http://localhost:8080/openejb/servlet/org/acme/HelloOpenEJB and it also means that HelloOpenEJB has to have the package org.acme; statement in it. 2. Be default you have to register the servlets in web.xml to map them to a request. Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:36 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved Filip, I didn't register my servlet in web.xml because I didn't know I had to. I have this same setup on my Windows 2000 machine and I didn't have a web.xml file for that EJB. Also, your first statement, can you give me an example of how you do that? Thanks, Jeremy -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:33 PM To: Tomcat Users List Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml
RE: java.lang.NoClassDefFoundError -- solved
David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work. An actual path is required. - Some set it to point to the OpenEJB /bin directory. - The rest are usually typos in the path. Hope this helps everyone out. As an archive-searcher, I always appreciate finding emails like this. If anyone has any ideas on making the integration process even easier, I am all ears. -David -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:44 PM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError Looks like you've using OpenEJB ;) The OpenEJB distro comes with a war file, which looks like it's been expanded to a context by your tomcat install. However, the war file doesn't contain the required OpenEJB jar files (which probably need to be put in common/lib or server/lib). The class file for org/openejb/OpenEJB is in the openejb-0.9.1.jar. Deploy that and you should be set (well, this error will go away, at least) . HTH, Jon Jeremy Whitlock wrote: Tomcat List, This might not be a Tomcat problem but I imagine that you might be able to help anyways. Every time I start Tomcat, I get this error: StandardContext[/openejb_loader-0.9.1]: Servlet /openejb_loader-0.9.1 threw load() exception javax.servlet.ServletException: Servlet.init() for servlet loader threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(Standard Wrapper.ja v a:962) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper .java:821
RE: java.lang.NoClassDefFoundError -- solved
you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work. An actual path is required. - Some set it to point to the OpenEJB /bin directory. - The rest are usually typos in the path. Hope this helps everyone out. As an archive-searcher, I always appreciate finding emails like this. If anyone has any ideas on making the integration process even easier, I am all ears. -David -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:44 PM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError Looks like you've using OpenEJB ;) The OpenEJB distro comes with a war file, which looks like it's been expanded to a context by your tomcat install. However, the war file doesn't contain the required OpenEJB jar files (which probably need to be put in common/lib or server/lib). The class file for org/openejb/OpenEJB is in the openejb-0.9.1.jar. Deploy that and you should be set (well, this error will go away, at least) . HTH, Jon Jeremy Whitlock wrote: Tomcat List, This might not be a Tomcat problem but I imagine that you might be able to help anyways. Every time I start Tomcat, I get this error: StandardContext[/openejb_loader-0.9.1]: Servlet /openejb_loader-0.9.1 threw load() exception
RE: java.lang.NoClassDefFoundError -- solved
Filip is correct, follow that advice. Also, once you deploy the EJB's into OpenEJB, just leave them in the OpenEJB beans directory. Don't copy the contents of you EJB jar into the webapps dir, ejbs are not simple libraries, they must stay in the EJB container. Putting them in the webapps classes dir or lib dir will just cause classloader issues. OpenEJB will make sure all your EJBs are visible all your Servlets and JSPs at run time. You can easily tell OpenEJB where to look for ejbs on your file system, but again, this shouldn't be the classes or lib directories of your webapp. You could create a directory under your WEB-INF dir called ejbs, then add that dir to your openejb.conf as such: Deployments dir=/usr/local/share/development/openejb/WEB-INF/ejbs / When you deploy, just leave of the -m or -c options as those will move or copy the ejb jar into the OpenEJB/beans directory. You want them to stay where they are, which is your new WEB-INF/ejbs directory. -David -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 2:33 PM To: Tomcat Users List Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved you can do it two ways, 1. If you have the invoker servlet, you can access it that way, but you need the full classname 2. Did you register your servlet in web.xml? Filip -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 12:21 PM To: 'Tomcat Users List' Cc: OpenEJB Subject: RE: java.lang.NoClassDefFoundError -- solved David, I got OpenEJB working but I'm not able to run the example. I have created and compiled the HelloBean.java,HelloHome.java,HelloObject.java and HelloWorld.java. Here is the directory structure: /usr/local/share/development/openejb | | |_WEB-INF | |_lib | |_classes | |_META-INF | | | |_ejb-jar.xml | |_org | |_acme | |_HelloBean.java |_HelloBean.class |_HelloHome.java |_HelloHome.class |_HelloObject.java |_HelloObject.class |_HelloWorld.java |_HelloWorld.class I have setup Tomcat's server.xml to do this: !-- OpenEJB ExampleText Bean Context -- Contect path=/openejb docBase=/usr/local/share/development/openejb debug=0/ Now, when I do http://localhost:8080/openejb/servlet/HelloOpenEJB I get: HTTP Status 404-/openejb/servlet/HelloOpenEJB type Status report message /openejb/servlet/HelloOpenEJB description The requested resource (/openejb/servlet/HelloOpenEJB) is not available Any ideas why? I remember in the previous version of OpenEJB, I had to place the HelloWorld.java and HelloWorld.class in the classes directory instead of the acme directory. Any ideas? Thanks, Jeremy -Original Message- From: David Blevins [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:09 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError -- solved This reply is for the archives. Jeremy did finally get it running -- he simply forgot to uncomment the openejb.home init-param after setting it. The full install process In Linux, it is literally just three steps: 1. Copy the openejb_loader-0.9.1.war into the webapps dir 2. Uncomment and set the openejb.home init-param in the web.xml 3. Restart Tomcat If anything goes wrong, it *has* to be step 2, in which case see above. In Windows, it's the same process, but people constantly have problems with the NT Service version of Tomcat not actually restarting. Usually you have to re-run the Tomcat NT Service install program to get it to truly restart. Don't know why, wish I knew an easier way. How does this work? The openejb_loader will do all the busy work for you. It will add all the required libraries from the OpenEJB directories into the appropriate classloaders in Tomcat, all automatically and dynamically. The only thing you have to do is tell the loader where OpenEJB lives by setting the openejb.home init-param in the web.xml. It didn't work!? Sounds simple, but we see a number of common mistakes: - Most people simply forget to uncomment it. Check and double check that. - Some set it to OPENEJB_HOME, which won't work
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? Thank you. -John -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:02 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:53 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found. However it is my understanding that Tomcat shouldn't require me to do this since all jars in that directory are loaded by Tomcat (aren't they?). This is an ugly workaround, but I thought it an interesting anomaly to pass on. -John Oh here's a thought I just had...is there a class trying to reference javax.servlet.Filter that was already explicitly on the classpath? The stuff in common/lib is higher up in the classloader hierarchy than the stuff on the base classpath is, so that might explain it. Hopefully that made sense... -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:26 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi again, This is the first install of Tomcat on this server (done about a month ago), and it is not presently running any jsp applications save the examples. I've set up a few contexts, but they're empty right now (except for this TestFilter in the /ws context), so I suspect the install is pretty clean. I too was curious about whether or not the servlet.jar was the correct version, so I listed the jar's table of contents and saw that the javax.servlet.Filter was present (so I'm guessing this is the 2.3 jar - dated 09/23/2002). Thanks again for you input. -John -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:40 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Howdy, Do you have any other thoughts? I have many thoughts ;) Most of which don't relate to your question unfortunately. Is there any possibility unpacked classes from the servlet.jar are scattered throughout your installation? Or that the servlet.jar file in your installation is NOT the version 2.3 jar? Doing a clean installation of tomcat in a different directory may help solve this. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
see intermixed -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 8:53 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. what do you mean on the tomcat classpath? You classes should be under /common/classes for shared classes and /WEB-INF/classes for each webapp. If you put your filter in /common/classes it will find the javax.servlet.Filter class through tomcat's classloading heriarchy. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. It is much easier to have 2 copies of the code. A simple ANT script can copy the files to tomcat's directories after you build them. When building web applications, you have to consider how the classes will be used within Tomcat, since classes in the /common/lib(or classes) can not access classes that reside in WEB-INF/lib. This may not be the same division as your code shared with another app and your tomcat code. you should review Tomcat's classloader document: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. yes, you need to keep *all* your classes that Tomcat will use within Tomcat's structure. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. no, again avoid the classpath when possible. it will only cause you problems as you have already seen. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? Thank you. -John -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:02 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:53 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found. However it is my understanding that Tomcat shouldn't require me to do this since all jars in that directory are loaded by Tomcat (aren't they?). This is an ugly workaround, but I thought it an interesting anomaly to pass on. -John Oh here's a thought I just had...is there a class trying to reference javax.servlet.Filter that was already explicitly on the classpath? The stuff in common/lib is higher up in the classloader hierarchy than the stuff on the base classpath is, so that might explain it. Hopefully that made sense... -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:26 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi again, This is the first install of Tomcat on this server (done about a month ago), and it is not presently running any jsp applications save the examples. I've set up a few contexts, but they're empty right now (except for this TestFilter in the /ws context), so I suspect the install is pretty clean. I too was curious about whether or not the servlet.jar was the correct version, so I listed the jar's table of contents and saw that the javax.servlet.Filter was present (so I'm guessing this is the 2.3 jar - dated 09/23/2002). Thanks again for you input. -John -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:40 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Howdy, Do you have any other thoughts? I have many thoughts ;) Most of which don't relate to your question unfortunately
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
what do you mean on the tomcat classpath? I mean the classpath used by the JVM in which Tomcat is running. Your classes should be under /common/classes for shared classes. Let me clarify. When I refer to common classes I do *not* mean common to Tomcat, but common to other Java applications _independent from Tomcat altogether_ running on the same machine. While I could have those other applications point to /common/classes under Tomcat, I would prefer not to. However, having duplicate copies of the classes as you suggest is one possible alternative. Classes in the /common/lib(or classes) can not access classes that reside in WEB-INF/lib. Understood. Nor is that something I'm trying to accomplish. I have read the Class loader document you refer to. (That's why I was surprised by the original NoClassDefFoundError in the first place.) But if, as Tim has suggested, items on the classpath are not privy to classes under /common/lib then the error makes sense. I don't know if my responses to your questions make any difference. It may simply come down to what you stated, You need to keep *all* your classes that Tomcat will use within Tomcat's structure. Thank you for your help. -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 9:46 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter see intermixed -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 8:53 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. what do you mean on the tomcat classpath? You classes should be under /common/classes for shared classes and /WEB-INF/classes for each webapp. If you put your filter in /common/classes it will find the javax.servlet.Filter class through tomcat's classloading heriarchy. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. It is much easier to have 2 copies of the code. A simple ANT script can copy the files to tomcat's directories after you build them. When building web applications, you have to consider how the classes will be used within Tomcat, since classes in the /common/lib(or classes) can not access classes that reside in WEB-INF/lib. This may not be the same division as your code shared with another app and your tomcat code. you should review Tomcat's classloader document: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. yes, you need to keep *all* your classes that Tomcat will use within Tomcat's structure. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. no, again avoid the classpath when possible. it will only cause you problems as you have already seen. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? Thank you. -John -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:02 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:53 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found. However it is my understanding that Tomcat shouldn't require me to do this since all jars in that directory are loaded by Tomcat (aren't they?). This is an ugly workaround, but I thought it an interesting anomaly to pass on. -John Oh here's a thought I just had...is there a class trying to reference javax.servlet.Filter that was already explicitly on the classpath? The stuff in common/lib is higher up in the classloader hierarchy than the stuff on the base classpath is, so
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Hi, John, Referring back to the class loader how-to, the classes on your system classpath are loaded in the bootstrap loader. Classes higher in the hierarchy cannot access classes lower in the hierarchy. I am in a very similar situation to you: we have classes that are shared between webapps and command line tools, that reside in a common, shared location. The compromise we've used is to include several of the Tomcat JARs on the system classpath used to launch the Tomcat JVM. Personally, I'm not particularly happy with this solution, as it makes classpath maintainance troublesome, but it basically works. It would be nice if Tomcat had a more flexible classloading scheme that could be customized for situations like ours. I think that eventually I'll end up writing a custom bootstrap classloader for Tomcat that will allow for configurable library directories. Hopefully I'll be allowed to submit it back to the project. Good luck, -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 8:53 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? Thank you. -John -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:02 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:53 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found. However it is my understanding that Tomcat shouldn't require me to do this since all jars in that directory are loaded by Tomcat (aren't they?). This is an ugly workaround, but I thought it an interesting anomaly to pass on. -John Oh here's a thought I just had...is there a class trying to reference javax.servlet.Filter that was already explicitly on the classpath? The stuff in common/lib is higher up in the classloader hierarchy than the stuff on the base classpath is, so that might explain it. Hopefully that made sense... -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:26 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi again, This is the first install of Tomcat on this server (done about a month ago), and it is not presently running any jsp applications save the examples. I've set up a few contexts, but they're empty right now (except for this TestFilter in the /ws context), so I suspect the install is pretty clean. I too was curious about whether or not the servlet.jar was the correct version, so I listed the jar's table of contents and saw that the javax.servlet.Filter was present (so I'm guessing this is the 2.3 jar - dated 09/23/2002). Thanks again for you input. -John -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:40 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Howdy, Do you have any other thoughts? I have many
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
you would need to keep in mind the security ramifications of such a change. you don't want someone to place any directory of jars in the list to be loaded where they could be accessed by any jsp dropped into a webapp. There's also directory/file permissions to think about for each external directory or jar to be maintained. Charlie -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 10:28 AM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi, John, Referring back to the class loader how-to, the classes on your system classpath are loaded in the bootstrap loader. Classes higher in the hierarchy cannot access classes lower in the hierarchy. I am in a very similar situation to you: we have classes that are shared between webapps and command line tools, that reside in a common, shared location. The compromise we've used is to include several of the Tomcat JARs on the system classpath used to launch the Tomcat JVM. Personally, I'm not particularly happy with this solution, as it makes classpath maintainance troublesome, but it basically works. It would be nice if Tomcat had a more flexible classloading scheme that could be customized for situations like ours. I think that eventually I'll end up writing a custom bootstrap classloader for Tomcat that will allow for configurable library directories. Hopefully I'll be allowed to submit it back to the project. Good luck, -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 8:53 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? Thank you. -John -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:02 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:53 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found. However it is my understanding that Tomcat shouldn't require me to do this since all jars in that directory are loaded by Tomcat (aren't they?). This is an ugly workaround, but I thought it an interesting anomaly to pass on. -John Oh here's a thought I just had...is there a class trying to reference javax.servlet.Filter that was already explicitly on the classpath? The stuff in common/lib is higher up in the classloader hierarchy than the stuff on the base classpath is, so that might explain it. Hopefully that made sense... -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:26 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi again, This is the first install of Tomcat on this server (done about a month ago), and it is not presently running any jsp applications save the examples. I've set up a few contexts, but they're empty right now
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
-Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 10:35 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter you would need to keep in mind the security ramifications of such a change. you don't want someone to place any directory of jars in the list to be loaded where they could be accessed by any jsp dropped into a webapp. I'm afraid I don't really understand the threat here. How would that be different than just putting the jars into the common/lib directory? There's also directory/file permissions to think about for each external directory or jar to be maintained. Well, in my case, all I really want to do is effectively move the common/lib directory to a different location outside of the Tomcat directory structure. True that we would need to manage the permissions of that directory, but they wouldn't be any different from the permissions of tomcat/common/lib, or from the way they are set now, for that matter. Basically, all I'm saying is that it would be nice if you could configure the location of the directories that the Tomcat class loaders currently have hardcoded. Other than that, I'm not looking for any drastic changes. -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 Charlie -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 10:28 AM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi, John, Referring back to the class loader how-to, the classes on your system classpath are loaded in the bootstrap loader. Classes higher in the hierarchy cannot access classes lower in the hierarchy. I am in a very similar situation to you: we have classes that are shared between webapps and command line tools, that reside in a common, shared location. The compromise we've used is to include several of the Tomcat JARs on the system classpath used to launch the Tomcat JVM. Personally, I'm not particularly happy with this solution, as it makes classpath maintainance troublesome, but it basically works. It would be nice if Tomcat had a more flexible classloading scheme that could be customized for situations like ours. I think that eventually I'll end up writing a custom bootstrap classloader for Tomcat that will allow for configurable library directories. Hopefully I'll be allowed to submit it back to the project. Good luck, -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 8:53 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? Thank you. -John -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 4:02 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:53 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Well, in my case, all I really want to do is effectively move the common/lib directory to a different location outside of the Tomcat directory structure. True that we would need to manage the permissions of that directory, but they wouldn't be any different from the permissions of tomcat/common/lib, or from the way they are set now, for that matter. I have done the same thing, but I used a symbolic link to point to the new location of common/lib PLEASE READ: The information contained in this email is confidential and intended for the named recipient(s) only. If you are not an intended recipient of this email you must not copy, distribute or take any further action in reliance on it and you should delete it and notify the sender immediately. Email is not a secure method of communication and Nomura International plc cannot accept responsibility for the accuracy or completeness of this message or any attachment(s). Please examine this email for virus infection, for which Nomura International plc accepts no responsibility. If verification of this email is sought then please request a hard copy. Unless otherwise stated any views or opinions presented are solely those of the author and do not represent those of Nomura International plc. This email is intended for informational purposes only and is not a solicitation or offer to buy or sell securities or related financial instruments. Nomura International plc is regulated by the Financial Services Authority and is a member of the London Stock Exchange. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
-Original Message- From: Collins, Jim [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 11:05 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Well, in my case, all I really want to do is effectively move the common/lib directory to a different location outside of the Tomcat directory structure. True that we would need to manage the permissions of that directory, but they wouldn't be any different from the permissions of tomcat/common/lib, or from the way they are set now, for that matter. I have done the same thing, but I used a symbolic link to point to the new location of common/lib Well we have to deploy on Windows as well as Unix. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
On Fri, 24 Jan 2003, Lorenti, John wrote: Date: Fri, 24 Jan 2003 08:52:36 -0500 From: Lorenti, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? The standard Tomcat scripts ignore the classpath variable for a reason -- it is *way* to easy to get yourself into trouble, and this is just one of those ways. Classes on the class path (assuming you hacked the startup script to include some) are loaded from the system class loader, and therefore cannot see anything in common/lib (including servlet.jar). Therefore, you can't put a Filter, or anything else that implements from javax.servlet, in the class path. And, no, moving servlet.jar onto the class path someplace will just cause you other sorts of grief. My strong advice is to do what Tomcat wants you to do, and put your classes where it's looking for them. Thank you. -John Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Thank you, Craig. As you surmised, I'm not using the machine's environment classpath, but instead have hacked the startup to include my classes just within the Tomcat JVM. What you describe makes sense regarding the difference between the system class loader's classpath and the class loader Tomcat uses for /common/lib. As you advise, I'm moving the servlet related classes where Tomcat is expecting them to be and removing servlet.jar from the system loader's classpath. I'm still trying to keep my custom, non-servlet, classes (those shared by other applications on the machine besides Tomcat) located elsewhere and leaving them on the system loader's classpath. If this doesn't work out, however, I'll let Tomcat have all of the classes and take it from there. Thanks again. -John -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 12:54 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter On Fri, 24 Jan 2003, Lorenti, John wrote: Date: Fri, 24 Jan 2003 08:52:36 -0500 From: Lorenti, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Tim, Maybe what I've done is taboo :-( I've placed the top level directory that has all of our custom Java classes (shared by all applications on the machine) on the Tomcat classpath. Tomcat is finding my TestFilter class there (since I chose to leave the class there instead of placing it under the context's WEB-INF/classes directory) which in turn references javax.servlet.Filter. Since other applications besides those within Tomcat are using the common code, I'd like to keep it in one place outside of Tomcat's structure. However, from what you've mentioned, it seems that I may need to keep any Tomcat/Servlet specific classes where Tomcat is expecting them to reside and not depend upon the classpath. If this is the case, do you think that a Tomcat-friendly solution would be to separate my classes into two disjoint sets - one having anything related to servlets, and the other containing my common (non-Servlet specific) classes? The first set would live under the context's WEB-INF hierarchy, and the other set living on the classpath. If this can work, then maybe I can have my cake and eat it too. Is there a better/more preferred way to accomplish class sharing beyond Tomcat's purview? The standard Tomcat scripts ignore the classpath variable for a reason -- it is *way* to easy to get yourself into trouble, and this is just one of those ways. Classes on the class path (assuming you hacked the startup script to include some) are loaded from the system class loader, and therefore cannot see anything in common/lib (including servlet.jar). Therefore, you can't put a Filter, or anything else that implements from javax.servlet, in the class path. And, no, moving servlet.jar onto the class path someplace will just cause you other sorts of grief. My strong advice is to do what Tomcat wants you to do, and put your classes where it's looking for them. Thank you. -John Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Hi, Is there another servlet.jar file anywhere, e.g. under your webapp's WEB-INF/lib directory? There should only be one in the whole tomcat installation. Yoav Shapira Millennium ChemInformatics -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 7:51 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello, I'm trying to use Filters within Tomcat 4.1.12. When I start Tomcat, however, I get the following error message within the log the Filter application pertains to: 2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter TestFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1274) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationF ilte r Config.java:252) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati onFi l terConfig.java:314) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilt erCo n fig.java:120) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja va:3 1 39) at org.apache.catalina.core.StandardContext.start(StandardContext.java:352 8) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497 ) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java: 271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 9 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp l .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.jav a:24 5 ) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java :307 ) Here is the web.xml file: ?xml version='1.0' encoding='ISO-8859-1'? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameTestFilter/filter-name filter-classus.va.state.dcjs.server.TestFilter/filter-class /filter filter-mapping filter-nameTestFilter/filter-name url-pattern/ws/TRex.jsp/url-pattern /filter-mapping servlet servlet-nameError/servlet-name servlet-classus.va.state.dcjs.server.ErrorService/servlet- class /servlet servlet-mapping servlet-nameError/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping /web-app The servlet.jar file is within TOMCAT_HOME/common/lib and contains this class file. All of the examples run. Is there something else I need to configure before filters will work for
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
According to your web.xml your TestFilter class is in a package us.va.state.dcjs.server. This package should exist in your WEB-INF/classes directory of the appropriate webapp - so the full path to TestFilter should be $TOMCAT_HOME/yourWebapp/WEB-INF/classes/us/va/state/dcjs/server/ and in your TestFilter you should have the statement package us.va.state.dcjs.server; My apologies if you knew this already... Also, have you tried to manually compile TestFilter.java to see if there are no errors with the program? HTH Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 7:51 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello, I'm trying to use Filters within Tomcat 4.1.12. When I start Tomcat, however, I get the following error message within the log the Filter application pertains to: 2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter TestFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1274) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:252) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil terConfig.java:314) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon fig.java:120) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:31 39) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3528) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245 ) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307) Here is the web.xml file: ?xml version='1.0' encoding='ISO-8859-1'? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameTestFilter/filter-name filter-classus.va.state.dcjs.server.TestFilter/filter-class /filter filter-mapping filter-nameTestFilter/filter-name url-pattern/ws/TRex.jsp/url-pattern /filter-mapping servlet servlet-nameError/servlet-name
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Denise, Thank you for your input, but I believe that the (pre-compiled) class I wrote is being found. The first line of the stack trace seems to be indicating that the javax.servlet.Filter class cannot be found (which is within the servlet.jar file under TOMCAT_HOME/common/lib). I'm wondering why Tomcat isn't seeing the Filter class itself, particularly since the rest of the Servlet spec implementation classes appear to be visible. -John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 9:13 AM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter According to your web.xml your TestFilter class is in a package us.va.state.dcjs.server. This package should exist in your WEB-INF/classes directory of the appropriate webapp - so the full path to TestFilter should be $TOMCAT_HOME/yourWebapp/WEB-INF/classes/us/va/state/dcjs/server/ and in your TestFilter you should have the statement package us.va.state.dcjs.server; My apologies if you knew this already... Also, have you tried to manually compile TestFilter.java to see if there are no errors with the program? HTH Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 7:51 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello, I'm trying to use Filters within Tomcat 4.1.12. When I start Tomcat, however, I get the following error message within the log the Filter application pertains to: 2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter TestFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1274) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:252) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil terConfig.java:314) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon fig.java:120) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:31 39) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3528) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Yoav, There is just the single servlet.jar within the Tomcat installation. I even did a find on servlet.jar on the entire server; two others were found (one for Dell's OpenManager and the other for ColdFusion) but neither are on the classpath. Do you have any other thoughts? -John -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 8:57 AM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi, Is there another servlet.jar file anywhere, e.g. under your webapp's WEB-INF/lib directory? There should only be one in the whole tomcat installation. Yoav Shapira Millennium ChemInformatics -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 7:51 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello, I'm trying to use Filters within Tomcat 4.1.12. When I start Tomcat, however, I get the following error message within the log the Filter application pertains to: 2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter TestFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1274) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationF ilte r Config.java:252) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati onFi l terConfig.java:314) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilt erCo n fig.java:120) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja va:3 1 39) at org.apache.catalina.core.StandardContext.start(StandardContext.java:352 8) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497 ) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java: 271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 9 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp l .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.jav a:24 5 ) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java :307 ) Here is the web.xml file: ?xml version='1.0' encoding='ISO-8859-1'? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameTestFilter/filter-name filter-classus.va.state.dcjs.server.TestFilter/filter-class /filter filter-mapping filter-nameTestFilter/filter-name url-pattern/ws/TRex.jsp/url-pattern
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Howdy, Do you have any other thoughts? I have many thoughts ;) Most of which don't relate to your question unfortunately. Is there any possibility unpacked classes from the servlet.jar are scattered throughout your installation? Or that the servlet.jar file in your installation is NOT the version 2.3 jar? Doing a clean installation of tomcat in a different directory may help solve this. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
John, One (somewhat superstitious) thing: I have the following as my 2.3 DTD: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; and this works for me. In the past, I've found all sorts of wierd things happen as a result of slightly off DTDs - might be worth trying this one, just in case... D. -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 7:51 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello, I'm trying to use Filters within Tomcat 4.1.12. When I start Tomcat, however, I get the following error message within the log the Filter application pertains to: 2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter TestFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1274) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationF ilte r Config.java:252) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati onFi l terConfig.java:314) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilt erCo n fig.java:120) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja va:3 1 39) at org.apache.catalina.core.StandardContext.start(StandardContext.java:352 8) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497 ) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java: 271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 9 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp l .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.jav a:24 5 ) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java :307 ) Here is the web.xml file: ?xml version='1.0' encoding='ISO-8859-1'? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameTestFilter/filter-name filter-classus.va.state.dcjs.server.TestFilter/filter-class /filter filter-mapping filter-nameTestFilter/filter-name url-pattern/ws/TRex.jsp/url-pattern /filter-mapping servlet servlet-nameError/servlet-name servlet-classus.va.state.dcjs.server.ErrorService/servlet- class /servlet servlet-mapping servlet-nameError/servlet-name
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Hi again, This is the first install of Tomcat on this server (done about a month ago), and it is not presently running any jsp applications save the examples. I've set up a few contexts, but they're empty right now (except for this TestFilter in the /ws context), so I suspect the install is pretty clean. I too was curious about whether or not the servlet.jar was the correct version, so I listed the jar's table of contents and saw that the javax.servlet.Filter was present (so I'm guessing this is the 2.3 jar - dated 09/23/2002). Thanks again for you input. -John -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:40 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Howdy, Do you have any other thoughts? I have many thoughts ;) Most of which don't relate to your question unfortunately. Is there any possibility unpacked classes from the servlet.jar are scattered throughout your installation? Or that the servlet.jar file in your installation is NOT the version 2.3 jar? Doing a clean installation of tomcat in a different directory may help solve this. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
On Thu, 23 Jan 2003, Daniel Brown wrote: Date: Thu, 23 Jan 2003 17:59:29 - From: Daniel Brown [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter John, One (somewhat superstitious) thing: I have the following as my 2.3 DTD: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; and this works for me. In the past, I've found all sorts of wierd things happen as a result of slightly off DTDs - might be worth trying this one, just in case... D. -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 7:51 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello, I'm trying to use Filters within Tomcat 4.1.12. When I start Tomcat, however, I get the following error message within the log the Filter application pertains to: 2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter TestFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1274) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationF ilte r Config.java:252) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati onFi l terConfig.java:314) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilt erCo n fig.java:120) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja va:3 1 39) at org.apache.catalina.core.StandardContext.start(StandardContext.java:352 8) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497 ) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java: 271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 9 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp l .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.jav a:24 5 ) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java :307 ) Here is the web.xml file: ?xml version='1.0' encoding='ISO-8859-1'? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app filter filter-nameTestFilter/filter-name filter-classus.va.state.dcjs.server.TestFilter/filter-class /filter filter-mapping filter
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Daniel, If you follow your link, you'll see the following message: The file named http://java.sun.com/j2ee/dtds/web-app_2_3.dtd has been renamed to http://java.sun.com/dtd/web-app_2_3.dtd in the most current version of the specification. Please update your application to use the new name. You may want to change your web.xml files accordingly. Thanks for the thought. -John -Original Message- From: Daniel Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:59 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter John, One (somewhat superstitious) thing: I have the following as my 2.3 DTD: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; and this works for me. In the past, I've found all sorts of wierd things happen as a result of slightly off DTDs - might be worth trying this one, just in case... D. -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 7:51 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello, I'm trying to use Filters within Tomcat 4.1.12. When I start Tomcat, however, I get the following error message within the log the Filter application pertains to: 2003-01-22 16:11:36 StandardContext[/ws]: Exception starting filter TestFilter java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1340) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.ja v a:1274) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationF ilte r Config.java:252) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati onFi l terConfig.java:314) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilt erCo n fig.java:120) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja va:3 1 39) at org.apache.catalina.core.StandardContext.start(StandardContext.java:352 8) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497 ) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java: 271) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:3 9 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImp l .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.jav a:24 5 ) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java :307 ) Here is the web.xml file: ?xml version='1.0' encoding='ISO-8859-1'? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found. However it is my understanding that Tomcat shouldn't require me to do this since all jars in that directory are loaded by Tomcat (aren't they?). This is an ugly workaround, but I thought it an interesting anomaly to pass on. -John -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:26 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi again, This is the first install of Tomcat on this server (done about a month ago), and it is not presently running any jsp applications save the examples. I've set up a few contexts, but they're empty right now (except for this TestFilter in the /ws context), so I suspect the install is pretty clean. I too was curious about whether or not the servlet.jar was the correct version, so I listed the jar's table of contents and saw that the javax.servlet.Filter was present (so I'm guessing this is the 2.3 jar - dated 09/23/2002). Thanks again for you input. -John -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:40 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Howdy, Do you have any other thoughts? I have many thoughts ;) Most of which don't relate to your question unfortunately. Is there any possibility unpacked classes from the servlet.jar are scattered throughout your installation? Or that the servlet.jar file in your installation is NOT the version 2.3 jar? Doing a clean installation of tomcat in a different directory may help solve this. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
-Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:53 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hello all, After *explicitly* placing the TOMCAT_HOME/common/lib/servlet.jar on the Tomcat classpath the Filter class is found. However it is my understanding that Tomcat shouldn't require me to do this since all jars in that directory are loaded by Tomcat (aren't they?). This is an ugly workaround, but I thought it an interesting anomaly to pass on. -John Oh here's a thought I just had...is there a class trying to reference javax.servlet.Filter that was already explicitly on the classpath? The stuff in common/lib is higher up in the classloader hierarchy than the stuff on the base classpath is, so that might explain it. Hopefully that made sense... -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:26 PM To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Hi again, This is the first install of Tomcat on this server (done about a month ago), and it is not presently running any jsp applications save the examples. I've set up a few contexts, but they're empty right now (except for this TestFilter in the /ws context), so I suspect the install is pretty clean. I too was curious about whether or not the servlet.jar was the correct version, so I listed the jar's table of contents and saw that the javax.servlet.Filter was present (so I'm guessing this is the 2.3 jar - dated 09/23/2002). Thanks again for you input. -John -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:40 PM To: Tomcat Users List Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Howdy, Do you have any other thoughts? I have many thoughts ;) Most of which don't relate to your question unfortunately. Is there any possibility unpacked classes from the servlet.jar are scattered throughout your installation? Or that the servlet.jar file in your installation is NOT the version 2.3 jar? Doing a clean installation of tomcat in a different directory may help solve this. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/servlet/Filter
It's just a crazy, ever changing world. Thanks for the pointer :) -Original Message- From: Lorenti, John [mailto:[EMAIL PROTECTED]] Sent: 23 January 2003 19:52 To: 'Tomcat Users List' Subject: RE: java.lang.NoClassDefFoundError: javax/servlet/Filter Daniel, If you follow your link, you'll see the following message: The file named http://java.sun.com/j2ee/dtds/web-app_2_3.dtd has been renamed to http://java.sun.com/dtd/web-app_2_3.dtd in the most current version of the specification. Please update your application to use the new name. You may want to change your web.xml files accordingly. Thanks for the thought. -John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError-Con't find the Class in thesame p ackage?
import com.fis.Controller.*; should read: import com.fis.controller.*; in Composer.java, package com.fis.Controller; should read: package com.fis.controller; EVERYthing needs to be case-sensitive. cheers fillup On 5/3/02 2:52 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I've put a class struecture into Tomcat4_home/webapps/jds/WEB-INFO/classes the structure is: --classes (file: Find.class) --com --fis --controller (Controller.class, Composer.class) in Find.java: import com.fis.Controller.*; ... protected Controller controller =null; ... controller = new Controller(...); in Composer.java, package com.fis.Controller; Hi, I can't figure it out what is happening. please help. in Controller.java: package com.fis.Controller; private com.fis.Controller.Composer _composer = null; //Controller constructor: { _composer = new com.fis.Controller.Composer(..., ...); # ERROR LINE (line 104) .. } java.lang.NoClassDefFoundError: org/apache/xerces/dom/DOMExceptionImpl at com.fis.Controller.Controller.(Controller.java:104) at Find.init(Find.java:54) ... My Qestion is : Why the NoClassDefFoundError? the Controller.class and Composer.class is in the same package! Thank you very much. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError-Con't find the Class in thesame package?
Case sensitivity. Try this instead: //_composer = new com.fis.Controller.Composer(..., ...); # ERROR LINE _composer = new com.fis.controller.Composer(..., ...); # ERROR LINE Larry [EMAIL PROTECTED] 05/03/02 03:52PM I've put a class struecture into Tomcat4_home/webapps/jds/WEB-INFO/classes the structure is: --classes (file: Find.class) --com --fis --controller (Controller.class, Composer.class) in Find.java: import com.fis.Controller.*; ... protected Controller controller =null; ... controller = new Controller(...); in Composer.java, package com.fis.Controller; Hi, I can't figure it out what is happening. please help. in Controller.java: package com.fis.Controller; private com.fis.Controller.Composer _composer = null; //Controller constructor: { _composer = new com.fis.Controller.Composer(..., ...); # ERROR LINE (line 104) .. } java.lang.NoClassDefFoundError: org/apache/xerces/dom/DOMExceptionImpl at com.fis.Controller.Controller.(Controller.java:104) at Find.init(Find.java:54) ... My Qestion is : Why the NoClassDefFoundError? the Controller.class and Composer.class is in the same package! Thank you very much.
Re: java.lang.NoClassDefFoundError-Con't find the Class in the same package?
Apparently it cannot seem to find the class org/apache/xerces/dom/DOMExceptionImpl which is being referenced from com.fis.Controller.Controller class. See if you have xerces.jar under $CATALINA_HOME/common/lib. Also this maybe a typo on your part when composing your email but nevertheless, snip the structure is: --classes (file: Find.class) --com --fis --controller (Controller.class, Composer.class) /snip ^ (the c should be uppercase. Note C in the Controller package name in your javacode is in uppercase. RS [EMAIL PROTECTED] on 05/03/2002 04:52:25 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:java.lang.NoClassDefFoundError-Con't find the Class in the same package? I've put a class struecture into Tomcat4_home/webapps/jds/WEB-INFO/classes the structure is: --classes (file: Find.class) --com --fis --controller (Controller.class, Composer.class) in Find.java: import com.fis.Controller.*; ... protected Controller controller =null; ... controller = new Controller(...); in Composer.java, package com.fis.Controller; Hi, I can't figure it out what is happening. please help. in Controller.java: package com.fis.Controller; private com.fis.Controller.Composer _composer = null; //Controller constructor: { _composer = new com.fis.Controller.Composer(..., ...); # ERROR LINE (line 104) .. } java.lang.NoClassDefFoundError: org/apache/xerces/dom/DOMExceptionImpl at com.fis.Controller.Controller.(Controller.java:104) at Find.init(Find.java:54) ... My Qestion is : Why the NoClassDefFoundError? the Controller.class and Composer.class is in the same package! Thank you very much. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError-Con't find the Class in the same p ackage?
Thank you for you all. I'm sorry that the Controller indead starts with upercace C. I messed up when writing the email. I still didn't find out what want wrong. It is working befor on another machine under tomcat1 Thank you again. Yunming -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 6:04 PM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError-Con't find the Class in the same p ackage? Apparently it cannot seem to find the class org/apache/xerces/dom/DOMExceptionImpl which is being referenced from com.fis.Controller.Controller class. See if you have xerces.jar under $CATALINA_HOME/common/lib. Also this maybe a typo on your part when composing your email but nevertheless, snip the structure is: --classes (file: Find.class) --com --fis --controller (Controller.class, Composer.class) /snip ^ (the c should be uppercase. Note C in the Controller package name in your javacode is in uppercase. RS [EMAIL PROTECTED] on 05/03/2002 04:52:25 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:java.lang.NoClassDefFoundError-Con't find the Class in the same package? I've put a class struecture into Tomcat4_home/webapps/jds/WEB-INFO/classes the structure is: --classes (file: Find.class) --com --fis --controller (Controller.class, Composer.class) in Find.java: import com.fis.Controller.*; ... protected Controller controller =null; ... controller = new Controller(...); in Composer.java, package com.fis.Controller; Hi, I can't figure it out what is happening. please help. in Controller.java: package com.fis.Controller; private com.fis.Controller.Composer _composer = null; //Controller constructor: { _composer = new com.fis.Controller.Composer(..., ...); # ERROR LINE (line 104) .. } java.lang.NoClassDefFoundError: org/apache/xerces/dom/DOMExceptionImpl at com.fis.Controller.Controller.(Controller.java:104) at Find.init(Find.java:54) ... My Qestion is : Why the NoClassDefFoundError? the Controller.class and Composer.class is in the same package! Thank you very much. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError
I had a similar problem a few days ago when one of my class located under common/lib was implementing an interface defined in a jar located under WEB-INF/lib, this gives a java.lang.NoClassDefFoundError since the common/lib classloader can't access the jar located under WEB-INF/lib to check the class signature... Hope this helps. Korakaki Stella wrote: I've placed my servlet in the directory : $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/Login.class and I've written the following at the $CATALINA_HOME/webapps/ROOT/WEB-INF/web.xml : ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-name login /servlet-name servlet-class Login /servlet-class /servlet /web-app . Also, I've placed my .jar file at the directory : $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/jCo.jar . When I try to reach the address http://localhost/servlet/login it seems that tomcat can't find my .jar file. I've tried a simple servlet with no specific dependencies and worked fine. Please someone tell me what to do in order to have my servlet working... Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError
Try using the following in your web.xml file. I added the servlet-mapping tags. web-app servlet servlet-name login /servlet-name servlet-class Login /servlet-class /servlet servlet-mapping servlet-namelogin/servlet-name url-pattern/login/url-pattern /servlet-mapping /web-app -Original Message- From: Jean-pierre Cartal [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 12:33 PM To: Tomcat Users List Subject: Re: java.lang.NoClassDefFoundError I had a similar problem a few days ago when one of my class located under common/lib was implementing an interface defined in a jar located under WEB-INF/lib, this gives a java.lang.NoClassDefFoundError since the common/lib classloader can't access the jar located under WEB-INF/lib to check the class signature... Hope this helps. Korakaki Stella wrote: I've placed my servlet in the directory : $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/Login.class and I've written the following at the $CATALINA_HOME/webapps/ROOT/WEB-INF/web.xml : ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-name login /servlet-name servlet-class Login /servlet-class /servlet /web-app . Also, I've placed my .jar file at the directory : $CATALINA_HOME/webapps/ROOT/WEB-INF/lib/jCo.jar . When I try to reach the address http://localhost/servlet/login it seems that tomcat can't find my .jar file. I've tried a simple servlet with no specific dependencies and worked fine. Please someone tell me what to do in order to have my servlet working... Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError (help a newbie plz...)
U have to put the compiled class of HitCountBean(HitCountBean.class) in WEB-INF/classes/hit Karthik -Original Message- From: Claudiu Bran [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 10:09 PM To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError (help a newbie plz...) I have a simple .jsp which wants to use a bean named HitCountBean, but upon execution I get Internal Servlet Error: javax.servlet.ServletException: hit/HitCountBean [...] Root Cause: java.lang.NoClassDefFoundError: hit/HitCountBean [...] Here is HitCountBean.jsp, located in /var/tomcat/webapps/myex/ jsp:useBean id=counter scope=application class=hit.HitCountBean / jsp:setProperty name=counter property=newSession value=%= session.isNew() % / [...] And this is HitCountBean.java located in /var/tomcat/webapps/myex/WEB-INF/classes/hit/ package hit; import java.util.Date; import java.text.DateFormat; import java.io.Serializable; public class HitCountBean implements Serializable { private boolean b; private int hitCount; private String serverStart; private Date date = new Date(); [...] } So, what do I have to do, where do I have to put HitCountBean.java ? Thanks in advance PS: I am *very* newbie to jsp, java. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError (help a newbie plz...)
Thanks Karthik ! I thought tomcat will compile it, lol. Anyway, I compiled it, and it works, thanks a lot :) From: Karthikeyan.K.V [EMAIL PROTECTED] U have to put the compiled class of HitCountBean(HitCountBean.class) in WEB-INF/classes/hit Karthik -Original Message- From: Claudiu Bran [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 10:09 PM To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError (help a newbie plz...) I have a simple .jsp which wants to use a bean named HitCountBean, but upon execution I get Internal Servlet Error: javax.servlet.ServletException: hit/HitCountBean [...] Root Cause: java.lang.NoClassDefFoundError: hit/HitCountBean [...] Here is HitCountBean.jsp, located in /var/tomcat/webapps/myex/ jsp:useBean id=counter scope=application class=hit.HitCountBean / jsp:setProperty name=counter property=newSession value=%= session.isNew() % / [...] And this is HitCountBean.java located in /var/tomcat/webapps/myex/WEB-INF/classes/hit/ package hit; import java.util.Date; import java.text.DateFormat; import java.io.Serializable; public class HitCountBean implements Serializable { private boolean b; private int hitCount; private String serverStart; private Date date = new Date(); [...] } So, what do I have to do, where do I have to put HitCountBean.java ? Thanks in advance PS: I am *very* newbie to jsp, java. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] ### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError .....Loading a servlet
Hi, try to put your web.xml in WEB-INF Where are your class files ? Regards Alex At 13:48 23/11/2001 -0800, you wrote: Hi all, I'm a newcommer to this list and am having problem with loading servlets. I have a java Package which contains a this package and the servlet. Now on tomcat i want to run this servlet. I have created a directory in webapps and specified the path to this servlet in server.xml and in web.xml(in META-INF/). Still the classloader is unable to find the path to this servlet. Can u give me an idea as to where i might be going wrong?? regards, Anjana Sharma -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: java.lang.NoClassDefFoundError: javax/mail/Message
Fixed. I sabotaged myself because I forgot to make changes to one of my .properties files. This was because my copy of 4.0b1 runs as a standalone, and 3.2.1 runs on IIS out-process which means the wrapper.properties file I was editing was the wrong one. Still, it looks like 4.0b1 is doing something more intelligent when it comes to the CLASSPATH. Anthony -Original Message- From: Anthony Martin Sent: Tuesday, April 10, 2001 8:24 AM To: '[EMAIL PROTECTED]' Subject: java.lang.NoClassDefFoundError: javax/mail/Message On Tomat 3.2.1, I get the following error message. I was trying to use the JavaMail package from sun. java.lang.NoClassDefFoundError: javax/mail/Message When I tried the *exact* same code on a copy of Tomcat 4.0b1, it worked like a champ. Any idea as to what is different about the classpath that makes Tomcat 4 work and not the older version? I'd really like to get it to work on the older version. Anthony It is by caffeine alone I set my mind in motion. It is by the Beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.
Re: java.lang.NoClassDefFoundError: sun/tools/javac/Main
You need to include the $JAVA_HOME/lib/tools.jar file in your CLASSPATH... At least in java 2, the tools.jar file contains the sun.tools.javac.Main class. I am not sure where it is in JDK 1.1.x Cheers Jason Nael Mohammad wrote: In English, what does this error mean. I suspect that it is looking for a java class which it can't find. Help People. What is the next logical step here? I don't want tomcat acting as an HTTP server, just jserv. What do I need to do? javax.servlet.ServletException: sun/tools/javac/Main at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(Compiled Code) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compi led Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) Root cause: java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(Compiled Code) at org.apache.jasper.compiler.Compiler.compile(Compiled Code) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compi led Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Jason Pell Senior Analyst/Programmer - Web Developer Deakin Software Services Pty Ltd 12 Gheringhap St, Geelong Victoria 3220 Australia Phone: 03 5227 8858 International: +61 3 5227 8858 Fax: 03 5227 8907 International: +61 3 5227 8907 E-mail [EMAIL PROTECTED] http://www.dssonline.com.au Customer Support Hotline: 1800 620 497 "Callista - the brightest solution in university management" --- Important Notice: The contents of this email transmission, including attachments, may be privileged and confidential. Any unauthorised use of the contents is expressly prohibited. If you have received this transmission in error, please advise the sender by return email or telephone immediately and destroy all versions. --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: java.lang.NoClassDefFoundError: sun/tools/javac/Main
Perhaps specify $JAVA_HOME environment variable so it can find this stuff. On unix, you could include it in your run script. Not sure. jason Nael Mohammad wrote: In English, what does this error mean. I suspect that it is looking for a java class which it can't find. Help People. What is the next logical step here? I don't want tomcat acting as an HTTP server, just jserv. What do I need to do? javax.servlet.ServletException: sun/tools/javac/Main at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(Compiled Code) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compi led Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) Root cause: java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(Compiled Code) at org.apache.jasper.compiler.Compiler.compile(Compiled Code) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code) at org.apache.jasper.servlet.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compi led Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Thread.java:479) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Jason Pell Senior Analyst/Programmer - Web Developer Deakin Software Services Pty Ltd 12 Gheringhap St, Geelong Victoria 3220 Australia Phone: 03 5227 8858 International: +61 3 5227 8858 Fax: 03 5227 8907 International: +61 3 5227 8907 E-mail [EMAIL PROTECTED] http://www.dssonline.com.au Customer Support Hotline: 1800 620 497 "Callista - the brightest solution in university management" --- Important Notice: The contents of this email transmission, including attachments, may be privileged and confidential. Any unauthorised use of the contents is expressly prohibited. If you have received this transmission in error, please advise the sender by return email or telephone immediately and destroy all versions. --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]