1 Reply Latest reply on Apr 5, 2005 12:42 PM by Franco

    Suse - JBoss - Mysql doesn't work! please help me!

    Alex Dorandish Newbie

      Hi All,

      I am trying to start the jboss on suse with mysql preinstalled on suse.
      I have exactly the same configuration on my macos x and windows machine and jboss starts fine. But not on suse machine. I get the following exceptions:

      What I have done to resolve the issue so far:
      1- I manually add all previledges to my database using the following line

      GRANT ALL PRIVILEGES ON dating.* TO arash IDENTIFIED BY 'mypassword' WITH GRANT OPTION


      2- I changed my *-ds.xml to look like this
      
      <datasources>
       <local-tx-datasource>
       <jndi-name>DefaultDataSource</jndi-name>
       <connection-url>jdbc:mysql://localhost/dating</connection-url>
       <driver-class>com.mysql.jdbc.Driver</driver-class>
       <user-name>arash</user-name>
       <password>mypassword</password>
       </local-tx-datasource>
      </datasources>
      


      3- I placed the mysql*.jar (driver) in /usr/shared/jboss/server/default/lib

      It just doesn't want to work!



      Caused by: org.jboss.deployment.DeploymentException: Error while fixing table name; - nested throwable: (org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused)))
      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.init(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(Unknown Source)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(Unknown Source)
      at org.jboss.ejb.EntityContainer.startService(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      ... 113 more
      Caused by: org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused))
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Unknown Source)
      ... 124 more
      Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(Unknown Source)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(Unknown Source)
      ... 125 more
      Caused by: java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1719)
      at com.mysql.jdbc.Connection.<init>(Connection.java:432)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
      ... 133 more
      22:25:40,372 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(Unknown Source)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(Unknown Source)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(Unknown Source)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.init(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(Unknown Source)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(Unknown Source)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(Unknown Source)
      at org.jboss.ejb.EntityContainer.startService(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(Unknown Source)
      at $Proxy17.start(Unknown Source)
      at org.jboss.system.ServiceController.start(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.mx.util.MBeanProxyExt.invoke(Unknown Source)
      at $Proxy33.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(Unknown Source)
      at $Proxy17.start(Unknown Source)
      at org.jboss.system.ServiceController.start(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.mx.util.MBeanProxyExt.invoke(Unknown Source)
      at $Proxy14.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
      at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.mx.util.MBeanProxyExt.invoke(Unknown Source)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(Unknown Source)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(Unknown Source)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(Unknown Source)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(Unknown Source)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.mx.util.MBeanProxyExt.invoke(Unknown Source)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
      at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
      at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
      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 org.jboss.mx.server.ReflectedDispatcher.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
      at org.jboss.mx.server.Invocation.invoke(Unknown Source)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
      at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
      at org.jboss.mx.util.MBeanProxyExt.invoke(Unknown Source)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(Unknown Source)
      at org.jboss.system.server.ServerImpl.start(Unknown Source)
      at org.jboss.Main.boot(Unknown Source)
      at org.jboss.Main$1.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1719)
      at com.mysql.jdbc.Connection.<init>(Connection.java:432)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
      ... 133 more