[Beginner's Corner] - Hibernate search with JPA query intersection
by iliax iliax
iliax iliax [https://community.jboss.org/people/iliax] created the discussion
"Hibernate search with JPA query intersection"
To view the discussion, visit: https://community.jboss.org/message/823533#823533
--------------------------------------------------------------
Hi everyone!
I am using hibernate 4 as JPA provider in Jboss AS 7.2. Today i enabled hiberante search module and it just works fine. I planned to use fulltext search in some kind of filter(I used Criteria API for that before). Now I want to combine Criteria query with hib-search query, but the problem is that i have maxResult and pagination(and other) restrictions in criteria query and a dont know how to combine this with hib-search(or lucene) query, that returns all entities which rows matches tha search patterns?
I know, that there is a FullTextQuery.setCriteriaQuery(), but I'm not sure that it does want and it looks for Hibernatequery, not JPA.
So, my question is how to combine hib-search(lucene) query with criteria api query?
thank's a lot!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/823533#823533]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[Javassist] - User Disconnected Several Times per day problem
by John Foster
John Foster [https://community.jboss.org/people/jmfoster68] created the discussion
"User Disconnected Several Times per day problem"
To view the discussion, visit: https://community.jboss.org/message/823495#823495
--------------------------------------------------------------
I have a user that gets disconnected from the server several times per day.
It does not appear that her internet connection is dropping, only the connection to jboss.
Could someone please review this error log and suggest a solution. The program is simply a client on her desktop which accesses the server at 192.168.1.36 to run our dispatch software.
log4j:WARN No appenders could be found for logger (org.jboss.security.SecurityAssociation).
log4j:WARN Please initialize the log4j system properly.
select * from company where id ='TMS'
Execution time: 00:00:02
select * from users where users.company_id = 'TMS'
Execution time: 00:00:02
select * from user_menu_toolbar where user_menu_toolbar.company_id = 'TMS' and menu_item_id ='LoadMaster Enterprise Main Menu'
and user_id ='cmorgan' order by sequence
Execution time: 00:00:04
select * from dispatch_control where dispatch_control.company_id = 'TMS' and id =1
Execution time: 00:00:02
select * from planning_profile where planning_profile.company_id = 'TMS' and id ='TANKS'
Execution time: 00:00:01
select * from user_list_default where user_list_default.company_id = 'TMS' and user_id ='cmorgan' and
grid_name ='Available Orders'
Execution time: 00:00:01
select * from list_config where list_config.company_id = 'TMS' and grid_name ='Available Orders' and config_name
='Cassie' order by sequence
Execution time: 00:00:01
select * from user_list_default where user_list_default.company_id = 'TMS' and user_id ='cmorgan' and
grid_name ='TractorPlanning'
Execution time: 00:00:01
select * from list_config where list_config.company_id = 'TMS' and grid_name ='TractorPlanning' and config_name
='Chads Book 2' order by sequence
Execution time: 00:00:01
select * from user_list_default where user_list_default.company_id = 'TMS' and user_id ='cmorgan' and
grid_name ='TractorPlanning'
Execution time: 00:00:01
select * from list_config where list_config.company_id = 'TMS' and grid_name ='TractorPlanning' and config_name
='Chads Book 2' order by sequence
Execution time: 00:00:01
select * from movement where movement.company_id = 'TMS' and id ='121066'
Execution time: 00:00:03
select name, field_name from fieldinfo ,tableinfo where data_type = 'date' and status = 'C' and (fieldinfo.table_name
= tableinfo.name or fieldinfo.table_name = (select name from tableinfo t where tableinfo.duplicate_of_table
= t.name))
Execution time: 00:00:175
select * from users where users.company_id = 'TMS' and id ='cmorgan'
Execution time: 00:00:01
select * from distance_control where distance_control.company_id = 'TMS' and id =1
Execution time: 00:00:01
select * from user_list_default where user_list_default.company_id = 'TMS' and user_id ='cmorgan' and
grid_name ='dispatch_status'
Execution time: 00:00:01
select * from list_config where list_config.company_id = 'TMS' and grid_name ='dispatch_status' and config_name
='Default' order by sequence
Execution time: 00:00:01
select * from fuel_price where fuel_price.company_id = 'TMS' order by price_date desc
Execution time: 00:00:04
select * from pnn_control where pnn_control.company_id = 'TMS' and id =1
Execution time: 00:00:01
True costing permission=false
select * from mc_control where mc_control.company_id = 'TMS'
Execution time: 00:00:01
select * from seg_alloc_control where seg_alloc_control.company_id = 'TMS' and id =1
Execution time: 00:00:01
select * from dspopt_control where dspopt_control.company_id = 'TMS' and id =1
Execution time: 00:00:01
select * from movement_order where movement_order.company_id = 'TMS' and movement_id ='121066' order by
movement_id,movement_order.sequence
Execution time: 00:00:01
select * from orders where orders.company_id = 'TMS' and id ='1040897'
Execution time: 00:00:02
select * from currency_type
Execution time: 00:00:01
select * from customer where customer.company_id = 'TMS' and id ='0065'
Execution time: 00:00:02
select * from equipment_type where equipment_type.company_id = 'TMS'
Execution time: 00:00:01
select stop.* from stop where stop.company_id = 'TMS' and order_id = '1040897' order by order_id, order_sequence
Execution time: 00:00:01
select * from zones where zones.company_id = 'TMS'
Execution time: 00:00:01
select * from stop_note where stop_note.company_id = 'TMS' and stop_id = 'Heathe13681035784191368133963216'
order by sequence
Execution time: 00:00:01
select * from reference_number where reference_number.company_id = 'TMS' and stop_id = 'Heathe13681035784191368133963216'
order by stop_id
Execution time: 00:00:01
select * from stop_note where stop_note.company_id = 'TMS' and stop_id = 'Heathe13681035784191368133963247'
order by sequence
Execution time: 00:00:01
select * from reference_number where reference_number.company_id = 'TMS' and stop_id = 'Heathe13681035784191368133963247'
order by stop_id
Execution time: 00:00:01
select * from other_charge where other_charge.company_id = 'TMS' and order_id = '1040897' order by sequence
Execution time: 00:00:01
select * from movement where movement.company_id = 'TMS' and id ='121066'
Execution time: 00:00:01
select * from stop where stop.company_id = 'TMS' and movement_id = '121066' order by movement_id,movement_sequence
Execution time: 00:00:01
select * from movement_order where movement_order.company_id = 'TMS' and movement_id ='121066' order by
movement_id,movement_order.sequence
Execution time: 00:00:00
select mc_position.* from mc_position ,mc_unit where mc_position.company_id = 'TMS' and mc_unit.id =''
and mc_unit.mc_position_id = mc_position.id and mc_unit.company_id = 'TMS'
Execution time: 00:00:01
select * from callin where callin.company_id = 'TMS' and tractor_id = '' and call_date_time = (select
max(call_date_time) from callin where company_id = 'TMS' and tractor_id = '')
Execution time: 00:00:01
select count(*) temp from order_post_hist where order_post_hist.company_id = 'TMS' and order_id ='1040897'
Execution time: 00:00:00
select * from order_post_hist where order_post_hist.company_id = 'TMS' and order_id ='1040897'
Execution time: 00:00:01
Asynchronous JMSException received at 05/13/2013 10:01:17
org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.net.SocketException: Connection
reset)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
at org.jboss.mq.Connection.asynchFailure(Connection.java:421)
at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:174)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:439)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:371)
Asynchronous JMSException received at 05/13/2013 10:01:17
at java.lang.Thread.run(Unknown Source)
org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.net.SocketException: Connection
reset)
org.jboss.mq.SpyJMSException: Exiting on IOE; - nested throwable: (java.net.SocketException: Connection
reset)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
at org.jboss.mq.Connection.asynchFailure(Connection.java:421)
at org.jboss.mq.Connection.asynchFailure(Connection.java:421)
at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:174)
at org.jboss.mq.il.uil2.UILClientILService.asynchFailure(UILClientILService.java:174)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:439)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:371)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleStop(SocketManager.java:439)
at java.lang.Thread.run(Unknown Source)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:371)
at java.lang.Thread.run(Unknown Source)
java.lang.Exception: This is a diagnostic message that is used to help us find screens that are opened
without parent screens.
at com.tms.client.lib.FramedPanel.checkParent(FramedPanel.java:1212)
at com.tms.client.lib.FramedPanel.showInModalFrame(FramedPanel.java:1221)
at com.tms.client.lib.MessageDialog.showMessage(MessageDialog.java:108)
at com.tms.client.lib.Dialogs.error(Dialogs.java:67)
at com.tms.client.lib.FramedPanel$2.onException(FramedPanel.java:384)
at com.tms.common.lib.JMSFactory$LocalExceptionListener.onException(JMSFactory.java:678)
at org.jboss.mq.Connection$ExceptionListenerRunnable.run(Connection.java:1348)
at java.lang.Thread.run(Unknown Source)
05/13/2013 10:04:44 Non-fatal error sending metrics to server.
javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: Exception creating
connection to: 192.168.1.36; nested exception is:
java.net.NoRouteToHostException: No route to host:
connect]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.tms.common.lib.RemoteFactory.lookup(RemoteFactory.java:262)
at com.tms.common.lib.RemoteFactory.lookup(RemoteFactory.java:268)
at com.tms.common.lib.RemoteFactory.lookup(RemoteFactory.java:207)
at com.tms.common.remote.lib.LibFactory.createLibUtil(LibFactory.java:31)
at com.tms.common.lib.management.SystemMonitor.publish(SystemMonitor.java:147)
at com.tms.common.lib.management.SystemMonitor$MonitorThread.run(SystemMonitor.java:249)
05/13/2013 10:09:50 Non-fatal error sending metrics to server.
javax.naming.CommunicationException: Could not obtain connection to any of these urls: jnjndbapp:5660
and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception
is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException:
Failed to connect to server jnjndbapp:5660 [Root exception is javax.naming.ServiceUnavailableException:
Failed to connect to server jnjndbapp:5660 [Root exception is java.net.NoRouteToHostException: No route
to host: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.tms.common.lib.RemoteFactory.lookup(RemoteFactory.java:262)
at com.tms.common.lib.RemoteFactory.lookup(RemoteFactory.java:268)
at com.tms.common.lib.RemoteFactory.lookup(RemoteFactory.java:207)
at com.tms.common.remote.lib.LibFactory.createLibUtil(LibFactory.java:31)
at com.tms.common.lib.management.SystemMonitor.publish(SystemMonitor.java:147)
at com.tms.common.lib.management.SystemMonitor$MonitorThread.run(SystemMonitor.java:249)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/823495#823495]
Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM] - Re: JBPM5.4, Spring 3, Hibernate 4, jtds, and JBoss JTA Transaction Manager Error on Multi thread call
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"Re: JBPM5.4, Spring 3, Hibernate 4, jtds, and JBoss JTA Transaction Manager Error on Multi thread call"
To view the discussion, visit: https://community.jboss.org/message/823399#823399
--------------------------------------------------------------
I tried to create my datasource in the JBOSS AS itself then modify my persistence.xml accordingly
again, 1 call in 1 thread is all fine, but when I got two call from two threads concurrently, I got this error
14:18:48,407 WARN [com.arjuna.ats.arjuna] (pool-19-thread-1) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffac107acb:-ed1e439:51beb786:9e, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@2c6c1215 >: javax.persistence.PersistenceException: org.hibernate.HibernateException: Flush during cascade is dangerous
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1377) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1300) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1306) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1500) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at $Proxy257.runTest3(Unknown Source) at app.chameleon.core.taskmanagement.backend.controller.TestSpringAndJbpmController$2.run(TestSpringAndJbpmController.java:179) [classes:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
Caused by: org.hibernate.HibernateException: Flush during cascade is dangerous
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1209) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:402) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
... 23 more
14:18:48,407 INFO [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (pool-19-thread-1) HHH000106: Forcing container resource cleanup on transaction completion
14:18:48,829 WARN [org.hibernate.engine.jdbc.internal.JdbcResourceRegistryImpl] (pool-19-thread-2) HHH000387: ResultSet's statement was not registered
14:18:48,829 ERROR [stderr] (pool-19-thread-1) org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
14:18:48,829 INFO [stdout] (pool-19-thread-2) Finish 1, 2013-06-17 14:1848.829
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1013)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at $Proxy257.runTest3(Unknown Source)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at app.chameleon.core.taskmanagement.backend.controller.TestSpringAndJbpmController$2.run(TestSpringAndJbpmController.java:179)
14:18:48,829 ERROR [stderr] (pool-19-thread-1) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at java.lang.Thread.run(Thread.java:722)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) ... 13 more
14:18:48,845 ERROR [stderr] (pool-19-thread-1) Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: Flush during cascade is dangerous
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1377)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1300)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1306)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1500)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) ... 17 more
14:18:48,845 ERROR [stderr] (pool-19-thread-1) Caused by: org.hibernate.HibernateException: Flush during cascade is dangerous
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1209)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:402)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104)
14:18:48,845 ERROR [stderr] (pool-19-thread-1) ... 23 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/823399#823399]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[jBPM] - JBPM5.4, Spring 3, Hibernate 4, jtds, and JBoss JTA Transaction Manager Error
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"JBPM5.4, Spring 3, Hibernate 4, jtds, and JBoss JTA Transaction Manager Error"
To view the discussion, visit: https://community.jboss.org/message/823396#823396
--------------------------------------------------------------
Hi,
I try to use JBPM5.4, Spring 3.1.4, Hibernate 4.1.9, Jboss AS 7.1.1 and JBoss Transaction Manager
I create a simple function to start a process
When I just have 1 thread calling that function, everything works fine
But when I have 2 thread calling the function concurrently, I will get this error
13:54:40,867 ERROR [org.hibernate.AssertionFailure] (pool-28-thread-1) HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: null id in org.jbpm.persistence.processinstance.ProcessInstanceInfo entry (don't flush the Session after an exception occurs)
13:54:40,867 WARN [com.arjuna.ats.arjuna] (pool-28-thread-1) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffac107acb:-7ea89ad7:51beac4b:174, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@40608644 >: javax.persistence.PersistenceException: error during managed flush
at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1505) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at $Proxy257.runTest3(Unknown Source) at app.chameleon.core.taskmanagement.backend.controller.TestSpringAndJbpmController$2.run(TestSpringAndJbpmController.java:179) [classes:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
Caused by: org.hibernate.AssertionFailure: null id in org.jbpm.persistence.processinstance.ProcessInstanceInfo entry (don't flush the Session after an exception occurs)
at org.hibernate.event.internal.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:79) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.event.internal.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:194) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:156) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:225) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1213) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:402) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]
... 23 more
13:54:40,882 ERROR [stderr] (pool-28-thread-1) org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
13:54:40,882 ERROR [stderr] (pool-28-thread-1) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1013)
13:54:40,882 ERROR [stderr] (pool-28-thread-1) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
13:54:40,882 ERROR [stderr] (pool-28-thread-1) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
13:54:40,882 ERROR [stderr] (pool-28-thread-1) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387)
13:54:40,882 ERROR [stderr] (pool-28-thread-1) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
13:54:40,882 ERROR [stderr] (pool-28-thread-1) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,882 ERROR [stderr] (pool-28-thread-1) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at $Proxy257.runTest3(Unknown Source)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at app.chameleon.core.taskmanagement.backend.controller.TestSpringAndJbpmController$2.run(TestSpringAndJbpmController.java:179)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
13:54:40,898 INFO [stdout] (pool-28-thread-2) Hibernate:
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at java.lang.Thread.run(Thread.java:722)
13:54:40,898 INFO [stdout] (pool-28-thread-2) insert
13:54:40,898 INFO [stdout] (pool-28-thread-2) into
13:54:40,898 ERROR [stderr] (pool-28-thread-1) Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
13:54:40,898 INFO [stdout] (pool-28-thread-2) ProcessInstanceInfo
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
13:54:40,898 INFO [stdout] (pool-28-thread-2) (id, lastModificationDate, lastReadDate, processId, processInstanceByteArray, startDate, state, OPTLOCK)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
13:54:40,898 INFO [stdout] (pool-28-thread-2) values
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
13:54:40,898 INFO [stdout] (pool-28-thread-2) (?, ?, ?, ?, ?, ?, ?, ?)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) ... 13 more
13:54:40,898 ERROR [stderr] (pool-28-thread-1) Caused by: javax.persistence.PersistenceException: error during managed flush
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1505)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) ... 17 more
13:54:40,898 ERROR [stderr] (pool-28-thread-1) Caused by: org.hibernate.AssertionFailure: null id in org.jbpm.persistence.processinstance.ProcessInstanceInfo entry (don't flush the Session after an exception occurs)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.event.internal.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:79)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.event.internal.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:194)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:156)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:225)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1213)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:402)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104)
13:54:40,898 ERROR [stderr] (pool-28-thread-1) ... 23 more
13:54:40,913 INFO [stdout] (pool-28-thread-2) ERROR [17-06-2013 13:54:40,913]
13:54:40,913 INFO [stdout] (pool-28-thread-2) app.chameleon.core.taskmanagement.backend.bl.interfaces.ITestSpringAndJbpm
13:54:40,913 INFO [stdout] (pool-28-thread-2) An exception in method : runTest3
13:54:40,913 INFO [stdout] (pool-28-thread-2) With following argument(s) : [2]
13:54:40,913 INFO [stdout] (pool-28-thread-2) Message : [com.salaboy.process.AsyncInteractions:12.402 - User Interaction 1:2] -- EntityManager is closed
13:54:40,913 INFO [stdout] (pool-28-thread-2) Stack Trace : org.jbpm.workflow.instance.WorkflowRuntimeException: [com.salaboy.process.AsyncInteractions:12.402 - User Interaction 1:2] -- EntityManager is closed
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:132)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:140)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1098)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:120)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39)
13:54:40,913 INFO [stdout] (pool-28-thread-2) at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at app.chameleon.core.taskmanagement.backend.bl.TestSpringAndJbpm.runTest3(TestSpringAndJbpm.java:121)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at java.lang.reflect.Method.invoke(Method.java:601)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at app.chameleon.core.taskmanagement.backend.utilities.log.LogUtil.logAround(LogUtil.java:70)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at java.lang.reflect.Method.invoke(Method.java:601)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at $Proxy257.runTest3(Unknown Source)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at app.chameleon.core.taskmanagement.backend.controller.TestSpringAndJbpmController$2.run(TestSpringAndJbpmController.java:179)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at java.lang.Thread.run(Thread.java:722)
13:54:40,929 INFO [stdout] (pool-28-thread-2) Caused by: java.lang.IllegalStateException: EntityManager is closed
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:95)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:865)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at java.lang.reflect.Method.invoke(Method.java:601)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at $Proxy179.persist(Unknown Source)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:46)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:43)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)
13:54:40,929 INFO [stdout] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
13:54:40,929 INFO [stdout] (pool-28-thread-2) ... 47 more
13:54:40,929 INFO [stdout] (pool-28-thread-2)
13:54:40,929 INFO [stdout] (pool-28-thread-2) -------------------------------------------------------
13:54:40,929 ERROR [stderr] (pool-28-thread-2) org.jbpm.workflow.instance.WorkflowRuntimeException: [com.salaboy.process.AsyncInteractions:12.402 - User Interaction 1:2] -- EntityManager is closed
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:132)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:140)
13:54:40,929 ERROR [stderr] (pool-28-thread-2) at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1098)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:120)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:39)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at app.chameleon.core.taskmanagement.backend.bl.TestSpringAndJbpm.runTest3(TestSpringAndJbpm.java:121)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at java.lang.reflect.Method.invoke(Method.java:601)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at app.chameleon.core.taskmanagement.backend.utilities.log.LogUtil.logAround(LogUtil.java:70)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at java.lang.reflect.Method.invoke(Method.java:601)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at $Proxy257.runTest3(Unknown Source)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at app.chameleon.core.taskmanagement.backend.controller.TestSpringAndJbpmController$2.run(TestSpringAndJbpmController.java:179)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at java.lang.Thread.run(Thread.java:722)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) Caused by: java.lang.IllegalStateException: EntityManager is closed
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:95)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:865)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at java.lang.reflect.Method.invoke(Method.java:601)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at $Proxy179.persist(Unknown Source)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:46)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:43)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
13:54:40,945 ERROR [stderr] (pool-28-thread-2) ... 47 more
My Spring Configuration for is:
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManagerName" value="java:/TransactionManager"></property>
</bean>
<drools-spring:kbase id="kbase1">
<drools-spring:resources>
<drools-spring:resource type="BPMN2"
source="classpath:scripttask.bpmn2" />
<drools-spring:resource type="BPMN2"
source="classpath:process-async-interactions.bpmn" />
</drools-spring:resources>
</drools-spring:kbase>
<drools-spring:ksession id="ksession1" type="stateful"
kbase="kbase1">
<drools-spring:configuration>
<drools-spring:jpa-persistence>
<drools-spring:transaction-manager
ref="transactionManager" />
<drools-spring:entity-manager-factory
ref="entityManagerFactory" />
</drools-spring:jpa-persistence>
</drools-spring:configuration>
</drools-spring:ksession>
<bean id="wshtHandler" class="app.chameleon.core.taskmanagement.backend.utilities.jbpm.SelfRegisteringHT"
init-method="connect" destroy-method="dispose">
<constructor-arg ref="localTaskService"></constructor-arg>
<constructor-arg ref="ksession1"></constructor-arg>
</bean>
<bean id="localTaskService" class="org.jbpm.task.service.local.LocalTaskService"
destroy-method="dispose" scope="prototype">
<constructor-arg ref="taskService"></constructor-arg>
</bean>
<bean id="taskService" class="org.jbpm.task.service.TaskService">
<constructor-arg ref="entityManagerFactory"></constructor-arg>
<constructor-arg ref="systemEventListener"></constructor-arg>
</bean>
<bean id="systemEventListener" class="org.drools.SystemEventListenerFactory"
factory-method="getSystemEventListener" />
And my java function is:
@Autowired
StatefulKnowledgeSession ksession;
@Autowired
LocalTaskService taskService;
@Transactional(rollbackFor = Throwable.class)
public void runTest3(String user) throws Throwable {
Map<String, Object> params = new HashMap<String, Object>();
params.put("commentator", "thomas.setiabudi");
params.put("globalMessage", "aa");
ksession.startProcess("com.salaboy.process.AsyncInteractions", params);
}
Any Idea what may cause the error?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/823396#823396]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months