Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-19 Thread Mikolaj Rydzewski

Fredy Provoste wrote:

Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried
to configure a mysql connection pool, so in the path

libreria
.
.  META-INF/context.xml

put the lines

Context path=/libreria docBase=libreria  debug=5 privileged=true
reloadable=true
  

You should not use path attribute in META-INF/context.xml.

--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


RE: Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-19 Thread Caldarale, Charles R
 From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] 
 Subject: Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6)
 
  Context path=/libreria docBase=libreria  debug=5 
  privileged=true reloadable=true
  
 You should not use path attribute in META-INF/context.xml.

Nor docBase, for that matter.  But removing those is not likely to solve
the OP's problem, although it's always good to get the obvious errors
cleaned up.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-19 Thread Steve Ochani
Date sent:  Wed, 19 Sep 2007 00:26:04 -0400
From:   Fredy Provoste [EMAIL PROTECTED]
Subject:Question about JNDI + Connection Pool + Mysql (Tomcat 6)
To: Tomcat User List users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org

 Hi again, i've been deployed a webapp called libreria in Tomcat 6, i
 tried to configure a mysql connection pool, so in the path
 
 libreria
 .
 .  META-INF/context.xml
 
 put the lines
 
 Context path=/libreria docBase=libreria  debug=5
 privileged=true reloadable=true
 
 Resource name=jdbc/basededatos auth=Container type=
 com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
 factory=com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory
 driverClassName=com.mysql.jdbc.Driver  username=usuarioweb
 password=usuarioweb
 url=jdbc:mysql://localhost:3306/prueba1?autoReconnect=true/
 
 /Context
 
 
 
 in  the path
 
 libreria
 .
 WEB-INF/web.xml
 
 the lines to use the JNDI resource
 
 
 resource-ref
   description
 Pool a la Base de Datos
   /description
   res-ref-name
 jdbc/basededatos
   /res-ref-name
   res-type
 com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
   /res-type
   res-auth
 Container
   /res-auth
   /resource-ref
 
 
 so trying using JSTL, and pure JSP to access the pool, i get the next
 message
 
 ERROR java.sql.SQLException: Access denied for user ''@'localhost'
 (using password: YES) seems like tomcat ignores my user i've created
 in mysql server (I verify the connection through dreamweaver conection
 feature and it works)
 

That error is from mysql server and it doesn't mean that the password that was 
used was 
YES  it just means that a password was used. The password that was used will 
not be 
logged.

Make sure you have an account on mysql server as 
[EMAIL PROTECTED]

which is different than

usuarioweb@'%'

Test it by loggin in from local machine.

-Steve O.




 thanks for any help
 
 Fredy
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-18 Thread Fredy Provoste
Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried
to configure a mysql connection pool, so in the path

libreria
.
.  META-INF/context.xml

put the lines

Context path=/libreria docBase=libreria  debug=5 privileged=true
reloadable=true

Resource name=jdbc/basededatos auth=Container type=
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
factory=com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory
driverClassName=com.mysql.jdbc.Driver  username=usuarioweb
password=usuarioweb
url=jdbc:mysql://localhost:3306/prueba1?autoReconnect=true/

/Context



in  the path

libreria
.
WEB-INF/web.xml

the lines to use the JNDI resource


resource-ref
  description
Pool a la Base de Datos
  /description
  res-ref-name
jdbc/basededatos
  /res-ref-name
  res-type
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
  /res-type
  res-auth
Container
  /res-auth
  /resource-ref


so trying using JSTL, and pure JSP to access the pool, i get the next
message

ERROR java.sql.SQLException: Access denied for user ''@'localhost' (using
password: YES)
seems like tomcat ignores my user i've created in mysql server (I verify the
connection through dreamweaver conection feature and it works)

thanks for any help

Fredy


Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-18 Thread Titi Wangsa
try changing
username=usuarioweb
to
user=usuarioweb

from
http://www.docjar.com/docs/api/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.html#setUser(java.lang.String)


On 9/19/07, Fredy Provoste [EMAIL PROTECTED] wrote:
 Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried
 to configure a mysql connection pool, so in the path

 libreria
 .
 .  META-INF/context.xml

 put the lines

 Context path=/libreria docBase=libreria  debug=5 privileged=true
 reloadable=true

 Resource name=jdbc/basededatos auth=Container type=
 com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
 factory=com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory
 driverClassName=com.mysql.jdbc.Driver  username=usuarioweb
 password=usuarioweb
 url=jdbc:mysql://localhost:3306/prueba1?autoReconnect=true/

 /Context



 in  the path

 libreria
 .
 WEB-INF/web.xml

 the lines to use the JNDI resource


 resource-ref
   description
 Pool a la Base de Datos
   /description
   res-ref-name
 jdbc/basededatos
   /res-ref-name
   res-type
 com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
   /res-type
   res-auth
 Container
   /res-auth
   /resource-ref


 so trying using JSTL, and pure JSP to access the pool, i get the next
 message

 ERROR java.sql.SQLException: Access denied for user ''@'localhost' (using
 password: YES)
 seems like tomcat ignores my user i've created in mysql server (I verify the
 connection through dreamweaver conection feature and it works)

 thanks for any help

 Fredy


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]