Wrox Home  
Search P2P Archive for: Go

  Return to Index  

j2ee thread: Servlet invoker is currently unavailable


Message #1 by "Nikolas Sakic" <beelzabeb@c...> on Sun, 2 Jun 2002 08:31:29
Hi

What about your "password" for the MySQL connection ??


   Julio Oliveira
Buenos Aires - Argentina
Java Developer - Instructor - Cursos @-Mail
-------------------------------------------
JOliveiraAR@y...
Oliveira_julio@y...

***********************************************************************

-----Mensaje original-----
De: Nikolas Sakic [mailto:beelzabeb@c...]
Enviado el: lunes 3 de junio de 2002 21:01
Para: Java 2 Enterprise Edition
Asunto: [j2ee] Re: Servlet invoker is currently unavailable


> Hello,
 >  I have this problem, either something wrong with me or something wrong
w> ith the code. And I do hope its the latter one.

>
i> mport java.sql.*;
i> mport java.io.*;
i> mport javax.servlet.*;
i> mport javax.servlet.http.*;

>

> public class retrieveData extends HttpServlet {

>     String url,username,password;
 >    Statement stmt;
 >
 >    public void init() throws ServletException {

> 	String driver = getServletConfig().getInitParameter("driver");
	> url = getServletConfig().getInitParameter("jdbcurl");
 >        username = getServletConfig().getInitParameter("mysqluser");

> 	//String driver="org.gjt.mm.mysql.Driver";
	> //url="jdbc:mysql://192.168.1.91:3306/techCentreDB";
	> //username = "anchor";

> 		if( driver == null || url == null){
	>   throw new UnavailableException("Driver not specified");
	> 	}

>
	> try {
 >       	    Class.forName(driver);
	> }
	>     catch(ClassNotFoundException cnfe){
	> 	throw new UnavailableException("Driver <" + driver + ">
n> ot found in the classpath");
	>     }
 >    } // end of init method

>

>     protected void doGet(HttpServletRequest req, HttpServletResponse res)
t> hrows ServletException, IOException {

> 	String serialN = req.getParameter("serialN");

> 	Connection conn = null;
	> String selectStatement = "SELECT org,email,phone,cName,OS from
c> lientDefaultTable where serialNumber=" + serialN;

> 	.
 >        .
 >        .
 >        .

>

> And so the code goes on. I keep on getting the following page:

>
A> pache Tomcat/4.0.3 - HTTP Status 503 - Servlet invoker is currently
u> navailable

> -----------------------------------------------------------------------

> type Status report

> message Servlet invoker is currently unavailable

> description The requested service (Servlet invoker is currently
u> navailable) is not currently available.

>

> ----------------------------------

> Its seems like I am not going past init() method. My web.xml file looks
l> ike this:

>
<> servlet>
<> servlet-name>retrieve</servlet-name>
<> servlet-class>retrieveData</servlet-class>

> <init-param>
 >  <param-name>driver</param-name>
 >  <param-value>org.gjt.mm.mysql.Driver</param-value>
<> /init-param>

> <init-param>
 >  <param-name>jdbcurl</param-name>
 >  <param-value>jdbc:mysql://192.168.1.91:3306/techCentreDB</param-value>
<> /init-param>

> <init-param>
 >  <param-name>mysqluser</param-name>
 >  <param-value>anchor</param-value>
<> /init-param>
<> /servlet>

> <error-page>
 > <exception-type>javax.servlet.UnavailableException</exception-type>
 > <location>/unavailable.html</location>
<> /error-page>

> </web-app>

> I really hate to bother anyone with it, but this I spent just too much
t> ime on it. Anything would be really appreciated. Thank you in advance.

> regards,
n> ik


  Return to Index