RE: problem in configuring a Datasource in Tomcat 5.0

2004-03-05 Thread Marco Mistroni

Thanx a lot mike, it worked!  

For someone else who may experience same problem, other than the
suggestion
Given below, I downloaded mysql-connector-java-3.0.11-stable.jar

Thanx again and regards
marco




-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: 04 March 2004 19:18
To: 'Tomcat Users List'
Subject: RE: problem in configuring a Datasource in Tomcat 5.0

how about downloading a version of the mysql driver that's current? The
current driver version is far removed from the one you're using. Maybe
the error message will change slightly to give you a better hint?
(stranger things have happened).
 
http://www.mysql.com/downloads/api-jdbc-stable.html
  
I'd recommend two changes then, to your server.xml
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter
parameter
   nameurl/name
 
valuejdbc:mysql://localhost:3306/menagerie?autoReconnect=true/value
/parameter


Have you also tried replacing 'localhost' with 127.0.0.1  ?


 -Original Message-
 From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 04, 2004 3:47 AM
 To: [EMAIL PROTECTED]
 Subject: RE: problem in configuring a Datasource in Tomcat 5.0
 
 
 Hi,
   Yes I did both of them.
 In mysql I created an user named marco..below is the 
 commandline window when I did the mysql command
 
 C:\mysql\binmysql --user marco --password
 Enter password: 
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 2 to server version: 
 4.1.1a-alpha-max-debug
 
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
 mysql GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY
 'boss' WITH
 GRANT OPTION;
 Query OK, 0 rows affected (0.03 sec)
 
 
 
 In the common\lib I have put the file  mm.mysql-2.0.14-bin.jar
 
 I still cannot figure out why I am getting the exception like 
 below, That seems to say that there is no database running...
 
 org.apache.commons.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFact ory, cause:
 java.sql.SQLException: Communication failure during 
 handshake. Is there a server  running on localhost:3306?
 at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
 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)
 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)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
 ava:164)
 at 
 

RE: problem in configuring a Datasource in Tomcat 5.0

2004-03-04 Thread Marco Mistroni
Hi,
Yes I did both of them.
In mysql I created an user named marco..below is the commandline window
when
I did the mysql command

C:\mysql\binmysql --user marco --password
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.1a-alpha-max-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY
'boss' WITH
GRANT OPTION;
Query OK, 0 rows affected (0.03 sec)



In the common\lib I have put the file  mm.mysql-2.0.14-bin.jar

I still cannot figure out why I am getting the exception like below,
That seems to say that there is no database running...

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFact
ory, cause:
java.sql.SQLException: Communication failure during handshake. Is there
a server
 running on localhost:3306?
at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
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)
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)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
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.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
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.ContainerBase.invoke(ContainerBase.java:972)

at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:536)


One thing I haven't mentioned: I haven't downloaded any of the 
Files mentioned in the instruction 
Jakarta-Commons DBCP 1.0 
Jakarta-Commons Collections 2.0 
Jakarta-Commons Pool 1.0

Because I saw them already in the common\lib directory, and I thought
that
They were the proper version.

Regards
marco






RE: problem in configuring a Datasource in Tomcat 5.0

2004-03-04 Thread Mike Curwen
how about downloading a version of the mysql driver that's current? The
current driver version is far removed from the one you're using. Maybe
the error message will change slightly to give you a better hint?
(stranger things have happened).
 
http://www.mysql.com/downloads/api-jdbc-stable.html
  
I'd recommend two changes then, to your server.xml
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter
parameter
   nameurl/name
 
valuejdbc:mysql://localhost:3306/menagerie?autoReconnect=true/value
/parameter


Have you also tried replacing 'localhost' with 127.0.0.1  ?


 -Original Message-
 From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 04, 2004 3:47 AM
 To: [EMAIL PROTECTED]
 Subject: RE: problem in configuring a Datasource in Tomcat 5.0
 
 
 Hi,
   Yes I did both of them.
 In mysql I created an user named marco..below is the 
 commandline window when I did the mysql command
 
 C:\mysql\binmysql --user marco --password
 Enter password: 
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 2 to server version: 
 4.1.1a-alpha-max-debug
 
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
 mysql GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY
 'boss' WITH
 GRANT OPTION;
 Query OK, 0 rows affected (0.03 sec)
 
 
 
 In the common\lib I have put the file  mm.mysql-2.0.14-bin.jar
 
 I still cannot figure out why I am getting the exception like 
 below, That seems to say that there is no database running...
 
 org.apache.commons.dbcp.SQLNestedException: Cannot create 
 PoolableConnectionFact ory, cause:
 java.sql.SQLException: Communication failure during 
 handshake. Is there a server  running on localhost:3306?
 at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
 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)
 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)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
 ava:164)
 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.StandardEngineValve.invoke(StandardEngineVal
 ve.java:156)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
 eContext.java:151)
 at 
 

problem in configuring a Datasource in Tomcat 5.0

2004-03-03 Thread Marco Mistroni










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








!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN debug=0


  !-- Comment these entries out to disable JMX MBeans support --
  !-- You may also configure custom components (e.g. Valves/Realms) by 
   including your own mbean-descriptor file(s), and setting the 
   descriptors attribute to point to a ';' seperated list of paths
   (in the ClassLoader sense) of files to add to the default list.
   e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml
  --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
Resource name=jdbc/TestDB
   auth=Container
   type=javax.sql.DataSource/


  ResourceParams name=jdbc/TestDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value100/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
  namemaxIdle/name
  value30/value
/parameter

!-- Maximum time to wait for a dB connection to 

FW: problem in configuring a Datasource in Tomcat 5.0

2004-03-03 Thread Marco Mistroni








Hi all,

 Do
not want to spam, I forgot to mention that I was trying to connect to a 

MYSQL database running on my machine 



I found that there was a bug in previous
releases regarding configuration of datasource, so I created

The datasource
as global resource



Thanx and regards

 marco



-Original Message-
From: Marco Mistroni
[mailto:[EMAIL PROTECTED] 
Sent: 03 March 2004 14:10
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








!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN debug=0


  !-- Comment these entries out to disable JMX MBeans support --
  !-- You may also configure custom components (e.g. Valves/Realms) by 
   including your own mbean-descriptor file(s), and setting the 
   descriptors attribute to point to a ';' seperated list of paths
   (in the ClassLoader sense) of files to add to the default list.
   e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml
  --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
Resource name=jdbc/TestDB
   auth=Container
   type=javax.sql.DataSource/


  ResourceParams name=jdbc/TestDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB 

RE: problem in configuring a Datasource in Tomcat 5.0

2004-03-03 Thread Shapira, Yoav

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.


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



problem in configuring a Datasource in Tomcat 5.0

2004-03-03 Thread Marco Mistroni

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

Re: problem in configuring a Datasource in Tomcat 5.0

2004-03-03 Thread Mathew
I am also having the same problem. I just posted my sever.xml and web.xml
to the group.  Any help is really appreciated


 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
 

RE: problem in configuring a Datasource in Tomcat 5.0

2004-03-03 Thread FRANCOIS Dufour
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 -
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