Thanks for your answer, but i'm not the one that's developing the site.. it's a 
webpage that's hosted in our servers and i don't think that it'd be the right thing to 
tinker with those files.. The thing that i can't understand is why, in another 
machine, that is running tomcat4 (not installed by me), and j2sdk 1.3 runs ok.. I'm 
running tomcat5 and j2sdk 1.4

Does anyone have any idea ?

On Sat, 20 Dec 2003 08:07:57 -0800 (PST)
Al Likha <[EMAIL PROTECTED]> wrote:

> There is some source code template from 
> "likha devcentre".  Download from likhasoftware.com
> 
> Al
> 
> ----- Original Message ----- 
> From: "Leandro Costa" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, December 20, 2003 6:57 AM
> Subject: tomcat & mysql not working
> 
> 
> > Hi there, i'm trying to get a tomcat server running
> with mysql connectivity. Tomcat is running ok, and
> i've downloaded the new Connector/J, and copied the
> .jar file to $CATALINA_HOME/common/lib. I'm running
> Tomcat 5.0.16. The other JSPs work ok, but the ones
> that contain a connection to mysql, fail with this
> message:
> > 
> > <snip>
> > 
> > HTTP Status 500 -
> > 
> > type Exception report
> > 
> > message
> > 
> > description The server encountered an internal error
> () that prevented it from fulfilling this request.
> > 
> > exception
> > 
> > org.apache.jasper.JasperException
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
> >
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> >
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > 
> > root cause
> > 
> > java.lang.NullPointerException
> >
> org.apache.jsp.jspCounter_jsp._jspService(jspCounter_jsp.java:83)
> >
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> >
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> >
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > 
> > note The full stack trace of the root cause is
> available in the Tomcat logs.
> > Apache Tomcat/5.0.16
> > 
> > </snip>
> > 
> > I don't know anything about Java, but i think that
> the 'NullPointerException' is because it can't get a
> handler to communicate with MySQL.
> > The JSP file connects to MySQL like this:
> > <snip>
> > 
> >     String host = "localhost";
> >     String dbName = "MYDBNAME"; 
> >     String driver = "org.gjt.mm.mysql.Driver";
> >     String username = "MYUSERNAME";
> >     String password = "MYPASSWORD";
> >     String url = "jdbc:mysql://" + host + ":3306/" +
> dbName;
> >     String table = "counter";
> >     Connection connection             = null; 
> >     Statement statement               = null; 
> >     Statement statement2               = null;
> >     ResultSet resultSet               = null;
> >     ResultSetMetaData resultsMetaData = null;
> >     String query = "";
> >     try{
> >       Class.forName(driver) ;
> >       connection = DriverManager.getConnection(url,
> username, password);
> >       statement = connection.createStatement();
> > 
> > </snip>
> > 
> > I've seen in some example configuration files that
> you can specify a DB, username, password, etc. But i
> don't know if i have to do it, because this JSP
> specifies all that..
> > 
> > If someone could give me a helping hand, I would be
> more than grateful.
> > 
> > Regards,
> > Leandro Costa
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to