com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException

Java.net JIRA | Heikki Salokanto | 4 years ago
  1. 0

    We are getting occasional "RAR5031" System Exceptions followed by a NullPointerException. This looks somewhat similar to GLASSFISH-13390. It appears to have something to do with the JDBC connections or connection pools but the trace is all but clear. The DB is a 2-node RAC of 10.2.0.5. {code} 2012-12-18T03:55:26.350+0200|SEVERE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource| _ThreadID=24;_ThreadName=Thread-2;|RAR5031:System Exception java.lang.NullPointerException 2012-12-18T03:55:26.350+0200|SEVERE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource| _ThreadID=24;_ThreadName=Thread-2;|RAR5031:System Exception com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:255) at com.sun.enterprise.resource.ConnectorXAResource.end(ConnectorXAResource.java:159) at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.delistResource(JavaEETransactionManagerSimplified.java:528) at com.sun.enterprise.resource.rm.SystemResourceManagerImpl.delistResource(SystemResourceManagerImpl.java:145) at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:381) at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77) at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784) at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217) at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587) at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474) at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429) at org.hibernate.jdbc.ConnectionManager.afterStatement(ConnectionManager.java:304) at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:572) at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:291) at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:307) at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234) at org.hibernate.loader.Loader.doQuery(Loader.java:854) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2533) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at my.own.dao.package.MyOwnDAO.selaa(MyOwnDAO.java:126) at my.own.package.MyClass.selaa(MyClass.java:42) at sun.reflect.GeneratedMethodAccessor606.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052) at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124) at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388) at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144) at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214) at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88) at $Proxy246.selaa(Unknown Source) at my.own.package.__EJB31_Generated__MyOwnClass__Intf____Bean__.selaa(Unknown Source) at my.another.package.AnotherClass.onMessage(AnotherClass.java:145) at sun.reflect.GeneratedMethodAccessor604.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052) at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124) at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348) at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099) at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81) at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171) at $Proxy336.onMessage(Unknown Source) at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260) at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497) at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540) Caused by: java.lang.NullPointerException {code} The method {{MyOwnDAO.selaa()}} (=browse) is as follows. Exception is thrown on line 126 which is {{criteria.list()}}. {code} public static List<AGame> selaa(String serialnumber, boolean onlyActive) throws AvepsiDAOException { Session session = HibernateUtil.getNMSession(); Transaction tx = null; try { tx = session.beginTransaction(); Criteria criteria = session.createCriteria(AGame.class); criteria.add(Restrictions.eq("serialnumber", serialnumber)); if (onlyActive) { criteria.add(Restrictions.eq("active", 1)); } List list = criteria.list(); tx.commit(); return list; } catch (HibernateException e) { rollbackIfActive(tx); throw new AvepsiDAOException(e, serialnumber); } } {code} Connection validation is 'on'.

    Java.net JIRA | 4 years ago | Heikki Salokanto
    com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException
  2. 0

    NullPointerException when making dataset template the default.

    GitHub | 2 years ago | pdurbin
    com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException
  3. 0

    NullPointerException when creating a dataset guestbook

    GitHub | 2 years ago | pdurbin
    com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    In glassfish Server 3.1 Application Development Guide,the description of "allow-non-component-callers" are as follows: {noformat} Connections obtained by non-component callers are not automatically closed at the end of a transaction by the container.They must be explicitly closed by the caller. "★" {noformat} But we find that the function of " allow-non-component-callers" does not like "★" when looked into the related code. If the value of "allow-non-component-callers" is false,the connection which get before transaction should be enlisted into the transaction context. For example:*part1* {code:xml} con1 = datasource.getConnection;// enlisted into the transaction ut.begin(); con2 = datasource.getConnection;// enlisted into the transaction ...... ut.commit(); {code} If the value of "allow-non-component-callers" is true,the connection which is got before transaction will not be enlisted into the transaction context. For example:*part2* {code:xml} con1 = datasource.getConnection;// will not be enlisted into the transaction ut.begin(); con2 = datasource.getConnection;// enlisted into the transaction ...... ut.commit(); {code} in *part2*,if execute con1.close before ut.commit() method. For example: {code:xml} con1 = datasource.getConnection() ut.begin(); con1.close();"★" ut.commit(); {code} When execute con1.close() method ,the program is throwing exception : {code:xml} [#|2013-01-17T16:42:20.994+0800|SEVERE|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource|_Thread ID=93;_ThreadName=Thread-2;|RAR5031:System Exception java.lang.NullPointerException at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:246) at com.sun.enterprise.resource.ConnectorXAResource.end(ConnectorXAResource.java:159) at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.delistResource(JavaEETransactionManagerSimplified.java:528) at com.sun.enterprise.resource.rm.SystemResourceManagerImpl.delistResource(SystemResourceManagerImpl.java:145) at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:381) at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77) at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784) at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217) at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587) java.lang.RuntimeException: Got exception during XAResource.end: javax.transaction.xa.XAException: com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.delistResource(JavaEETransactionManagerSimplified.java:530) at com.sun.enterprise.resource.rm.SystemResourceManagerImpl.delistResource(SystemResourceManagerImpl.java:145) at com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:381) at com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77) at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784) at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217) at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587) {code}

    Java.net JIRA | 4 years ago | jifeng
    com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException
  6. 0

    Can't redeploy application - XAResource.start

    Stack Overflow | 5 years ago | brevleq
    com.sun.appserv.connectors.internal.api.PoolingException: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.sun.appserv.connectors.internal.api.PoolingException

      java.lang.NullPointerException

      at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle()
    2. Connectors Runtime
      ConnectorXAResource.end
      1. com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:255)
      2. com.sun.enterprise.resource.ConnectorXAResource.end(ConnectorXAResource.java:159)
      2 frames
    3. Embedded GlassFish Web
      JavaEETransactionManagerSimplified.delistResource
      1. com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.delistResource(JavaEETransactionManagerSimplified.java:528)
      1 frame
    4. Connectors Runtime
      LocalTxConnectionEventListener.connectionClosed
      1. com.sun.enterprise.resource.rm.SystemResourceManagerImpl.delistResource(SystemResourceManagerImpl.java:145)
      2. com.sun.enterprise.resource.pool.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:381)
      3. com.sun.enterprise.resource.listener.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:77)
      3 frames
    5. Embedded GlassFish Web
      ConnectionHolder40.close
      1. com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:784)
      2. com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:217)
      3. com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:587)
      3 frames
    6. Hibernate
      DatasourceConnectionProvider.closeConnection
      1. org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:97)
      1 frame
    7. Hibernate
      CriteriaLoader.list
      1. org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)
      2. org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:429)
      3. org.hibernate.jdbc.ConnectionManager.afterStatement(ConnectionManager.java:304)
      4. org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:572)
      5. org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:291)
      6. org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:307)
      7. org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234)
      8. org.hibernate.loader.Loader.doQuery(Loader.java:854)
      9. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
      10. org.hibernate.loader.Loader.doList(Loader.java:2533)
      11. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
      12. org.hibernate.loader.Loader.list(Loader.java:2271)
      13. org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
      13 frames
    8. Hibernate
      CriteriaImpl.list
      1. org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
      2. org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
      2 frames
    9. my.own.dao
      MyOwnDAO.selaa
      1. my.own.dao.package.MyOwnDAO.selaa(MyOwnDAO.java:126)
      1 frame
    10. my.own.package
      MyClass.selaa
      1. my.own.package.MyClass.selaa(MyClass.java:42)
      1 frame
    11. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor606.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:616)
      3 frames
    12. Embedded GlassFish Web
      SystemInterceptorProxy.aroundInvoke
      1. org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
      2. org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
      3. com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
      4. com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
      5. com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
      6. com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
      7. com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
      8. com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
      8 frames
    13. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:616)
      3 frames
    14. Embedded GlassFish Web
      EJBLocalObjectInvocationHandlerDelegate.invoke
      1. com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
      2. com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
      3. com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
      4. com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
      5. com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
      6. com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
      7. com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
      7 frames
    15. Unknown
      $Proxy246.selaa
      1. $Proxy246.selaa(Unknown Source)
      1 frame
    16. my.own.package
      __EJB31_Generated__MyOwnClass__Intf____Bean__.selaa
      1. my.own.package.__EJB31_Generated__MyOwnClass__Intf____Bean__.selaa(Unknown Source)
      1 frame
    17. my.another.package
      AnotherClass.onMessage
      1. my.another.package.AnotherClass.onMessage(AnotherClass.java:145)
      1 frame
    18. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor604.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:616)
      3 frames
    19. Embedded GlassFish Web
      MessageBeanListenerImpl.deliverMessage
      1. org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
      2. org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
      3. com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4180)
      4. com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5368)
      5. com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
      6. com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1099)
      7. com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:81)
      7 frames
    20. Connectors Inbound Support
      MessageEndpointInvocationHandler.invoke
      1. com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:171)
      1 frame
    21. Unknown
      $Proxy336.onMessage
      1. $Proxy336.onMessage(Unknown Source)
      1 frame
    22. com.sun.messaging
      OnMessageRunner.run
      1. com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:260)
      1 frame
    23. Embedded GlassFish Web
      OneWork.doWork
      1. com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
      1 frame
    24. glassfish-corba-orbgeneric
      ThreadPoolImpl$WorkerThread.run
      1. com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
      2. com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
      2 frames