[jboss-user] [JBoss Seam] - Re: Message Driven Bean starting jbpm process
jgeraert
do-not-reply at jboss.com
Thu Oct 4 00:05:03 EDT 2007
Hello,
What i have now:
| public class InklessMessageListener implements MessageListener {
|
| @EJB
| InklessProcessManager inklessProcessManager;
|
| //@CreateProcess(definition="inkless")
| public void onMessage(Message arg0) {
|
| inklessProcessManager.startProcess();
|
| }
|
| }
|
and
| @Stateless
| @Name("inklessProcessManager")
| public class InklessProcessManagerImpl implements InklessProcessManager {
|
| @CreateProcess(definition="inkless")
| @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
| public void startProcess() {
| }
|
| }
|
but this gives me transaction issues as well. I suspect the NullPointerException may be the root cause.
| 05:59:11,766 ERROR [JmsServerSession] Unexpected error delivering message SpyTextMessage {
| Header {
| jmsDestination : TOPIC.Shopfloor
| jmsDeliveryMode : 2
| jmsExpiration : 0
| jmsPriority : 4
| jmsMessageID : ID:6-11914703510711
| jmsTimeStamp : 1191470351070
| jmsCorrelationID: null
| jmsReplyTo : null
| jmsType : null
| jmsRedelivered : true
| jmsProperties : {JMS_JBOSS_REDELIVERY_COUNT=1}
| jmsPropReadWrite: false
| msgReadOnly : true
| producerClientId: ID:6
| }
| Body {
| text :<?xml version="1.0" encoding="UTF-8"?><lot><lotnumber>A93338//DE</lotnumber><item>201210600</item><organization>MLX_SOF_SOF_IO</organization><subcontractor>O_CARSEM</subcontractor><wafers><wafer id="1"><gooddiecount>1747</gooddiecount></wafer><wafer id="2"><gooddiecount>1770</gooddiecount></wafer></wafers></lot>
| }
| }
| javax.ejb.EJBTransactionRolledbackException
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:245)
| at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
| at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
| at $Proxy185.onMessage(Unknown Source)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
| at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:891)
| at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
| at org.jboss.mq.SpySession.run(SpySession.java:323)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NullPointerException
| at org.jboss.seam.contexts.BusinessProcessContext.getNamesFromContext(BusinessProcessContext.java:115)
| at org.jboss.seam.contexts.BusinessProcessContext.getNames(BusinessProcessContext.java:97)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:241)
| at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:356)
| at org.jboss.seam.contexts.Lifecycle.endCall(Lifecycle.java:92)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:120)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.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 org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| ... 17 more
| 05:59:11,776 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
| 05:59:11,776 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:dba4:47046487:87 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:dba4:47046487:87 status: ActionStatus.ABORTED >)
| 05:59:11,786 ERROR [SynchronizationRegistry] Exception processing transaction Synchronization after completion
| org.hibernate.exception.GenericJDBCException: Cannot open connection
| at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
| at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
| at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:123)
| at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:73)
| at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
| at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
| at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
| at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
| at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
| at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
| at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
| at org.jbpm.logging.db.DbLoggingService.log(DbLoggingService.java:50)
| at org.jbpm.svc.save.SaveLogsOperation.save(SaveLogsOperation.java:47)
| at org.jbpm.svc.Services.save(Services.java:161)
| at org.jbpm.JbpmContext.save(JbpmContext.java:427)
| at org.jbpm.JbpmContext.autoSave(JbpmContext.java:620)
| at org.jbpm.JbpmContext.close(JbpmContext.java:137)
| at org.jboss.seam.bpm.ManagedJbpmContext.closeContext(ManagedJbpmContext.java:155)
| at org.jboss.seam.bpm.ManagedJbpmContext.afterCompletion(ManagedJbpmContext.java:131)
| at org.jboss.seam.transaction.SynchronizationRegistry.afterTransactionCompletion(SynchronizationRegistry.java:42)
| at org.jboss.seam.transaction.EjbSynchronizations.afterCompletion(EjbSynchronizations.java:75)
| at org.jboss.ejb3.stateful.SessionSynchronizationInterceptor$SFSBSessionSynchronization.afterCompletion(SessionSynchronizationInterceptor.java:91)
| at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:136)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:340)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:107)
| at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:201)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1451)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:163)
| at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:126)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession$XATransactionDemarcationStrategy.end(JmsServerSession.java:475)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:248)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:dba4:47046487:87 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:dba4:47046487:87 status: ActionStatus.ABORTED >)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
| at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
| ... 36 more
| Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:dba4:47046487:87 status: ActionStatus.ABORTED >
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| ... 38 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091327#4091327
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091327
More information about the jboss-user
mailing list