0 Replies Latest reply on Oct 14, 2004 2:15 PM by Aleksandar Milanovic

    DB connection can't be found after JBoss has been running fo

    Aleksandar Milanovic Newbie

      Hi All,

      I am using JBoss 3.2.5 with MySQL 4.0.20. Since I am still debugging and testing my application, I frequently redeploy it. Sometimes, I get exceptions related to MySQL like the one below, which occurred this morning although when I left last night everything worked fine. I have to restart JBoss to work around this. Isn't there a more elegant way to deal with this?

      Thanks,
      Alex

      2004-10-14 10:08:14,178 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Could not create socket factory 'com.mysql.jdbc.StandardSocketFactory' due to underlying exception: java.lang.NullPointerException

      ** BEGIN NESTED EXCEPTION **

      java.lang.NullPointerException
      STACKTRACE:

      java.lang.NullPointerException
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:143)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:178)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:132)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      at sun.misc.Unsafe.defineClass(Native Method)
      at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
      at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
      at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:76)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:30)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
      at java.lang.Class.newInstance0(Class.java:308)
      at java.lang.Class.newIn at com.mysql.jdbc.MysqlIO.createSocketFactory(MysqlIO.java:2209)
      at com.mysql.jdbc.MysqlIO.(MysqlIO.java:219)
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:1768)
      at com.mysql.jdbc.Connection.(Connection.java:440)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:158)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:504)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:214)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:444)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:312)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      stance(Class.java:261)