Can't start tomcat: java.lang.NoClassDefFoundError: org/apache/tomcat/util/log/SystemLogHandler
Hello! I've been searching on the web for someone with a similar problem, but I had no success. I hope someone of you can help! I have a Mandriva Linux system, running the latest Java VM (JDK 1.5). I downloaded Tomcat 5.5.9, and it works fine when executed from a local account. Nevertheless, when trying to run it from a (NIS) remote account, which actually acceses its home directory via NFS, I get the following error: java.lang.NoClassDefFoundError: org/apache/tomcat/util/log/SystemLogHandler at java.lang.Class.getDeclaredConstructors0 (Native Method) at java.lang.Class.privateGetDeclaredConstructors (Class.java:2328) at java.lang.Class.getConstructor0 (Class.java:2640) at java.lang.Class.newInstance0 (Class.java:321) at java.lang.Class.newInstance (Class.java:303) at org.apache.catalina.startup.Bootstrap.init (Bootstrap.java:201) at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:386) I don't know if the problem lies on the environment variables, or file permissions, or what! Can anyone of you help me on this? Thanx Carlos F. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
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
java.lang.NoClassDefFoundError
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]
java.lang.NoClassDefFoundError: org/apache/tools/ant/types/RedirectorElement
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: 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: Tomcat Error: java.lang.NoClassDefFoundError:
Hi QM, Thanks for your response. In between Tomcat working and breaking, I had installed Cactus. I think that actually changed something, somewhere on the classpath which wasn't actually in tomcat's directory structure. When I reinstalled tomcat, I did completely remove it, then reinstall. I've managed to fix the problem now, by removing my Java SDK and reinstalling that. Not the world's greatest solution, but it worked. And, yes, that was the full stack trace from catalina.out. The root cause was the java.lang.NoClassDefFoundError. Thanks for your help, Kathie. -- Forwarded message -- From: QM [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Date: Thu, 20 Jan 2005 05:55:09 -0600 Subject: Re: Tomcat Error: java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission On Thu, Jan 20, 2005 at 10:01:18AM +1100, Kathie Manson wrote: : Up until yesterday, I was happily running tomcat 4.1.30. Then, for : some reason, I started getting this error. I'm not sure why. It's : likely that I somehow changed the class path, or installed something : else that affected some other java classes, but I just don't know how : to fix it. At the risk of sounding flippant, try to think of what has changed recently. Can you check your backups and compare that list of JAR files (or even /classes dirs) to what's installed on the server? -and when you say you reinstalled Tomcat, how dod you do it? Did you remove the old version, then replace it with the new version? or did you overwrite the old with the new? In the latter case, any rogue (extra) JARs that are lying around won't be affected. Finally, are you certain that's the full stack trace? Those usually come with a Root Cause section that can be quite helpful. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Error: java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission
On Thu, Jan 20, 2005 at 10:01:18AM +1100, Kathie Manson wrote: : Up until yesterday, I was happily running tomcat 4.1.30. Then, for : some reason, I started getting this error. I'm not sure why. It's : likely that I somehow changed the class path, or installed something : else that affected some other java classes, but I just don't know how : to fix it. At the risk of sounding flippant, try to think of what has changed recently. Can you check your backups and compare that list of JAR files (or even /classes dirs) to what's installed on the server? -and when you say you reinstalled Tomcat, how dod you do it? Did you remove the old version, then replace it with the new version? or did you overwrite the old with the new? In the latter case, any rogue (extra) JARs that are lying around won't be affected. Finally, are you certain that's the full stack trace? Those usually come with a Root Cause section that can be quite helpful. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Error: java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission
Hi, Up until yesterday, I was happily running tomcat 4.1.30. Then, for some reason, I started getting this error. I'm not sure why. It's likely that I somehow changed the class path, or installed something else that affected some other java classes, but I just don't know how to fix it. So, the full trace in catalina.out is: * Starting service Tomcat-Standalone Apache Tomcat/4.1.30 - End event threw exception java.lang.reflect.InvocationTargetException 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.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252) at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256) at org.apache.commons.digester.Rule.end(Rule.java:276) at org.apache.commons.digester.Digester.endElement(Digester.java:1058) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:385) at org.apache.catalina.core.StandardHost.install(StandardHost.java:819) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:442) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) 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)Caused by: java.lang.NoClassDefFoundError: org/apache/naming/JndiPermission at org.apache.naming.resources.DirContextURLStreamHandler.openConnection(DirContextURLStreamHandler.java:135) at java.net.URL.openConnection(URL.java:896) at sun.net.www.protocol.jar.JarURLConnection.init(JarURLConnection.java:64) at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24) at java.net.URL.openConnection(URL.java:896) at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:903) at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3587) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.addChild
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.java:856) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java: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(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) 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.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:199) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(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.java:127) 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.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) I've set up the CLASSPATH for net.sourceforge.jradiusclient.RadiusAttribute. Can anyone help figure out what's the pb? Thank's a lot NzM
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]
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.processConnection(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java: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.processConnection(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) java.lang.Thread.run(Thread.java:534)
java.lang.NoClassDefFoundError on invocation of a native method
Hi All, I am new to JNI and Servlets and I am facing one of the infamous problems, which is not getting resolved even after lot of debugging and setup changes. We are using Struts framework and Tomcat 4.X In one of our service implementations, which is invoked from an action class, we are using native code, which fails to load external classes. This class is already present in the web application's lib directory (web-app/WEB-INF/lib) in the form of a jar file. But even then the native code failed to load. When looked at the documentation of FindClass present in jni.h, it said that it will search for the classes in the elements specified in the CLASSPATH variable. So I have included that jar file int the CLASSPATH, in the tomcat startup.sh script, but no luck. It gave rise to one more new error and could not load the ActionServlet itself java.lang.NoClassDefFoundError: org/apache/struts/action/ActionServlet at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:488) . . . 1) Has anyone encountered this kind of problem. If yes, could you please let me know what could be the probable reason for this, and what can be done to avoid this problem. 2) Typically, where should these native code accessible classes be placed and what is the kind of configuration setup we have to do so that these classes will be picked up by the native code. Thanks a lot for your time. Regards Tejo __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.NoClassDefFoundError: javax/mail/Address
Hi there, this is little bit about java, so it should not be here at the first view. I'm sorry for it. But on the second view: This error is seen when I want to initialize object that use some classes from javax.mail package for example javax.mail.Message). I don't have import javax.mail.Address written in this object. This object could look like: package com.sporak.MyObject; import javax.mail.Session; import javax.mail.Transport; import javax.mail.Message; import javax.mail.internet.MimeMessage; import javax.mail.internet.InternetAddress; public class MyObject { private int id; public MyObject() { } public int getId() {...} public void setId() {...} } When I want to create new object in action class by the expression: line 29: MyObject o = new MyObject(); The tomcat starts to notifing me an error: java.lang.NoClassDefFoundError: javax/mail/Address com.sporak.MyAction.execute(MyAction.java:29) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) ... This is not only about java, I think, since this MyAction and this MyObject worked fine in previous versions of TomCat. Few days ago I've updated TomCat to 5.0.19 version and this error occures. Interesting is, that: - in WEB-INF/lib I have j2ee.jar libary with requested class file (Address.class) - all other classes from javax.mail package are found and used correctly - in TomCat 4.1 it works fine, in TomCat 5.0.19 it doesn't work at all Please, is there anybody, that had had a similiar problem and solved it? Please does anybody know how to walk throught it? Thanks for helping. Best Regards Honza Spurny - 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]
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]
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]
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]
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]
java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
Hi, Any help will be greatly appreciated. My current server has the following environment: Tomcat Version = Apache Tomcat/5.0.12 JVM Version = 1.4.2-b28 JVM Vendor = Sun Microsystems Inc. Redhat Linux 9 OS Name = Linux OS Version = 2.4.20-8 OS Architecture = i386 Tag Library = 1.1 Profile setup (selected): CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/*.jar:$JAVA_HOME/jre/lib/*.jar:$AXISCLASSPATH AXISCLASSPATH=$AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery.jar:$AXIS_LIB/commons-logging.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/log4j-1.2.8.jar:$CATALINA_HOME/common/endorsed/xercesImpl.jar:$CATALINA_HOME/common/endorsed/xml-apis.jar:$CATALINA_HOME/common/endorsed/xmlParserAPIs.jar:$AXIS_LIB/wsdl4j.jar:$CATALINA_HOME/common/lib/activation.jar servlet-api.jar can be found in CATALINA_HOME/common/lib I'm trying to run JSP applications that uses JSTL but I get this error all the time. I get the same error even while running the simplest JSTL application. Here is the Server Error that I get: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: javax/servlet/jsp/tagext/TagLibraryValidator org.apache.jasper.servlet.JspServlet.service(JspServlet.java:256) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator java.lang.ClassLoader.defineClass0(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:537) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) java.net.URLClassLoader.defineClass(URLClassLoader.java:251) java.net.URLClassLoader.access$100(URLClassLoader.java:55) java.net.URLClassLoader$1.run(URLClassLoader.java:194) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:187) java.lang.ClassLoader.loadClass(ClassLoader.java:289) java.lang.ClassLoader.loadClass(ClassLoader.java:235) java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) java.lang.ClassLoader.defineClass0(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:537) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) java.net.URLClassLoader.defineClass(URLClassLoader.java:251) java.net.URLClassLoader.access$100(URLClassLoader.java:55) java.net.URLClassLoader$1.run(URLClassLoader.java:194) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:187) java.lang.ClassLoader.loadClass(ClassLoader.java:289) java.lang.ClassLoader.loadClass(ClassLoader.java:282) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) java.lang.ClassLoader.loadClass(ClassLoader.java:235) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1278) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1212) org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:654) org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:293) org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:204) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:525) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1625) org.apache.jasper.compiler.Parser.parse(Parser.java:173) org.apache.jasper.compiler.ParserController.parse(ParserController.java:247) org.apache.jasper.compiler.ParserController.parse(ParserController.java:149) org.apache.jasper.compiler.ParserController.parse(ParserController.java:135) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:243) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:437) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
how to solve java.lang.NoClassDefFoundError
Can anyone tell me what this meens, and how to solve. This error accurse when I try to connect to a firebird db, using firebirdsql-full.jar Root cause: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at _0002fconnect_00033_0002ejspconnect3_jsp_20._jspService(_0002fconnect_00033_ 0002ejspconnect3_jsp_20.java:82) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) Greetz Richard Drent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to solve java.lang.NoClassDefFoundError
Hi Richard, Your problem might be related to the driver class not available in your classpath. You can find the exact cause by looking at the _0002fconnect_00033_0002ejspconnect3_jsp_20.java:82) at line no. 82. Look at tomcat_home/work/../localhost/yourwebapp/jsp/_0002fconnect_00033_0002ejspcon nect3_jsp_20.java Can you check if your dependent jar (firebirdsql-full.jar) is placed under WEB-INF/lib folder. Placing dependent jar files here must solve your problems. hope it could help. regards SM -Original Message- From: Richard Drent (Drent IT BV) [mailto:[EMAIL PROTECTED] Sent: Monday, October 13, 2003 10:52 AM To: 'Tomcat Users List' Subject: how to solve java.lang.NoClassDefFoundError Can anyone tell me what this meens, and how to solve. This error accurse when I try to connect to a firebird db, using firebirdsql-full.jar Root cause: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at _0002fconnect_00033_0002ejspconnect3_jsp_20._jspService(_0002fconnect_00033_ 0002ejspconnect3_jsp_20.java:82) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) Greetz Richard Drent - 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: how to solve java.lang.NoClassDefFoundError
Ok On line 82 is this //Load driver Class.forName(org.firebirdsql.jdbc.FBDriver); And the firebird Jar files are placed in /virtual site/WEB-INF/lib -rwxrwxrwx1 adminsite1 115509 Oct 9 09:04 firebirdjmx.jar -rwxrwxrwx1 adminsite1 336637 Oct 9 09:04 firebirdsql-full.jar -rwxrwxrwx1 adminsite1 308739 Oct 9 09:04 firebirdsql.jar -rwxrwxrwx1 adminsite1 133067 Oct 9 09:04 firebirdsql-test.jar -rwxrwxrwx1 adminsite1 104195 Oct 9 13:34 jaas.jar -rwxrwxrwx1 adminsite1 66624 Oct 9 13:34 log4j-core.jar -rwxrwxrwx1 adminsite16473 Oct 9 13:34 mini-concurrent.jar -rwxrwxrwx1 adminsite1 22200 Oct 9 13:34 mini-j2ee.jar and I placed them in /usr/java/Jakarta-tomcat/lib/ -rwxrwxr-x1 root root 330474 Oct 11 23:00 ant.jar -rwxrwxr-x1 root root 336637 Oct 11 23:00 firebirdsql-full.jar -rwxrwxr-x1 root root 308739 Oct 11 23:00 firebirdsql.jar -rwxrwxr-x1 root root 104195 Oct 11 23:00 jaas.jar -rwxrwxr-x1 root root 217958 Oct 11 23:00 jasper.jar -rwxrwxr-x1 root root 5618 Oct 11 23:00 jaxp.jar -rwxrwxr-x1 root root66624 Oct 11 23:00 log4j-core.jar -rwxrwxr-x1 root root 6473 Oct 11 23:00 mini-concurrent.jar -rwxrwxr-x1 root root22200 Oct 11 23:00 mini-j2ee.jar drwxrwxr-x2 root root 4096 Oct 11 16:38 oud -rwxrwxr-x1 root root 136133 Oct 11 23:00 parser.jar -rwxrwxr-x1 root root40813 Oct 11 23:00 servlet.jar drwxrwxrwx3 root root 19 Aug 26 21:34 test -rwxrwxr-x1 root root 431743 Oct 11 23:00 webserver.jar is me be then the driver name (org.firebirdsql.jdbc.FBDriver) incorrect thnx Richard Hi Richard, Your problem might be related to the driver class not available in your classpath. You can find the exact cause by looking at the _0002fconnect_00033_0002ejspconnect3_jsp_20.java:82) at line no. 82. Look at tomcat_home/work/../localhost/yourwebapp/jsp/_0002fconnect_00033_0002ejspcon nect3_jsp_20.java Can you check if your dependent jar (firebirdsql-full.jar) is placed under WEB-INF/lib folder. Placing dependent jar files here must solve your problems. hope it could help. regards SM -Original Message- From: Richard Drent (Drent IT BV) [mailto:[EMAIL PROTECTED] Sent: Monday, October 13, 2003 10:52 AM To: 'Tomcat Users List' Subject: how to solve java.lang.NoClassDefFoundError Can anyone tell me what this meens, and how to solve. This error accurse when I try to connect to a firebird db, using firebirdsql-full.jar Root cause: java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at _0002fconnect_00033_0002ejspconnect3_jsp_20._jspService(_0002fconnect_00033_ 0002ejspconnect3_jsp_20.java:82) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) Greetz Richard Drent - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to solve java.lang.NoClassDefFoundError
On line 82 is this //Load driver Class.forName(org.firebirdsql.jdbc.FBDriver); I cant tell you if you are using the correct package name for FBDriver.class. Well it would be wise enough if you could look into these jars below by exploding/opening it. Package declration and Driver class must be the ones that you use in your application page. -rwxrwxrwx1 adminsite1 336637 Oct 9 09:04 firebirdsql-full.jar -rwxrwxrwx1 adminsite1 308739 Oct 9 09:04 firebirdsql.jar all seems fine to me. - 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: unexpected java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
At 10:07 AM 8/8/2003, Jean-Francois Arcand wrote: This plug-in is for which version? The plugin itself is from Sean Taylor (http://www.objectorientedsoftware.com/projects/index.html). I'm using IDEA v. 3.0.4 Can you post the entire stack trace? Exception during startup processing java.lang.reflect.InvocationTargetException 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) Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration at java.lang.ClassLoader.findBootstrapClass(Native Method) at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:723) at java.lang.ClassLoader.loadClass(ClassLoader.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:292) 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 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1097) at org.apache.catalina.core.StandardService.initialize(StandardService.java:579) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) at org.apache.catalina.startup.Catalina.start(Catalina.java:511) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) ... 5 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unexpected java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
I'm trying to integrate a custom compiled Tomcat 4.1.27 with Intellj IDEA (using a third-party plugin allowing invocation of Tomcat 4.1 from inside IDEA). Tomcat quits almost immediately with the following exception: java.lang.reflect.InvocationTargetException 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) Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration at java.lang.ClassLoader.findBootstrapClass(Native Method) at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:723) at java.lang.ClassLoader.loadClass(ClassLoader.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:292) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) [...] I know for a fact that MBeanRegistration class is available as part of mx4j-jmx.jar package. Below is included the entire command line that IDEA uses to start Tomcat. Any thoughts on what might be causing this? I've found a post suggesting that the culprit might be -Djava.endorsed.dirs. Is there any merit to this claim? Thanks Dmitry C:\java\j2sdk1.4.1_02\bin\javaw.exe -Djava.endorsed.dirs=c:\projects\jakarta-tomcat-4.1.27-src\build\bin;c:\projects\jakarta-tomcat-4.1.27-src\build\common\libc:\projects\jakarta-tomcat-4.1.27-src\build\common\endorsed -Dcatalina.base=C:\Documents and Settings\dberansky\.IntelliJIdea\system\tomcat_JCMS_bbf5da37 -Dcatalina.home=c:\projects\jakarta-tomcat-4.1.27-src\build -Djava.io.tmpdir=c:\projects\jakarta-tomcat-4.1.27-src\build\temp -classpath C:\java\j2sdk1.4.1_02\lib\tools.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\bin\bootstrap.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\activation.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\ant.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-collections.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-dbcp.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-logging-api.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-pool.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jasper-compiler.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jasper-runtime.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jdbc2_0-stdext.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jndi.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jta-spec1_0_1.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\mail.jar;c:\projects\jakarta-tomcat-4.1.2! 7-src\ b uild\common\lib\naming-common.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\naming-factory.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\naming-resources.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\servlet.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\catalina-ant.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\catalina.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-beanutils.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-digester.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-fileupload-1.0.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-logging.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-modeler.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\jaas.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\jakarta-regexp-1.2.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\mx4j-jmx.jar;c:\! projec t s\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-common.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-default.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-invoker.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-manager.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-webdav.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-coyote.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-http11.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-jk.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-jk2.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-util.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-warp.jar org.apache.catalina.startup.Bootstrap start - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unexpected java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
Sheesh! Turned out, I was compiling Tomcat 4 against the wrong cvs branch of jakarta-tomcat-connectors. Once I checked out the TOMCAT_4_1_27 branch and recompiled, the error went away. Thanks for your help Dmitry At 10:39 AM 8/8/2003, Jeanfrancois.Arcand wrote: Try adding the mx4j jar file to the classpath command line to see if it work. Or start using Netbeans or Eclipse (just kidding :-) ) -- Jeanfrancois - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
Hi, I can't start up a particular 3rd party webapp, I get the expection java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet. I made sure that only one servlet.jar exists in my tomcat directory structure. I'm using a clean install of Tomcat 4.1.27 and to install the webapp I just copied the .war file into the webapps folder, tomcat expanded it but couldn't install it. Thanks, -Brian Wedel Here is the error from the log file... 2003-08-06 14:07:55 HostConfig[localhost] Error deploying web application directory mapxtreme45 java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet 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 java.lang.ClassLoader.loadClass(ClassLoader.java:292) 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:1356) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1289) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88 5) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3421) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3609) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 21) 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(StandardHostDeployer.j ava:307) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:559 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.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:2190) 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) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.lang.NoClassDefFoundError: org/xml/sax/XMLReader
Hello, I'm trying to run the latest version of FOP (0.20) on Tomcat 3.2, by following the instructions in http://xml.apache.org/fop/servlets.html When I run the servlet, I get the error java.lang.NoClassDefFoundError: org/xml/sax/XMLReader at FopServlet.renderFO(Unknown Source) at FopServlet.doGet(Unknown Source I think my classpath is set up, but can someone clarify the steps for me again? I'm relatively new to servlets so I may have missed an obvious step. Thanks, Kenneth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More java.lang.NoClassDefFoundError
If Tomcat needs the classes at runtime, then they should be under CATALINA_HOME. If you need those same classes at compile time, then the CLASSPATH should be updated to point to the location under CATALINA_HOME where the classes reside. John On Fri, 11 Jul 2003 20:03:03 -0700, [EMAIL PROTECTED] wrote: OK, I'm going a little (more) crazy here. I *think* that the problem might be that the mail stuff is the very first use I've made of a J2EE component. The code is compiled with a CLASSPATH which includes x:\usr\local\j2ee\j2ee.jar. The standalone code runs fine, and presumably at runtime it finds the same j2ee.jar and that includes javax.mail.* When I first started having problems I think that they were ClassNotFound, and I was advised to put mail.jar into TOMCAT_HOME\lib. I found a copy and did that. However, mail.jar is (I think) older than j2ee.jar (the classes are probably different anyway), and contains (some) of the same classes as j2ee.jar. If the above is correct, where should the j2ee.jar file go? And once I move it, I should update the CLASSPATH to point to the same spot, right? Regards, Terry Fuller [EMAIL PROTECTED] --- In [EMAIL PROTECTED], on 07/11/2003 at 12:51 PM, John Turner [EMAIL PROTECTED] said: It means that the class you told your servlet to use is not the class that it is actually finding. Typically, this means that you have more than one copy of a JAR file (like servlet.jar) in Tomcat's ClassLoader path, and Tomcat is telling you that it doesn't know which one to use. John On Thu, 10 Jul 2003 22:09:01 -0700, [EMAIL PROTECTED] wrote: Well, I'm back again for some help. I'm running Java 1.3.1, Tomcat 3.3.1 I have a small proof of concept java program which uses javax.mail and which successfully sends off a note. When I incorporate the proof of concept code into a servlet, I get: java.lang.NoClassDefFoundError: javax/activation/DataSource What am I missing that the straight Java code runs but the servlet can't seem to find the parts used by the proof code? Is there a general approach for dealing with NoClassDef errors? I know that the message indicates something other than ClassNotFound, but what really does it mean? Pointers to existing doc gratefully received. Thanks! Regards, Terry Fuller [EMAIL PROTECTED] --- - 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] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More java.lang.NoClassDefFoundError
It means that the class you told your servlet to use is not the class that it is actually finding. Typically, this means that you have more than one copy of a JAR file (like servlet.jar) in Tomcat's ClassLoader path, and Tomcat is telling you that it doesn't know which one to use. John On Thu, 10 Jul 2003 22:09:01 -0700, [EMAIL PROTECTED] wrote: Well, I'm back again for some help. I'm running Java 1.3.1, Tomcat 3.3.1 I have a small proof of concept java program which uses javax.mail and which successfully sends off a note. When I incorporate the proof of concept code into a servlet, I get: java.lang.NoClassDefFoundError: javax/activation/DataSource What am I missing that the straight Java code runs but the servlet can't seem to find the parts used by the proof code? Is there a general approach for dealing with NoClassDef errors? I know that the message indicates something other than ClassNotFound, but what really does it mean? Pointers to existing doc gratefully received. Thanks! Regards, Terry Fuller [EMAIL PROTECTED] --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More java.lang.NoClassDefFoundError
OK, I'm going a little (more) crazy here. I *think* that the problem might be that the mail stuff is the very first use I've made of a J2EE component. The code is compiled with a CLASSPATH which includes x:\usr\local\j2ee\j2ee.jar. The standalone code runs fine, and presumably at runtime it finds the same j2ee.jar and that includes javax.mail.* When I first started having problems I think that they were ClassNotFound, and I was advised to put mail.jar into TOMCAT_HOME\lib. I found a copy and did that. However, mail.jar is (I think) older than j2ee.jar (the classes are probably different anyway), and contains (some) of the same classes as j2ee.jar. If the above is correct, where should the j2ee.jar file go? And once I move it, I should update the CLASSPATH to point to the same spot, right? Regards, Terry Fuller [EMAIL PROTECTED] --- In [EMAIL PROTECTED], on 07/11/2003 at 12:51 PM, John Turner [EMAIL PROTECTED] said: It means that the class you told your servlet to use is not the class that it is actually finding. Typically, this means that you have more than one copy of a JAR file (like servlet.jar) in Tomcat's ClassLoader path, and Tomcat is telling you that it doesn't know which one to use. John On Thu, 10 Jul 2003 22:09:01 -0700, [EMAIL PROTECTED] wrote: Well, I'm back again for some help. I'm running Java 1.3.1, Tomcat 3.3.1 I have a small proof of concept java program which uses javax.mail and which successfully sends off a note. When I incorporate the proof of concept code into a servlet, I get: java.lang.NoClassDefFoundError: javax/activation/DataSource What am I missing that the straight Java code runs but the servlet can't seem to find the parts used by the proof code? Is there a general approach for dealing with NoClassDef errors? I know that the message indicates something other than ClassNotFound, but what really does it mean? Pointers to existing doc gratefully received. Thanks! Regards, Terry Fuller [EMAIL PROTECTED] --- - 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]
More java.lang.NoClassDefFoundError
Well, I'm back again for some help. I'm running Java 1.3.1, Tomcat 3.3.1 I have a small proof of concept java program which uses javax.mail and which successfully sends off a note. When I incorporate the proof of concept code into a servlet, I get: java.lang.NoClassDefFoundError: javax/activation/DataSource What am I missing that the straight Java code runs but the servlet can't seem to find the parts used by the proof code? Is there a general approach for dealing with NoClassDef errors? I know that the message indicates something other than ClassNotFound, but what really does it mean? Pointers to existing doc gratefully received. Thanks! Regards, Terry Fuller [EMAIL PROTECTED] --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dreaded java.lang.NoClassDefFoundError
Howdy, Count the number of mail.jar files you have in your tomcat installation, including $CATALINA_HOME/common/lib and your webapp's WEB-INF/lib directory. There should only be one. If there are two, remove one. Yoav Shapira Millennium ChemInformatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 1:19 AM To: Tomcat Users List Subject: Re: Dreaded java.lang.NoClassDefFoundError Thanks! You were right. I had two CLASSPATH statements, and one was pointing at only the jre. I can't really understand how that happened, I really have been running very well for the past six months, compiling JSPs, running servlets, and generally very happy. Why this should have happened right now I cannot see. Having straightened out the CLASSPATH I'm running into a problem with using mail. This is more understandable, as the last thing I changed was the addition of email to the webapp. I wrote a java routine to use the mail facilities and it runs ok bare on the JVM, so I think I've got everything I need. I then wrote a servlet to provide email functions to my webapp, and I get the following error. Can you tell me what this means? Thanks: Error: 500 Location: /daysails/jsp/daysails.sme Internal Servlet Error: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:262) at org.apache.tomcat.facade.ServletHandler.getServlet(ServletHandler.java: 346) at org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler.java:439) at org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:228) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:472) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.ja va:9 17) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Ht tp10 Interceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:4 94) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l.ja va:516) at java.lang.Thread.run(Thread.java:512) Regards, Terry Fuller [EMAIL PROTECTED] --- In [EMAIL PROTECTED], on 06/29/2003 at 10:18 PM, Bill Barker [EMAIL PROTECTED] said: It looks, at first glance, that you are running a system with only the JRE, and not the JDK. To compile JSP pages, you need the JDK, and need to point JAVA_HOME to the JDK root, not the JRE root (e.g. JAVA_HOME=/usr/java, not JAVA_HOME=/usr/java/jre). I'm very interested in potential 3.3.x errors, but I can't determine much more from what you have posted so far. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Everything was working fine this afternoon. This evening nothing works. I'm now getting the dreaded java.lang.NoClassDefFoundError: sun/tools/javac/Main. Just before this, I was getting an abstract error method, failing to find TLD information. There weren't any library tags in the page being compiled, so I removed the taglib definition statement from the JSP -- that's what brought me to this. The most significant change I've made was to add a number of init-param tags to the web.xml for this servlet. These had a bunch of syntax errors, which I think I've now cleared up [tho' is there a good reference for web.xml content?] Running Tomcat 3.3.1. (yes, I know), but can anyone help? java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.jav a:13 6) at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:889) at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.j ava: 73 3) at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java :506 ) at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.ja va:9 68 ) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispat cher Im pl.java:259) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatch erIm pl .java:174) at SME.SMEcontrol.doPost(SMEcontrol.nrx:336) at SME.SMEcontrol.doGet(SMEcontrol.nrx:348) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java: 574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:48 5) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.j ava: 91 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(H ttp1 0I nterceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt
Re: Dreaded java.lang.NoClassDefFoundError
Thanks! You were right. I had two CLASSPATH statements, and one was pointing at only the jre. I can't really understand how that happened, I really have been running very well for the past six months, compiling JSPs, running servlets, and generally very happy. Why this should have happened right now I cannot see. Having straightened out the CLASSPATH I'm running into a problem with using mail. This is more understandable, as the last thing I changed was the addition of email to the webapp. I wrote a java routine to use the mail facilities and it runs ok bare on the JVM, so I think I've got everything I need. I then wrote a servlet to provide email functions to my webapp, and I get the following error. Can you tell me what this means? Thanks: Error: 500 Location: /daysails/jsp/daysails.sme Internal Servlet Error: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:262) at org.apache.tomcat.facade.ServletHandler.getServlet(ServletHandler.java:346) at org.apache.tomcat.facade.ServletHandler.preInit(ServletHandler.java:439) at org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:228) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:472) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516) at java.lang.Thread.run(Thread.java:512) Regards, Terry Fuller [EMAIL PROTECTED] --- In [EMAIL PROTECTED], on 06/29/2003 at 10:18 PM, Bill Barker [EMAIL PROTECTED] said: It looks, at first glance, that you are running a system with only the JRE, and not the JDK. To compile JSP pages, you need the JDK, and need to point JAVA_HOME to the JDK root, not the JRE root (e.g. JAVA_HOME=/usr/java, not JAVA_HOME=/usr/java/jre). I'm very interested in potential 3.3.x errors, but I can't determine much more from what you have posted so far. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Everything was working fine this afternoon. This evening nothing works. I'm now getting the dreaded java.lang.NoClassDefFoundError: sun/tools/javac/Main. Just before this, I was getting an abstract error method, failing to find TLD information. There weren't any library tags in the page being compiled, so I removed the taglib definition statement from the JSP -- that's what brought me to this. The most significant change I've made was to add a number of init-param tags to the web.xml for this servlet. These had a bunch of syntax errors, which I think I've now cleared up [tho' is there a good reference for web.xml content?] Running Tomcat 3.3.1. (yes, I know), but can anyone help? java.lang.NoClassDefFoundError: sun/tools/javac/Main at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136) at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:889) at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:73 3) at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506) at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968 ) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm pl.java:259) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl .java:174) at SME.SMEcontrol.doPost(SMEcontrol.nrx:336) at SME.SMEcontrol.doGet(SMEcontrol.nrx:348) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I nterceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:516) at java.lang.Thread.run(Thread.java:512) Regards, Terry Fuller [EMAIL PROTECTED] --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
java.lang.NoClassDefFoundError
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 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
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
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
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/HttpJspBase
Tomcat 4.1.18 - Mod_jk2 - Apache 2.x - Solaris 5.8 Everything seems to be working fine, but when I stress-test Tomcat with Jmeter I get the following error, 2003-02-25 11:34:03 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.servlet.ServletException: org/apache/jasper/runtime/HttpJspBase at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 5) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 590) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:530) at java.lang.Thread.run(Thread.java:536) - Root Cause - java.lang.NoClassDefFoundError: org/apache/jasper/runtime/HttpJspBase at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.lang.ClassLoader.defineClass(ClassLoader.java:431) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:215) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131) at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java: 504) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper .java:145) at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:411) at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:361) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:472) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:184) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext
Re: LoadOnStartupInterceptor: cannot load servlet name...java.lang.NoClassDefFoundError
The oracle file is called classes12.zip and it's located in lib/common. Yet I still get the error. On Sat, 2003-02-15 at 01:26, Bill Barker wrote: The simplest is to just include the Oracle jars in lib/common. Otherwise, it's not a 'server.xml' setting. Assuming that Tomcat is running under the user 'tomcat', then you would need to create a file called '~tomcat/.tomcatrc' looking like: TOMCAT_OPTS=-Dorg.apache.tomcat.common.classpath=/path/to/oracle.jar Alternatively, you can edit the 'tomcat.sh' file to do the same thing. The value of this System property gets added to the classpath for the 'common' classloader, so it should solve your problem. Ray Kosby [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have jakarta-tomcat-3.3.1a on a Solaris 8 machine. I have a servlet that uses classes contained in .zip and .jar files that are located in jakarta-tomcat/lib/common. Whenever I start tomcat I get the following error: LoadOnStartupInterceptor: cannot load servlet name: Database Servlet - java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource I found the following in the documentation: If the chosen classloader is the Common Classloader or Apps classloader you include a directory or jar these classloaders by listing them a System property. For the Common Classloader, include the directory or jar file in a System property named org.apache.tomcat.common.classpath. For the Apps classloader, use a System property named org.apache.tomcat.apps.classpath. If this is the solution, I can't find a clear example of what the tags in server.xml should look like to accomplish this. Any one know if I'm on the right track and how to do this? Sincerely, Ray new at tomcat Kosby -- Ray Kosby [EMAIL PROTECTED] - 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]
LoadOnStartupInterceptor: cannot load servlet name ...java.lang.NoClassDefFoundError
I have jakarta-tomcat-3.3.1a on a Solaris 8 machine. I have a servlet that uses classes contained in .zip and .jar files that are located in jakarta-tomcat/lib/common. Whenever I start tomcat I get the following error: LoadOnStartupInterceptor: cannot load servlet name: Database Servlet - java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource I found the following in the documentation: If the chosen classloader is the Common Classloader or Apps classloader you include a directory or jar these classloaders by listing them a System property. For the Common Classloader, include the directory or jar file in a System property named org.apache.tomcat.common.classpath. For the Apps classloader, use a System property named org.apache.tomcat.apps.classpath. If this is the solution, I can't find a clear example of what the tags in server.xml should look like to accomplish this. Any one know if I'm on the right track and how to do this? Sincerely, Ray new at tomcat Kosby -- Ray Kosby [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Re: LoadOnStartupInterceptor: cannot load servlet name ...java.lang.NoClassDefFoundError
The simplest is to just include the Oracle jars in lib/common. Otherwise, it's not a 'server.xml' setting. Assuming that Tomcat is running under the user 'tomcat', then you would need to create a file called '~tomcat/.tomcatrc' looking like: TOMCAT_OPTS=-Dorg.apache.tomcat.common.classpath=/path/to/oracle.jar Alternatively, you can edit the 'tomcat.sh' file to do the same thing. The value of this System property gets added to the classpath for the 'common' classloader, so it should solve your problem. Ray Kosby [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have jakarta-tomcat-3.3.1a on a Solaris 8 machine. I have a servlet that uses classes contained in .zip and .jar files that are located in jakarta-tomcat/lib/common. Whenever I start tomcat I get the following error: LoadOnStartupInterceptor: cannot load servlet name: Database Servlet - java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource I found the following in the documentation: If the chosen classloader is the Common Classloader or Apps classloader you include a directory or jar these classloaders by listing them a System property. For the Common Classloader, include the directory or jar file in a System property named org.apache.tomcat.common.classpath. For the Apps classloader, use a System property named org.apache.tomcat.apps.classpath. If this is the solution, I can't find a clear example of what the tags in server.xml should look like to accomplish this. Any one know if I'm on the right track and how to do this? Sincerely, Ray new at tomcat Kosby -- Ray Kosby [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: getting java.lang.NoClassDefFoundError
Yeah, I read that, here is the problem: I want to run Tomcat from my local PC. I want to load the *.classes from a network drive (for night backup purposes) not my local drive. (I've changed the class path in the catalina.bat, but I don't like this) I want to run the *.jsp from a network drive (for night backup purposes) not my local drive. (I've added a context in the server.xml for this) Windows shortcuts are not the same as Unix symbolic links (can't use a shortcut in the WEB-INF/classes to point to the network drive) Tomcat changes the system classpath, I tried setting the system(windows) classpath to include the network drive, but Tomcat changes it. (I've changed the class path in the catalina.bat, but I don't like this) -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 6:47 PM To: Tomcat Users List Subject: RE: getting java.lang.NoClassDefFoundError Where is your bean's code being loaded from? It should be in $CATALINA_HOME/common/classes or your webapp's WEB-INF/classes (or it can be in a JAR in $CATALINA_HOME/lib or your webapp's WEB-INF/lib). -- 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: Davidson, Greg [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 5:44 PM To: '[EMAIL PROTECTED]' Subject: getting java.lang.NoClassDefFoundError I'm getting the following error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest when I try to execute the following: bean code: request(request, response) { request.getParamater(inputBox); //This line cause the error. } Why isn't this (javax/servlet/http/HttpServletRequest) in my/tomcat's classpath?? Is that the problem?? -- To unsubscribe, e-mail: mailto:tomcat-user- [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: getting java.lang.NoClassDefFoundError
getParameter() is misspelled. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 8:57 PM To: Tomcat Users List Subject: Re: getting java.lang.NoClassDefFoundError On Mon, 27 Jan 2003, Davidson, Greg wrote: Date: Mon, 27 Jan 2003 17:44:23 -0500 From: Davidson, Greg [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: getting java.lang.NoClassDefFoundError I'm getting the following error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest when I try to execute the following: bean code: request(request, response) { request.getParamater(inputBox); //This line cause the error. } Why isn't this (javax/servlet/http/HttpServletRequest) in my/tomcat's classpath?? Is that the problem?? Most likely explanation is that you modified Tomcat's classpath to put servlet.jar on it, or put the class containing the above code into the system extensions directory, or otherwise messed with the standard file layout. Without more details about your environment, it's not possible to know where the problem really lies. Craig -- 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: getting java.lang.NoClassDefFoundError
-Original Message- From: Davidson, Greg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 8:57 AM To: 'Tomcat Users List' Subject: RE: getting java.lang.NoClassDefFoundError Yeah, I read that, here is the problem: I want to run Tomcat from my local PC. I want to load the *.classes from a network drive (for night backup purposes) not my local drive. (I've changed the class path in the catalina.bat, but I don't like this) I want to run the *.jsp from a network drive (for night backup purposes) not my local drive. (I've added a context in the server.xml for this) OK so if your context directory is already on a network drive, can't you just put your classes in WEB-INF/classes and be done? I must be misunderstanding you. Windows shortcuts are not the same as Unix symbolic links (can't use a shortcut in the WEB-INF/classes to point to the network drive) Tomcat changes the system classpath, I tried setting the system(windows) classpath to include the network drive, but Tomcat changes it. (I've changed the class path in the catalina.bat, but I don't like this) My experience is that trying to muck with Tomcat's classloading scheme only brings pain. :-\ -- 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 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: getting java.lang.NoClassDefFoundError
Howdy, I want to load the *.classes from a network drive (for night backup purposes) not my local drive. (I've changed the class path in the catalina.bat, but I don't like this) I wouldn't like it either if I were you ;) Besides posing a security risk (e.g. someone remapping the network drive maliciously to other .class files), what do you gain from this? Have you considered packaging your app into a .war file and deploying that to the server, instead of messing with symlinks, shortcuts, and mangled classpaths that lead to a non-portable webapp? Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
getting java.lang.NoClassDefFoundError
I'm getting the following error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest when I try to execute the following: bean code: request(request, response) { request.getParamater(inputBox); //This line cause the error. } Why isn't this (javax/servlet/http/HttpServletRequest) in my/tomcat's classpath?? Is that the problem?? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: getting java.lang.NoClassDefFoundError
Where is your bean's code being loaded from? It should be in $CATALINA_HOME/common/classes or your webapp's WEB-INF/classes (or it can be in a JAR in $CATALINA_HOME/lib or your webapp's WEB-INF/lib). -- 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: Davidson, Greg [mailto:[EMAIL PROTECTED]] Sent: Monday, January 27, 2003 5:44 PM To: '[EMAIL PROTECTED]' Subject: getting java.lang.NoClassDefFoundError I'm getting the following error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest when I try to execute the following: bean code: request(request, response) { request.getParamater(inputBox); //This line cause the error. } Why isn't this (javax/servlet/http/HttpServletRequest) in my/tomcat's classpath?? Is that the problem?? -- To unsubscribe, e-mail: mailto:tomcat-user- [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: getting java.lang.NoClassDefFoundError
On Mon, 27 Jan 2003, Davidson, Greg wrote: Date: Mon, 27 Jan 2003 17:44:23 -0500 From: Davidson, Greg [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: getting java.lang.NoClassDefFoundError I'm getting the following error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest when I try to execute the following: bean code: request(request, response) { request.getParamater(inputBox); //This line cause the error. } Why isn't this (javax/servlet/http/HttpServletRequest) in my/tomcat's classpath?? Is that the problem?? Most likely explanation is that you modified Tomcat's classpath to put servlet.jar on it, or put the class containing the above code into the system extensions directory, or otherwise messed with the standard file layout. Without more details about your environment, it's not possible to know where the problem really lies. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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]
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 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 me? Any ideas would be greatly appreciated. Thank you. -John Lorenti -- 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
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 url-pattern/servlet
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: Réf. : RE: SOAP= java.lang.NoClassDefFoundError: javax/mail/MessagingE xception
So you are using Apache SOAP. I stopped using it, as the documentation is really bad and it is sometimes conflicting with JAXM. (same class name for SOAPException) Also I think the deployment descriptor is cumbersome. you have to specify the server classes to use in the dd. anyway I never managed to get it working properly. JWSDP works immediatly, and no deployment descriptor is needed (unless you count web.xml). IMHO go with JWSDP and just 1 soap API(JAXM), if you want to avoid problems. JAXM does the job pefectly. I am sure you can tweak the jwsdp port somehow (server.xml?) btw I also considered AXIS, as this is the follow up project for Apache soap, this stuff promises to be really easy to setup. have a look on the apache site. Cheers / Christophe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 7:57 PM To: Tomcat Users List Subject: Réf. : RE: SOAP= java.lang.NoClassDefFoundError: javax/mail/MessagingE xception I've TOMCAT 4.0, SUN XML-Pack (which includes JAXM, JAXR...) , JetSpeed and Apache SOAP. I think I can't use the JWSDP because TOMCAT (8080) is always installed and I've an ISAPI redirector for IIS configured with it. I've deployed a Client j2se (Java Class, URL on port 8070) on APAche-SOAP-ADMIN in which i use Call method. There is no compilation error but when I execute the client it don't find the class. I want to see the request/response with TcpTunnelGui but it detects nothing. What the role of the JavaMail API in the using of SOAP, I don't understand that? What precautions must I care when I install SOAP? Do you where can I found a good tutorial for SOAP with TOMCAT? Thanks. Jean-Christophe FRANCE -- 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]
Réf. : RE: Réf. : RE: SOAP= java.lang.NoClassDefFoundError: javax/mail/MessagingE xception
Thanks for your help, I've downloaded the JWSDP. It seems to be a full tool. I will read the doc and try to install it next. You've said you use JAXM. But what's the role of JAXMmail.jar ??? JAX-RPC uses SOAPWSDL technologie, I think it's these API I must use to build SOAP message. thanks Jean-Christophe -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
SOAP= java.lang.NoClassDefFoundError: javax/mail/MessagingException
Hi, I'm working with TOMCAT4 and SOAP on win 2000 PRO.TOMCAT works perfectly. I can deploy SOAP but when I want to use a service, I have an error when executing: java.lang.NoClassDefFoundError: javax/mail/MessagingException at Client.main(Client.java:9) Exception in thread main I think my CLASSPATH is good ( mail.jar is including...). I really don't know what happend! hELP Thanks Jean-Christophe FRANCE -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: SOAP= java.lang.NoClassDefFoundError: javax/mail/MessagingException
Hi, I am currently working on a SOAP servlet, and using different clients to send SOAP messages like J2SE and a servlet client. On the server side I use the JWSDP (which includes tomcat) from sun, which contains nice examples aswell as an excellent tutorial. The best way I think, is to let your IDE build the classpath. Just add all the .jar files in the JAXM directory to your classpath will help aswell. If you use JWSDP you can also find the files in C:\jwsdp-1_0-ea2\common\lib (early access 2 release). Is your client a j2se client? more details on your setup would help. Cheers / Christophe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 5:46 PM To: [EMAIL PROTECTED] Subject: SOAP= java.lang.NoClassDefFoundError: javax/mail/MessagingException Hi, I'm working with TOMCAT4 and SOAP on win 2000 PRO.TOMCAT works perfectly. I can deploy SOAP but when I want to use a service, I have an error when executing: java.lang.NoClassDefFoundError: javax/mail/MessagingException at Client.main(Client.java:9) Exception in thread main I think my CLASSPATH is good ( mail.jar is including...). I really don't know what happend! hELP Thanks Jean-Christophe FRANCE -- 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]
Réf. : RE: SOAP= java.lang.NoClassDefFoundError: javax/mail/MessagingE xception
I've TOMCAT 4.0, SUN XML-Pack (which includes JAXM, JAXR...) , JetSpeed and Apache SOAP. I think I can't use the JWSDP because TOMCAT (8080) is always installed and I've an ISAPI redirector for IIS configured with it. I've deployed a Client j2se (Java Class, URL on port 8070) on APAche-SOAP-ADMIN in which i use Call method. There is no compilation error but when I execute the client it don't find the class. I want to see the request/response with TcpTunnelGui but it detects nothing. What the role of the JavaMail API in the using of SOAP, I don't understand that? What precautions must I care when I install SOAP? Do you where can I found a good tutorial for SOAP with TOMCAT? Thanks. Jean-Christophe FRANCE -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
New User Needs Help! java.lang.NoClassDefFoundError
I have a apache (1.3.24) and tomcat(3.3.1) on Win2K. I have Apache and tomcat installed, and configured (i think) to the instructions in the docs. The servlet examples work fine, however I can not run the jsp examples. Enclosed is the error I'm seeing. Any Ideas? Bob Error: 500 Location: /examples/jsp/num/numguess.jsp Internal Servlet Error: java.lang.NoClassDefFoundError: org/apache/tomcat/logging/LogHelper at org.apache.jasper.compiler.JspReader.(JspReader.java:96) at org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:288) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:159) at org.apache.tomcat.facade.JasperLiaison.jsp2java(JspInterceptor.java:790) at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:73 1) at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506) at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968 ) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:87 5) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Int erceptor.java:341) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:516) at java.lang.Thread.run(Unknown Source) winmail.dat Description: application/ms-tnef -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
App Reload problems: java.lang.NoClassDefFoundError
Tomcat 4.0.3 on Sun Solaris 7. Most of the time, the manager app successfully reloads my application. But sometimes when I make changes to a class that is packaged in a jar file in WEB-INF/lib, the reload fails with a java.lang.NoClassDefFoundError for some of the classes in that WEB-INF/lib jar file. I know that the classes are present and functional, because if I bounce tomcat everything loads just fine. What's the spec on reloading of classes in WEB-INF/lib? For the record, the class that is changed, is NOT one that may be stored as a user session attribute. Even so, what will Tomcat do if it is asked to reload a changed class when existing instances of that class exist as session attributes? Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
java.lang.NoClassDefFoundError: javax/xml/transform/TransformerFactory
I am having trouble in getting Tomcat to find the class library which contains the TransformerFactory. The code compiles fine yet when I try to run it, Tomcat reports a NoClassDefFoundError I was able to find that the appropriate class is defined in xalan.jar and ensured that it is in my classpath. I'm using xalan 2.3.1 and was using Tomcat 4.0.3 both on a W 2K platform. In the User-List archive I found reference to a problem of this type. The suggested solutions were to put the jar file in common/bin or to upgrade to Tomcat 4.0.4-b1 I have now tried both without any change in the results. In fact, I actually upgraded to Tomcat 4.0.4-b2-01 Any suggestions ? Dave e-mail [EMAIL PROTECTED] This email communication is intended as a private communication for the sole use of the primary addressee and those individuals listed for copies in the original message. The information contained in this email is private and confidential and if you are not an intended recipient you are hereby notified that copying, forwarding or other dissemination or distribution of this communication by any means is prohibited. If you are not specifically authorized to receive this email and if you believe that you received it in error please notify the original sender immediately. We honour similar requests relating to the privacy of email communications. Cette communication par courrier électronique est une communication privée à l'usage exclusif du destinataire principal ainsi que des personnes dont les noms figurent en copie. Les renseignements contenus dans ce courriel sont confidentiels et si vous n'êtes pas le destinataire prévu, vous êtes avisé, par les présentes que toute reproduction, tout transfert ou toute autre forme de diffusion de cette communication par quelque moyen que ce soit est interdit. Si vous n'êtes pas spécifiquement autorisé à recevoir ce courriel ou si vous croyez l'avoir reçu par erreur, veuillez en aviser l'expéditeur original immédiatement. Nous respectons les demandes similaires qui touchent la confidentialité des communications par courrier électronique.
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.