You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Fabbris Pierluigi <pi...@poste.it> on 2007/07/31 15:08:14 UTC

Problem to configure servelet on Tomcat6

Hi,
I've configured Tomacat 6 for Servlet but I've this error:

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._

*exception*

javax.servlet.ServletException: Servlet.init() for servlet default threw 
exception
   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 

   
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
   
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) 

   
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) 

   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
   java.lang.Thread.run(Unknown Source)

*root cause*

java.lang.NumberFormatException: For input string: ""
   java.lang.NumberFormatException.forInputString(Unknown Source)
   java.lang.Integer.parseInt(Unknown Source)
   java.lang.Integer.parseInt(Unknown Source)
   
org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:221)
   javax.servlet.GenericServlet.init(GenericServlet.java:212)
   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 

   
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
   
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) 

   
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) 

   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
   java.lang.Thread.run(Unknown Source)

*note* _The full stack trace of the root cause is available in the 
Apache Tomcat/6.0.13 logs._

------------------------------------------------------------------------


    Apache Tomcat/6.0.13

How can resolve this problem?
Hoping a reply.
Sincerally yours,
Fabbris Pierluigi


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Problem to configure servelet on Tomcat6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Fabbris Pierluigi [mailto:pierluigi.fabbris@poste.it] 
> Subject: Problem to configure servelet on Tomcat6
> 
> java.lang.NumberFormatException: For input string: ""
>    java.lang.NumberFormatException.forInputString(Unknown Source)
>    java.lang.Integer.parseInt(Unknown Source)
>    java.lang.Integer.parseInt(Unknown Source)
>
org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:221
)

The above line is trying to retrieve the value of the debug <init-param>
nested inside the <servlet> declaration for the DefaultServlet.  You
have apparently changed this from 0 to an empty (or at least
non-numeric) string.  Don't do that.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem to configure servelet on Tomcat6

Posted by reno <re...@free.fr>.
catch the NumberFormatException

check the given parameter:
if your parameter is empty or is different that a number, set it to a
default value
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NumberFormatException.html

it is more a servlet problem than a tomcat problem

F.

> Hi,
> I've configured Tomacat 6 for Servlet but I've this error:
> 
> *message*
> 
> *description* _The server encountered an internal error () that 
> prevented it from fulfilling this request._
> 
> *exception*
> 
> javax.servlet.ServletException: Servlet.init() for servlet default threw 
> exception
>    
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
> 
>    
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>    
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) 
> 
>    
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) 
> 
>    org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
>    java.lang.Thread.run(Unknown Source)
> 
> *root cause*
> 
> java.lang.NumberFormatException: For input string: ""
>    java.lang.NumberFormatException.forInputString(Unknown Source)
>    java.lang.Integer.parseInt(Unknown Source)
>    java.lang.Integer.parseInt(Unknown Source)
>    
> org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:221)
>    javax.servlet.GenericServlet.init(GenericServlet.java:212)
>    
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
> 
>    
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>    
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852) 
> 
>    
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584) 
> 
>    org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
>    java.lang.Thread.run(Unknown Source)
> 
> *note* _The full stack trace of the root cause is available in the 
> Apache Tomcat/6.0.13 logs._
> 
> ------------------------------------------------------------------------
> 
> 
>     Apache Tomcat/6.0.13
> 
> How can resolve this problem?
> Hoping a reply.
> Sincerally yours,
> Fabbris Pierluigi
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>