users@glassfish.java.net

Problem with transaction

From: <forums_at_java.net>
Date: Sat, 7 Apr 2012 16:18:59 -0500 (CDT)

Hello! i face an exception and i dont know how to solve the problem which
produces this exception. The app is using JTA and in Glassfish i configured a
datasource which i use in my persistence config for JPA and as datasource in
an process engine. After i finish a task using the process engine API the
data of the task is flushed to the datasource and it gets persisted
correctly. From what i can see by debugging is that the
JTATransactionInterceptor does not see an active transaction and creates a
new one using transactionManager.begin(), transactionManager being a
com.sun.enterprise.transaction.TransactionManagerHelper instance. The real
problem is that this exception only happens occasionally, thats why i can not
figure out whats going on. Maybe anybody has an idea what the exception
means? As i can not figure out whats missing when the problem occurs. Thanks,
Chris SCHWERWIEGEND: RAR5031:System Exception java.lang.NullPointerException
at
com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:246)
at
com.sun.enterprise.resource.ConnectorXAResource.start(ConnectorXAResource.java:136)
at
com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.enlistResource(JavaEETransactionManagerSimplified.java:378)
at
com.sun.enterprise.resource.rm.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:152)
at
com.sun.enterprise.resource.rm.ResourceManagerImpl.enlistResource(ResourceManagerImpl.java:112)
at
com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:211)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:338)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:301)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:190)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:160)
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:113) at
org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:73)
at
org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32)
at org.activiti.engine.impl.db.DbSqlSession.(DbSqlSession.java:86) at
org.activiti.engine.impl.db.DbSqlSessionFactory.openSession(DbSqlSessionFactory.java:80)
at
org.activiti.engine.impl.interceptor.CommandContext.getSession(CommandContext.java:179)
at
org.activiti.engine.impl.persistence.AbstractManager.getSession(AbstractManager.java:56)
at
org.activiti.engine.impl.persistence.AbstractManager.getDbSqlSession(AbstractManager.java:52)
at
org.activiti.engine.impl.persistence.entity.TaskManager.findTasksByQueryCriteria(TaskManager.java:91)
at org.activiti.engine.impl.TaskQueryImpl.executeList(TaskQueryImpl.java:368)
at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:138) at
org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at
org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at
org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
at
org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.AbstractQuery.list(AbstractQuery.java:112) at
erp.web.faces.beans.activiti.UIMediator.checkProcessInstanceStatus(UIMediator.java:41)
at
erp.web.faces.beans.activiti.UIMediator$Proxy$_$$_WeldClientProxy.checkProcessInstanceStatus(UIMediator$Proxy$_$$_WeldClientProxy.java)
at
erp.web.faces.beans.activiti.UiMediatedBusinessProcessBean.completeTask(UiMediatedBusinessProcessBean.java:36)
at org.activiti.cdi.BusinessProcess.completeTask(BusinessProcess.java:274) 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:597) at
javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:779) at
javax.el.BeanELResolver.invoke(BeanELResolver.java:528) at
javax.el.CompositeELResolver.invoke(CompositeELResolver.java:257) at
com.sun.el.parser.AstValue.invoke(AstValue.java:248) at
com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302) at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
at
org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315) at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)

--
[Message sent by forum member 'chris.joelly']
View Post: http://forums.java.net/node/884917