RE: jndi error configuring data source

2005-01-06 Thread Roberto Rios
Hi,

Put the JDBC jar in [TOMCAT]/common/lib

Do not place it inside your own application lib folder

Bob

-Mensagem original-
De: Scott Purcell [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 5 de janeiro de 2005 20:02
Para: tomcat-user@jakarta.apache.org
Assunto: jndi error configuring data source

 
I am trying to configure database pooling in Tomcat 4.1.31. I found some
excellent documentation here
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html
 
I followed this exactly for mysql (top article).
 
I created the DBTest web-app precisely, and all folders exist and
web.xml file is good.
My webapp is under root/DBTest/WEB-INF/classes
 
/lib/mm.mysql-bin.jar
  web.xml
 
The server starts properly, so I know my configuration is good. The
problem is I get an error stating that it cannot find the jar file for
the mysql driver when I hit the test page. (ERROR_BELOW)
Anyway, I followed the article precisely, and noticed that they hit
localhost:8080. My tomcat is running on 80 and at my IP address as you
can see below. 
Would this be why it cannot find the jar file? I am looking at the ajp13
listening on /0.0.0.0:8009 and wondering if there is something else that
needs configuring?
 
Would like to get this running if possible.
 
Thank you 
Scott
 
 
 
 

INFO: Starting Coyote HTTP/1.1 on http-192.168.66.90-80
Jan 5, 2005 3:52:27 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jan 5, 2005 3:52:27 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=15/532
config=C:\jakarta-tomcat-4.1.31\conf\jk2.prop
erties
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
class 'org.g
jt.mm.mysql.Driver', cause:
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:945)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:810)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:730)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at foo.DBTest.init(DBTest.java:23)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:49)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:162)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
40)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:200)


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



RE: jndi error configuring data source

2005-01-06 Thread Phillip Qin
Drop off mysql jdbc driver to tomcat common/lib

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: January 5, 2005 5:02 PM
To: tomcat-user@jakarta.apache.org
Subject: jndi error configuring data source


 
I am trying to configure database pooling in Tomcat 4.1.31. I found some
excellent documentation here
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html
 
I followed this exactly for mysql (top article).
 
I created the DBTest web-app precisely, and all folders exist and web.xml
file is good. My webapp is under root/DBTest/WEB-INF/classes
 
/lib/mm.mysql-bin.jar
  web.xml
 
The server starts properly, so I know my configuration is good. The problem
is I get an error stating that it cannot find the jar file for the mysql
driver when I hit the test page. (ERROR_BELOW) Anyway, I followed the
article precisely, and noticed that they hit localhost:8080. My tomcat is
running on 80 and at my IP address as you can see below. 
Would this be why it cannot find the jar file? I am looking at the ajp13
listening on /0.0.0.0:8009 and wondering if there is something else that
needs configuring?
 
Would like to get this running if possible.
 
Thank you 
Scott
 
 
 
 

INFO: Starting Coyote HTTP/1.1 on http-192.168.66.90-80 Jan 5, 2005
3:52:27 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jan 5, 2005 3:52:27 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=15/532
config=C:\jakarta-tomcat-4.1.31\conf\jk2.prop
erties
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
'org.g jt.mm.mysql.Driver', cause:
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:945)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
sLoader.java:810)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:730)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at foo.DBTest.init(DBTest.java:23)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:49)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:162)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
40)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:200)


!DSPAM:41dc63f221171436498371!