[JBoss-user] [JBoss jBPM] - Re: cannot jbpmSession.commitTransaction()
thank you both guys, i really appreciate it ;-) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922722#3922722 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922722 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: cannot jbpmSession.commitTransaction()
thanks for the replies. yes, changing the MDB xdoclet settings (transaction-type="Bean" ) is not what i need :) RAlfoeldi, i d appreciate it if you could paste the hibernate here, i havent get it to work yet :S thanks again. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922602#3922602 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922602 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: cannot jbpmSession.commitTransaction()
thanks, though unfortunately i dont know how to implement what you suggest in my case... If i am right, the problem occurs because i have stated that the MDB transactions are handled by the container (JBOSS) [MDB xdoclet settings: transaction-type="Container" ] Anyone knows how to make it work? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922413#3922413 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922413 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - cannot jbpmSession.commitTransaction()
hello, i have the following code inside a method which is being called from an onMessage() method of an MDB : | JbpmSession jbpmSession = jbpmSessionFactory.openJbpmSession(); | jbpmSession.beginTransaction(); | jbpmSession.getGraphSession().saveProcessInstance(processInstance); | System.out.println("[ProcessExecution] Saved processInstance with ID:"+processInstance.getId()); | jbpmSession.commitTransaction(); | jbpmSession.close(); | And i m getting the following error and stack trace: | 22:36:31,515 ERROR [JDBCTransaction] JDBC commit failed | java.sql.SQLException: You cannot commit during a managed transaction! | at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:432) | at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:331) | at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:139) | at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115) | at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:103) | at com.adminsys.ejb.ProcessExecutionFacadeBean.storeProcessInstance(ProcessExecutionFacadeBean.java:126) | at com.adminsys.ejb.ProcessExecutionFacadeBean.endTaskOfProcess(ProcessExecutionFacadeBean.java:284) | at com.adminsys.ejb.TaskEvaluatedBean.onMessage(TaskEvaluatedBean.java:102) | 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:324) | at org.jboss.invocation.Invocation.performCall(Invocation.java:345) | at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475) | at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149) | at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) | at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) | at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106) | at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335) | at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166) | at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) | at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) | at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) | at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) | at org.jboss.ejb.Container.invoke(Container.java:873) | at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) | at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) | at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) | at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) | at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) | at org.jboss.mq.SpySession.run(SpySession.java:333) | at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) | at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748) | at java.lang.Thread.run(Thread.java:536) | 22:36:31,546 ERROR [JbpmSession] org.hibernate.TransactionException: JDBC commit failed | 22:36:31,546 INFO [STDOUT] java.lang.RuntimeException: couldn't commit transaction | 22:36:31,546 INFO [STDOUT] at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:107) | 22:36:31,546 INFO [STDOUT] at com.adminsys.ejb.ProcessExecutionFacadeBean.storeProcessInstance(ProcessExecutionFacadeBean.java:126) | 22:36:31,546 INFO [STDOUT] at com.adminsys.ejb.ProcessExecutionFacadeBean.endTaskOfProcess(ProcessExecutionFacadeBean.java:284) | 22:36:31,546 INFO [STDOUT] at com.adminsys.ejb.TaskEvaluatedBean.onMessage(TaskEvaluatedBean.java:102) | 22:36:31,546 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | 22:36:31,546 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | 22:36:31,546 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | 22:36:31,546 INFO [STDOUT] a
[JBoss-user] [JBoss jBPM] - Re: Task-node execution & JMS problem
It finally worked! The problem was that the jndi references to the JMS queue and factory should have also been made at the MDB so as to be retrieved when the asynchronous execution thread would start ! With the X-Doclet like this : | * @ejb.resource-ref | * res-ref-name="jms/TaskWaitingUserQueue" | * res-type="javax.jms.Queue" | * res-auth="Container" | * | * @jboss.resource-ref | * res-ref-name="jms/TaskWaitingUserQueue" | * jndi-name="queue/TaskWaitingUserQueue" | * | * @ejb.resource-ref | * res-ref-name="jms/MyXAQueueConnectionFactory" | * res-type="javax.jms.QueueConnectionFactory" | * res-auth="Container" | * | * @jboss.resource-ref | * res-ref-name="jms/MyXAQueueConnectionFactory" | * jndi-name="java:/JmsXA" | That was all.. :S View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921936#3921936 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921936 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Task-node execution & JMS problem
Alex thank you for your response. Yes, i declare two names for the same connection factory and i have tried all the different combinations i could think of, but still i get the same error... javax.naming.NameNotFoundException: jms not bound Here is the xdoclet code for the web.xml and jboss-web.xml,if you can get any ideas :) That were the most probable settings to have worked i think | ... | * @web.resource-ref | * name="jms/TaskWaitingUserQueue" | * type="javax.jms.Queue" | * auth="Container" | * | * @web.resource-ref | * name="jms/EvaluatedTasksQueue" | * type="javax.jms.Queue" | * auth="Container" | * | * @jboss.resource-ref | * res-ref-name="jms/TaskWaitingUserQueue" | * jndi-name="queue/TaskWaitingUserQueue" | * | * @jboss.resource-ref | * res-ref-name="jms/EvaluatedTasksQueue" | * jndi-name="queue/EvaluatedTasksQueue" | * | * @web.resource-ref | * name="jms/MyXAQueueConnectionFactoryA" | * type="javax.jms.QueueConnectionFactory" | * auth="Container" | * | * @jboss.resource-ref | * res-ref-name="jms/MyXAQueueConnectionFactoryA" | * jndi-name="java:/JmsXA" | * | * @web.resource-ref | * name="jms/MyXAQueueConnectionFactoryB" | * type="javax.jms.QueueConnectionFactory" | * auth="Container" | * | * @jboss.resource-ref | * res-ref-name="jms/MyXAQueueConnectionFactoryB" | * jndi-name="java:/JmsXA" | ... | I am sure that the problem exists because the onMessage() method has not exited before the lookup is done again. I ve tried to set the session in client-acknowledge mode session = connection.createSession(true, Session.CLIENT_ACKNOWLEDGE); and then acknowledge the message inside the onMessage(): | ... | TaskWaitingDTO task = (TaskWaitingDTO) obj; | //End task of process instance that is waiting. | String pid = task.getProcessID(); | message.acknowledge(); | ProcessExecution p = new ProcessExecution(); | p.endTaskOfProcess(task); | System.out.println("[TaskEvaluatedBean] now exiting.."); | ... | ..but that doesn't work either. Please, if you have any ideas i d be more than thankful.. i m stack here since Sunday! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921170#3921170 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921170 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Re: Task-node execution & JMS problem
It is the connection factory... Actually there are two queues declared and one connection factory.As soon as it goes for the lookup of the connection factory in the JNDI, it throws the forementioned exception. Do you think the problem comes from that there is only one connection factory? I read somewhere that declaring the connectionfactory in the jboss-web.xml with the value java:/JmsXA indicates that this QueueConnectionFactory participates in distributed transactions. Does it have anything do to with it? Thanks View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3920615#3920615 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3920615 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss jBPM] - Task-node execution & JMS problem
Hello, I have been working with Jbpm a while now until i came across this weird phenomenon.. In my workflow there are 2 task-nodes one after the other : | | | | | | | | | | | | | | | | | In the actionhandler , a JMS message is constructed and sent to a queue binded in JBoss' JNDI using a JMS producer class. After some functionality, another JMS message is sent (in another queue) which signals that the task was completed and is supposed to continue the execution. The MDB that listens to this queue opens a JBPM session and tries to retrieve the task instance of the task that is waiting (described in the message), so that it can call taskInstance.end();. So the problem is the following: If i call the taskInstance.end() then the execution continues with transition to the next task ,and therefore trying to send another JMS message, so i get a com.adminsys.util.ServiceLocatorException: javax.naming.NameNotFoundException: jms not bound I know it's not clearly a JBPM issue but i dont know who else to refer to. Can anyone please help ? Am i missing out sth here ? Any help and suggestions are welcome. Thanks in advace, George View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3920408#3920408 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3920408 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user