Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-186

NPE during (quick?) init of JDBC driver/pool from JBoss

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.2.0, 1.3.0, 1.2.2, 1.2.3, 1.3.2, 1.3.1, 1.3.3
    • 1.3.4
    • Other
    • None
    • CentOS 6.7, JBoss AS 5 (Managed connections)

    Description

      Sometimes when we do loads tests on our application (cold started) we receive an NPE from the JDBC driver (trace below).

      Application runs in JBoss AS5 (5.1.0GA) and MariaDB DS is configured as Local Tx Datasource with failover active.

      Just restarting the load test seems to fix the problem. Possibly this could be a "cold-start-initial config-race-condition"?

      Stack trace

      2015-08-25 11:05:03,568 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (pool-33-thread-1) Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.lang.NullPointerException)
              at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
              at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
              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:679)
              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.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92)
              at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
              at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
              at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
              at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1573)
              at org.hibernate.loader.Loader.doQuery(Loader.java:696)
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
              at org.hibernate.loader.Loader.doList(Loader.java:2228)
              at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
              at org.hibernate.loader.Loader.list(Loader.java:2120)
              at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
              at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
              at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
              at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
              at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
              at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
              at syrei.tas2.auth.domain.jpa.JpaAuthenticationQuintupletDao.findByImsi(JpaAuthenticationQuintupletDao.java:64)
              at com.syrei.tas2.auth.hlr.av.HlrAuthVectorSbb.requestVector(HlrAuthVectorSbb.java:125)
              at com.syrei.tas2.auth.hlr.av.HlrAuthVectorSbb.requestVector(HlrAuthVectorSbb.java:90)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.mobicents.slee.container.deployment.interceptors.SbbLocalObjectInterceptor.invokeAndReturnObject(SbbLocalObjectInterceptor.java:95)
              at org.mobicents.slee.container.deployment.interceptors.SbbLocalObjectInterceptor.invokeAndReturnvoid(SbbLocalObjectInterceptor.java:154)
              at com.syrei.tas2.auth.hlr.av.HlrAuthVectorSbbLocalObjectImpl.requestVector(HlrAuthVectorSbbLocalObjectImpl.java)
              at com.syrei.tas2.auth.hlr.HlrAuthorizationSbb.requestVectorsFromHlr(HlrAuthorizationSbb.java:193)
              at com.syrei.tas2.auth.hlr.HlrAuthorizationSbb.challenge(HlrAuthorizationSbb.java:162)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.mobicents.slee.container.deployment.interceptors.SbbLocalObjectInterceptor.invokeAndReturnObject(SbbLocalObjectInterceptor.java:95)
              at org.mobicents.slee.container.deployment.interceptors.SbbLocalObjectInterceptor.invokeAndReturnvoid(SbbLocalObjectInterceptor.java:154)
              at com.syrei.tas2.auth.hlr.HlrAuthorizationSbbLocalObjectImpl.challenge(HlrAuthorizationSbbLocalObjectImpl.java)
              at com.syrei.tas2.auth.AuthorizationSbb.onAuthenticationRequestEvent(AuthorizationSbb.java:155)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.mobicents.slee.runtime.sbbentity.SbbEntityImpl.invokeEventHandler(SbbEntityImpl.java:479)
              at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.routeQueuedEvent(EventRoutingTaskImpl.java:379)
              at org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.run(EventRoutingTaskImpl.java:126)
              at org.mobicents.slee.runtime.eventrouter.EventRouterExecutorImpl$EventRoutingTaskStatsCollector.run(EventRouterExecutorImpl.java:76)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
              at org.mariadb.jdbc.internal.mysql.listener.AbstractMastersListener.resetOldsBlackListHosts(AbstractMastersListener.java:146)
              at org.mariadb.jdbc.internal.mysql.listener.impl.MastersFailoverListener.reconnectFailedConnection(MastersFailoverListener.java:176)
              at org.mariadb.jdbc.internal.mysql.listener.impl.MastersFailoverListener.initializeConnection(MastersFailoverListener.java:85)
              at org.mariadb.jdbc.internal.mysql.FailoverProxy.<init>(FailoverProxy.java:86)
              at org.mariadb.jdbc.internal.common.Utils.retrieveProxy(Utils.java:535)
              at org.mariadb.jdbc.Driver.connect(Driver.java:102)
              at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
              ... 56 more

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            ricstra-polystar Richard Strate
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.