0 Replies Latest reply on Apr 30, 2012 9:30 AM by Robert Smith

    Error when reconnecting to a datasource using "org.jboss.resource.security.SecureIdentityLoginModule"

    Robert Smith Newbie

      Hi,

       

       

      I'm trying to use a JMX bean to restore a database connection with JBoss 5.1. It works fine when the user and password are defined in the -ds.xml file; however, once I attempt to use the login-config.xml to encrypt the password, I receive the following error when attempting to reconnect:

       

      WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null

      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'ticketing')

              at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:465)

              at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:409)

              at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)

              at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)

              at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)

              at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)

              at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)

              at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)

              at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

              at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)

              at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)

              at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:572)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:636)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:665)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:673)

              at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)

              at com.intrado.iup.ticketing.dao.mysql.TicketMysqlDao.findAllLockedTickets(TicketMysqlDao.java:263)

              at com.intrado.iup.ticketing.support.CheckedLockedTicketTimerTask.run(CheckedLockedTicketTimerTask.java:49)

              at java.util.TimerThread.mainLoop(Timer.java:512)

              at java.util.TimerThread.run(Timer.java:462)

       

       

      Any help would be greatly appreciated. Thanks, Bob