-
1. Re: RH & Jetty give InstantiationException
jules_gosnell Oct 2, 2001 12:49 PM (in response to alu1344)what version of the JSDK did you compile it against ?
Where is the Servlet class ?
What other classes does it reference ?
Where are they ?
If the Servlet is so simple, could you post the source ?
Have you tried deploying it in another web-container, e.g. jboss/tomcat to make sure that the problem is Jetty and not your webapp ?
Jules -
2. Re: RH & Jetty give InstantiationException
alu1344 Oct 2, 2001 3:47 PM (in response to alu1344)JSDK 1.3.1, Win2k
The servlet class used to reference other class (CanplasticaServlet) in the same package for inheritance. Trying to KISS it, I removed everything that could cause problems. They are commented.
I'm going to try with Tomcat, but I'm not very hopeful on it. This servlet is copied from one that used to work in Tomcat (and is damn simple :).package com.canplastica.servlet; import com.canplastica.servlet.CanplasticaServlet; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; //import org.apache.log4j.Category; public abstract class Catalogo extends HttpServlet //CanplasticaServlet { public Catalogo() { System.out.println("Instantiated"); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { processRequest(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { processRequest(request, response); } protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { response.setContentType("text/html"); java.io.PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title>Servlet catalogo</title>"); out.println("</head>"); out.println("<body>"); out.println("Catalogo, etc"); out.println("</body>"); } }
-
3. Re: RH & Jetty give InstantiationException
alu1344 Oct 2, 2001 4:22 PM (in response to alu1344)(I removed that mistype and still have the same error, InstantiationException *grin*)
(Never, never code on drugs) -
4. Re: RH & Jetty give InstantiationException
alu1344 Oct 2, 2001 4:25 PM (in response to alu1344)But then not only restarted (two times) but also redeployed JBoss and everything worked fine (the class was at last reloaded).
Issue solved. Bottom line: don't drink and code. Sorry for the inconvenience.
(It's embarrasing, since I've coded 50+ servlets this far :)