wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Entity Bean (BMP) Error connecting to MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Entity Bean (BMP) Error connecting to MySQL" Watch "Entity Bean (BMP) Error connecting to MySQL" New topic
Author

Entity Bean (BMP) Error connecting to MySQL

Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
I hava an Entity Bean using BMP. All is packed into an ear. I can debug with Eclipse IDE 3.2.2. But I have an Exception:

14:26:15,486 INFO [STDOUT] java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)
14:26:15,488 INFO [STDOUT] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
14:26:15,490 INFO [STDOUT] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
14:26:15,492 INFO [STDOUT] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
14:26:15,494 INFO [STDOUT] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
14:26:15,496 INFO [STDOUT] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
14:26:15,497 INFO [STDOUT] at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
14:26:15,499 INFO [STDOUT] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
14:26:15,501 INFO [STDOUT] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
14:26:15,503 INFO [STDOUT] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
14:26:15,505 INFO [STDOUT] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
14:26:15,506 INFO [STDOUT] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
14:26:15,508 INFO [STDOUT] at java.sql.DriverManager.getConnection(DriverManager.java:525)
14:26:15,510 INFO [STDOUT] at java.sql.DriverManager.getConnection(DriverManager.java:193)
14:26:15,512 INFO [STDOUT] at es.deusto.ejb.BooksBean.getConnection(BooksBean.java:321)
14:26:15,514 INFO [STDOUT] at es.deusto.ejb.BooksBean.ejbCreate(BooksBean.java:83)

The problem is in java.sql.Connection. I am using all grants for 'jboss' DB, with may user and pass. Everything is OK. But I can not establish the connection.

Any idea?

PS:
I am going to try the same problem but CPM in this case.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

14:26:15,510 INFO [STDOUT] at java.sql.DriverManager.getConnection(DriverManager.java:193)
14:26:15,512 INFO [STDOUT] at es.deusto.ejb.BooksBean.getConnection(BooksBean.java:321)


Jose,

Are you trying to get a connection through JDBC? Are you sure you are passing the correct username/password to the getConnection method?


[My Blog] [JavaRanch Journal]
Jose Alvarez de Lara
Ranch Hand

Joined: May 10, 2008
Posts: 92
You right. That was the reasson why.

Thank you
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Entity Bean (BMP) Error connecting to MySQL