Thanks a lot

On Sun, 21 Dec 2003 10:15:56 -0500
"Doug Parsons" <[EMAIL PROTECTED]> wrote:

> Leandro,
> 
> If you downloaded the latest jar for mysql you will need to use:
> 
> 
> String driver = "com.mysql.jdbc.Driver";
> 
> When mySQL took on the driver as the official version the name was changed.
> 
> Doug
> 
> PS: If response time is an issue, then you will want to read up on this:
> 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
> 
> I run TC4, so I'm not sure if TC5 is the same. It will give you some of the
> reasons for pooling.
> But for development you can get by on connecting each time.
> 
> Note: This may show up as a double or triple post. I sent the same message
> over 12 hours ago and it never showed up on the list.
> Leandro, I cc you in the hopes that you get this sooner incase my mail is
> being delayed by the list.
> 
> ----- Original Message ----- 
> From: "Leandro Costa" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, December 20, 2003 1:07 PM
> Subject: Re: tomcat & mysql not working
> 
> 
> > 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:3
> 58)
> > > >
> > > 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:3
> 11)
> > > >
> > > 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]
> >
> >
> 
> 

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

Reply via email to