Link to home
Start Free TrialLog in
Avatar of vblovebug
vblovebug

asked on

Error in connecting Mysql in JBoss

I am trying to implement CMP entity bean with JBoss 4.0.1. I have followed all the instruction from an article http://www.developer.com/java/ent/article.php/10933_3405781_3

I am using MySQL 4. While deploying the bean I am getting an error :

java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user: 'x@localhost' (Using password: YES)" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:954)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:1786)
        at com.mysql.jdbc.Connection.<init>(Connection.java:450)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:411)
................

My configuration file mysql-ds.xml is like this:

<datasources>
   <local-tx-datasource>
      <jndi-name>MySqlDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/jbossdb
         </connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>userjboss</user-name>
      <password>zzz</password>
      </local-tx-datasource>
</datasources>

With the userjboss i am able to connect mysql from command prompt then what could be the problem in jboss.

And is it possible to use msAccess instead of mysql to implement CMP bean???
pls help

thanks


Avatar of msinan
msinan

Have you checked for the latest released provider of mySql?
ASKER CERTIFIED SOLUTION
Avatar of vkathiravan
vkathiravan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

The solution often suggested is to GRANT access privileges on a per-database-level. Some solutions even suggest editing the mysql tables directly. The whole thing is a bit too mysterious for my taste. The Tomcat developers should probably think of having a resolution for this problem on their website.

If you grant privileges on a TABLE level instead of a DATABASE level, for some strange reason, the access is given.

Example:
GRANT SELECT, INSERT, UPDATE, DELETE ON somedatabase.sometable TO someuser IDENTIFIED BY 'somepass';

R.K
My Solution also supports the problem , bcz its under database level checking also needed !

R.K
rama_krishna580,

:) Yes. The problem is that it is more than 2 months after ANY comment here. usually after this time the Asker do not really need the solution and the cleanup do not award points on late answers except when the Asker had returned after this...
Ok no problem ! Thank you !

I want to congratulate you for doing great job here as moderator/Page Editor and giving prompt responses ! Really appreciate your effort and time !

Best of luck Venavili!

R.K