Prashant,
It looks like you and me are following the same path learning JBoss. I've just hit the same problem as you. I've just posted this to tomcat-user but it might be worth cross-posting here.
Could anyone shed any light on this for Prashant and myself?
Thanks,
Martin
----
Hi,
I've recently installed JBoss-2.4.0_Tomcat-3.2.2 and I'm now starting to experiment with all the JBoss samples. The first, Interest, contains a servlet that I'm trying to get up and running.
This InterestServlet is in a package org.jboss.docs.interest which I've compiled and placed in
webapps\demo\WEB-INF\classes\org\jboss\docs\interest
demo\WEB-INF\web.xml looks like:
------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>
interest
</servlet-name>
<servlet-class>
org.jboss.docs.interest.InterestServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
interest
</servlet-name>
<url-pattern>
/catalog
</url-pattern>
</servlet-mapping>
</web-app>
------------------------------------------
and I've added the following to conf\server.xml
------------------------------------------
<Context path="/demo"
docBase="webapps/demo"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
------------------------------------------
When I enter http://localhost:8080/demo/catalog in my browser I get:
------------------------------------------
Location: /demo/catalog
Internal Servlet Error:
java.lang.NoClassDefFoundError: org/jboss/docs/interest/Interest
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268)
at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
at org.apache.tomcat.core.Handler.service(Handler.java:254)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
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(Unknown Source)
------------------------------------------
I've looked at other TomCat samples, in particular webapps\test\WEB-INF\classes\requestMap and I appear
to have done everything right but I can't make sense of this.
Could someone help me?
Thanks,
Martin
-----Original Message-----
From: Prashant Sarode [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 10:06
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Problem in Interest Servlet !!!
Importance: High
Hi all,
I am using Jboss v2.2.2 with embedded tomcat v3.2.2 on
NT5. I've successfully deployed the interest sample
application & run the client & its running perfectly fine.
Also, I compile the InterestServlet & kept it in Tomcat's
E:\tomcat\webapps\examples\WEB-INF\classes directory.
I've changed form action in the html file as shown below:
<form action="http://localhost:8080/examples/servlet/InterestServlet"
method="POST">
Now when I run this html file, I got the following error :
java.lang.NullPointerException
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(ClassLoader.java:588)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava:430)
at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad
er.java:174)
Can anyone tell me whats the problem with the servlet ???
Have I placed the class file in right directory ??
I am using the same package as org/jboss/docs/interest
Kindly Waiting for ur reply.
Thanks & Regards,
- Prashant
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
