What version of Tomcat are you using? From the error, it looks like you're
using an older version of Tomcat 4.0. Try it with the latest version.

Justy

----- Original Message -----
From: "Darnell Whitaker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 12:35 PM
Subject: Error in JSP on tomcat accessing MySQL - NumberFormatException


> I get the following error when I run my jsp test against mysql.
> ...
>
> A Servlet Exception Has Occurred
> Exception Report:
> org.apache.jasper.JasperException: Unable to compile class for JSP
>         at org.apache.jasper.servlet.JspServlet.loadJSP(Unknown Source)
>         at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Unkno
> wn Source)
>         at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
> Source)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
>         at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
> ...
>
> Root Cause:
> java.lang.NumberFormatException: mysql
>         at java.lang.Integer.parseInt(Integer.java:414)
>         at java.lang.Integer.parseInt(Integer.java:463)
>         at org.apache.jasper.compiler.Compiler.getJspLineErrors(Unknown
Source)
>         at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
> ...
> Here is the sample source code snippet....
>
>
> ....
> try {
>                 Class.forName("org.gjt.mm.mysql.Driver").newInstance();
>                 connection = DriverManager.getConnection(connectionURL,
>                 "", "");
> }
> ....
>
> I blows as soon as I try to get the connection - this works fine as
servlet!
> Thanks in advance!
>
> _________________________________________ Darnell Whitaker ICQ#:142079231
> SMS: (Send an SMS message to my ICQ): +2783142142079231 More ways to
contact
> me: http://wwp.icq.com/142079231 _________________________________________
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to