1 Reply Latest reply on Mar 1, 2004 5:57 AM by Ulf Schroeter

    Can't get an XAConnection please help

    joseph2003 Newbie

      Hi,

      I'm using jboss 2.4.10_tomcat 4.0.6.
      while trying to connect to the data base (mysql 4.0.18)
      i get the following error

      [ERROR,XAConnectionFactory] Can't get an XAConnection
      java.sql.SQLException: Invalid authorization specification: Access denied for user: 'comsys@localhost' (Using password: YES)
      at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:330)
      at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:261)
      at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
      at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
      at java.sql.DriverManager.getConnection(DriverManager.java:512)
      at java.sql.DriverManager.getConnection(DriverManager.java:171)
      at org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl.getXAConnection(XADataSourceImpl.java:188)
      at org.jboss.pool.jdbc.xa.XAConnectionFactory.createObject(XAConnectionFactory.java:336)
      at org.jboss.pool.ObjectPool.createNewObject(ObjectPool.java:1023)
      at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:677)
      at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:252)
      at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:455)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:209)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)
      [ERROR,ComnetDS] Stopped
      java.lang.RuntimeException: Could not create connection
      at org.jboss.pool.ObjectPool.createNewObject(ObjectPool.java:1027)
      at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:677)
      at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:252)
      at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:455)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:209)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)
      [ERROR,ConfigurationService] Unexpected error
      java.lang.RuntimeException: Could not create connection
      at org.jboss.pool.ObjectPool.createNewObject(ObjectPool.java:1027)
      at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:677)
      at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:252)
      at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:455)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:209)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)
      [INFO,ContainerFactory] Starting





      the following is the relevant section from jboss.jcml


      <!-- ==================================================================== -->
       <!-- JDBC -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
       <attribute name="Drivers">org.gjt.mm.mysql.Driver,org.hsqldb.jdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver</attribute>
       </mbean>
      
      
       <!-- DATA SOURCE DEFINITION FOR MYSQL DATABASE -->
       <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=ComnetDS">
       <attribute name="PoolName">ComnetDS</attribute>
       <attribute name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attribute>
       <attribute name="Properties"></attribute>
       <attribute name="URL">jdbc:mysql://localhost/Comnet</attribute>
       <attribute name="GCMinIdleTime">1200000</attribute>
       <attribute name="JDBCUser">comsys</attribute>
       <attribute name="MaxSize">10</attribute>
       <attribute name="Password">comsys</attribute>
       <attribute name="GCEnabled">false</attribute>
       <attribute name="InvalidateOnError">false</attribute>
       <attribute name="TimestampUsed">false</attribute>
       <attribute name="Blocking">true</attribute>
       <attribute name="GCInterval">120000</attribute>
       <attribute name="IdleTimeout">1800000</attribute>
       <attribute name="IdleTimeoutEnabled">false</attribute>
       <attribute name="LoggingEnabled">false</attribute>
       <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
       <attribute name="MinSize">0</attribute>
       </mbean>
      
      


      Thanks in advance
      Sincerely,
      Joseph