No, don't add j2ee.jar to classpath! That's taboo for jboss! Can you see the examples at 8080? And can you execute the servlets in there? If you are using the tomcat start up option would it even use the conf files under default? No I persume. Can you confirm that the "/usr/local/jakarta-tomcat-3.2.1/lib/ value is correct and is indeed the location where the lib is? If it is an out of the box installation it should be at ../../../jakarta-tomcat-3.2.1/lib/ [in relative terms]. Also you might want to verify file access rights! Vinay
----- Original Message ----- From: Norton Lam Sent: Wednesday, May 02, 2001 8:06 PM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpSe
I'm not using the system classpath to add jars. I uncommented the section about Tomcat in the JBOSS_HOME/conf/default/jboss.conf file: <!-- Uncomment to add Tomcat classes to classpath --> <MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" CODEBASE= "../../lib/ext/"> <ARG TYPE="java.lang.String" VALUE="/usr/local/jakarta-tomcat-3.2.1/lib/"> <ARG TYPE="java.lang.String" VALUE="Tomcat"> </MLET> Upon startup, the log shows that all the jars in this dir are being added to the classpath (see the log snippet in my original note). The j2ee.jar is not being added automatically, but I've read a previous message that JBoss doesn't play well with j2ee.jar. I have tried adding j2ee.jar to the classpath upon invocation of org.jboss.main and there are all kinds of error messages that appear upon restart. So I don't believe that is the right approach. Thanx.
Norton Yes, Since they are both in the same VM you typically needn't add the servlet.jar to the jboss lib. But first of all, it would be best if you didn't use the system classpath while jboss start up! Just too many errors could happen with that! Make sure that your java installation is good and it should pick up the j2ee jar automatically. Do you want to verify that? Putting the servlet jar in ext was just to force it to load it! Vinay
----- Original Message ----- From: Norton Lam Sent: Wednesday, May 02, 2001 3:09 PM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpSe
Vinay, Thank you for your quick reply. I tried adding servlet.jar to JBOSS_HOME/lib/ext and restarted, but it didn't work. As I understand it, JBoss and Tomcat are running under the same VM (1.2.2-RC2 in this case) so any servlet.jar being added in the classpath extension should affect both Tomcat and JBoss. Besides, if it is only Tomcat that gets the classpath addition, it should still work because it is Tomcat that is processing the servlet, not JBoss, right? Thanx for your help. Norton It is not loading servlet.jar cos that is only there in the tomcat lib. Just shove a copy of that under JBOSS_HOME/lib/ext and it should find it on restart. Vinay
----- Original Message ----- From: Norton Lam Sent: Tuesday, May 01, 2001 10:58 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] NoClassDefFoundError: javax/servlet/http/HttpServle
Can someone please help me with this exception I'm getting from my servlet?
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled Code) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java, Compiled Code) at java.net.URLClassLoader.defineClass(URLClassLoader.java, Compiled Code) at java.net.URLClassLoader.access$1(URLClassLoader.java, Compiled Code) at java.net.URLClassLoader$1.run(URLClassLoader.java, Compiled Code) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java, Compiled Code) at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java, Compiled Code) at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code) at java.lang.ClassLoader.loadClass(ClassLoader.java, Compiled Code) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j ava, Compiled Code) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad er.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java, Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code)
I'm running on Linux with Apache 1.3.19 delegating to Tomcat/Jboss. I'm running my own version of tomcat (instead of the JBoss-Tomcat distribution) because I need a virtual host configuration through apache.
Jboss reports the TOMCAT_HOME/lib/servlet.jar being added to the classpath extension when it's started.
[Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/ant .jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/jax p.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/ser vlet.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/par ser.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/web server.jar [Classpath extension] Added library:file:/usr/local/jakarta-tomcat-3.2.1/lib/jas per.jar [Classpath extension] Added library:file:/usr/local/jdk1.2.2/lib/tools.jar
The servlet works fine when run via tomcat alone, but not with the jboss/tomcat combination.
Is there something else I should check?
Thanx for your help.
Norton
_______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
|