Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity Bean (BMP) Error connecting to MySQL

 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jose Alvarez de Lara
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You right. That was the reasson why.

Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic