users@glassfish.java.net

Re: Insert fails in Sun AS 9.1 while read, update and delete works?

From: <glassfish_at_javadesktop.org>
Date: Tue, 22 Jan 2008 03:49:53 PST

Hi,

I'm running into the same/similar problem on SJAS 8.1_02, with JDK_1.5.0_11, Spring 2.0.3, Hibernate 3.2.3ga. I'm using CMT, no Spring txns.

The weird thing is that the application works fine (reads, inserts, updates) except for this very one scenario during which I always get this exception.

I don't have a clue what might be wrong.

Any help would be appreciated.

Thanks,
EDH

[#|2008-01-22T12:28:12.568+0100|SEVERE|sun-appserver-ee8.1_02|javax.enterprise.resource.resourceadapter|_ThreadID=21;|RAR5031:System Exception
java.lang.NullPointerException
        at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:177)
        at com.sun.enterprise.resource.ConnectorXAResource.start(ConnectorXAResource.java:88)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:129)
        at com.sun.enterprise.resource.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:113)
        at com.sun.enterprise.resource.ResourceManagerImpl.enlistResource(ResourceManagerImpl.java:71)
        at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:258)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:193)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:122)
        at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:70)
        at sun.reflect.GeneratedMethodAccessor227.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
        at $Proxy108.getConnection(Unknown Source)
        at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
        at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94)
        at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
        at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:222)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2224)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2660)
        at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:52)
        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
        at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
        at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
        at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:272)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:336)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2754)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2557)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:841)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:137)
        at $Proxy84.processZending(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:585)
        at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy99.processZending(Unknown Source)
        at be.vlaanderen.ov.edison.service.zendingen.zendingbatch.ZendingBatchServiceImpl.process(ZendingBatchServiceImpl.java:225)
        at be.vlaanderen.ov.edison.service.zendingen.zendingbatch.ZendingBatchServiceImpl.processZendingBatch(ZendingBatchServiceImpl.java:124)
        at be.vlaanderen.ov.edison.serviceaccess.zendingen.zendingbatch.ZendingBatchServiceFacadeBean.processZendingBatch(ZendingBatchServiceFacadeBean.java:42)
        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:585)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:128)
        at $Proxy70.processZendingBatch(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:585)
        at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy98.processZendingBatch(Unknown Source)
        at be.vlaanderen.ov.edison.service.zendingen.zendingbatch.ZendingBatchBatchProcessingController.process(ZendingBatchBatchProcessingController.java:71)
        at be.vlaanderen.ov.edison.serviceaccess.zendingen.zendingbatch.ZendingBatchConsumerBean.onMessage(ZendingBatchConsumerBean.java:50)
        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:585)
        at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:955)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
        at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:956)
        at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:42)
        at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:130)
        at $Proxy109.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:187)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:45)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
[Message sent by forum member 'edwindhondt' (edwindhondt)]

http://forums.java.net/jive/thread.jspa?messageID=255136