I'm using tomcat and mysql (the ide is eclipse). I'm using the connection pool.
In the context.xml, I have:
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/mydb"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" />
At the beginning I've been using the mysql in easyphp (the user root had no pwd). All worked. Then I've added the pwd and changed the context.xml properly (like it's now).
Since then, I've these exceptions:
Unexpected exception resolving reference
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
Failed to register in JMX: javax.naming.NamingException: Access denied for user 'root'@'localhost' (using password: NO)
lug 13, 2012 9:16:45 AM org.apache.naming.NamingContext lookup
Unexpected exception resolving reference
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
The "strange" thing is that the app succeeds in writing on db.
I've disinstalled easyphp and I install mysql on port 3306 creating the root user with pwd root.
I obtain the same exceptions.