did you dowloaded java conecter j from mysl and copied it under under your tomcat_home comon/lib
+alowed a user connection into mysql ?




[EMAIL PROTECTED]
administrateur http://entre-nous.qc.tc





From: "Marco Mistroni" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: problem in configuring a Datasource in Tomcat 5.0
Date: Wed, 3 Mar 2004 16:32:15 -0000


Hi, i am still trying to configure a datasource with tomcat.. I have a mysql instance running on my machine, (I can use without any problem mysql console and mysql gui client), but in tomcat I am still getting Following exception..

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFact
ory, cause:
java.sql.SQLException: Cannot connect to MySQL server on localhost:3306.
Is ther
e a MySQL server running on the machine/port you are trying to connect
to? (java
.net.ConnectException)
        at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
        at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown
Source)
        at org.gjt.mm.mysql.Driver.connect(Unknown Source)
        at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:82)
        at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:300)
        at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:838)
        at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:821)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
        at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:311)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
01)
        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)

I attach again my server.xml...

Thanx in advance and regards
        Marco






-----Original Message----- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: 03 March 2004 15:58 To: 'Shapira, Yoav' Subject: RE: problem in configuring a Datasource in Tomcat 5.0

Hi Yoav,
        Thanx, but it worked for half :-(

Now I am getting this exception :
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFact
ory, cause:
java.sql.SQLException: Cannot connect to MySQL server on localhost:3306.
Is ther
e a MySQL server running on the machine/port you are trying to connect
to? (java
.lang.NumberFormatException)
        at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)

this would mean that there is no mysql server running at localhost..

however, I have just started one instance, and here is mysql output..

InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
040303 13:43:50  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
040303 13:43:50  InnoDB: Log file .\ib_logfile0 did not exist: new to be
created

InnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
040303 13:43:51  InnoDB: Log file .\ib_logfile1 did not exist: new to be
created

InnoDB: Setting log file .\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
040303 13:43:54  InnoDB: Started; log sequence number 0 0
mysqld: ready for connections.
Version: '4.1.1a-alpha-max-debug'  socket: ''  port: 3306

Any suggestions?

Thanx in advance and regards
        marco





-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 03 March 2004 14:12
To: Tomcat Users List
Subject: RE: problem in configuring a Datasource in Tomcat 5.0


Hi, Try moving your TestDB datasource to your context declaration and out of GlobalNamingResources.

Yoav Shapira
Millennium ChemInformatics

-----Original Message-----
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 03, 2004 9:10 AM
To: [EMAIL PROTECTED]
Subject: problem in configuring a Datasource in Tomcat 5.0


Hi all, I am trying to configure a Datasource with tomcat 5.0, and I keep on getting Following exception :

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '
' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(DriverManager.java:243)
        at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:743)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
        at org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:64)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:311)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
01)
        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:509)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)



I attach my server.xml, anyone can help?

Thanx in advance and regards
        Marco




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.

<< server.xml >>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_________________________________________________________________
MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/



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



Reply via email to