[jboss-jira] [JBoss JIRA] Updated: (JBPM-758) DbPersistenceService needs update for new Hibernate version

Christian Kaltepoth (JIRA) jira-events at jboss.com
Thu Oct 5 07:07:41 EDT 2006


     [ http://jira.jboss.com/jira/browse/JBPM-758?page=all ]

Christian Kaltepoth updated JBPM-758:
-------------------------------------

    Attachment: jbpm_session_already_closed_exception.patch

This patch for jBPM 3.1.2 seems to fix the problem with Hibernate 3.2

> DbPersistenceService needs update for new Hibernate version
> -----------------------------------------------------------
>
>                 Key: JBPM-758
>                 URL: http://jira.jboss.com/jira/browse/JBPM-758
>             Project: JBoss jBPM
>          Issue Type: Bug
>          Components: Core Engine
>    Affects Versions:  jBPM 3.1.2
>         Environment: jboss AS 4.0.4, hibernate 3.1 or hibernate 3.2
>            Reporter: Thomas Klute
>         Assigned To: Tom Baeyens
>             Fix For: jBPM 3.1.3
>
>         Attachments: jbpm_session_already_closed_exception.patch
>
>   Original Estimate: 15 minutes
>  Remaining Estimate: 15 minutes
>
> Release of JDBC connections changed with hibernate version > 3.0.
> DbPersistenceService now throws exception when trying to close a hibernate session (because in was closed automatically when the transaction committed).
> The exception happens every few seconds when using the jbpm scheduler-service.
> See below for stack trace.
> See http://www.hibernate.org/250.html#A31 for a detailed description of hibernate-changes regarding JDBC connections.
> FYI: The exception does not roll back the transaction, because it has already been committed. 
> Please adapt the code to the new hibernate behaviour. Maybe just comment out the "throw" of the exception.
> I have no idea what code would work with old _and_ new hibernate versions.
> We just got the problem integrating jbpm into a jboss AS 4.0.4 using hibernate 3.2.
> ...
> 2006-09-28 16:11:53,996 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
> 2006-09-28 16:11:53,998 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
> 2006-09-28 16:11:53,998 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4749118316527616
> 2006-09-28 16:11:53,998 DEBUG [org.jbpm.persistence.db.DbPersistenceService] beginning hibernate transaction
> 2006-09-28 16:11:53,998 DEBUG [org.hibernate.transaction.JTATransaction] Looking for UserTransaction under: UserTransaction
> 2006-09-28 16:11:53,999 DEBUG [org.hibernate.transaction.JTATransaction] Obtained UserTransaction
> 2006-09-28 16:11:53,999 DEBUG [org.hibernate.transaction.JTATransaction] begin
> 2006-09-28 16:11:54,000 DEBUG [org.hibernate.transaction.JTATransaction] Began a new JTA transaction
> 2006-09-28 16:11:54,000 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
> 2006-09-28 16:11:54,000 DEBUG [org.jbpm.scheduler.impl.SchedulerThread] checking for timers
> 2006-09-28 16:11:54,000 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
> 2006-09-28 16:11:54,000 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
> 2006-09-28 16:11:54,000 DEBUG [org.hibernate.SQL] select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where (timer0_.EXCEPTION_ is null) and timer0_.ISSUSPENDED_<>1 order by timer0_.DUEDATE_ asc
> 2006-09-28 16:11:54,001 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
> 2006-09-28 16:11:54,001 DEBUG [org.hibernate.impl.IteratorImpl] exhausted results
> 2006-09-28 16:11:54,001 DEBUG [org.hibernate.impl.IteratorImpl] closing iterator
> 2006-09-28 16:11:54,001 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
> 2006-09-28 16:11:54,001 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
> 2006-09-28 16:11:54,001 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
> 2006-09-28 16:11:54,001 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
> 2006-09-28 16:11:54,001 DEBUG [org.jbpm.JbpmContext] closing JbpmContext
> 2006-09-28 16:11:54,002 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService at 15a9173
> 2006-09-28 16:11:54,002 DEBUG [org.jbpm.persistence.db.DbPersistenceService] committing hibernate transaction
> 2006-09-28 16:11:54,002 DEBUG [org.hibernate.transaction.JTATransaction] commit
> 2006-09-28 16:11:54,002 DEBUG [org.hibernate.transaction.JTATransaction] Committed JTA UserTransaction
> 2006-09-28 16:11:54,002 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
> 2006-09-28 16:11:54,002 ERROR [STDERR] org.jbpm.persistence.JbpmPersistenceException: couldn't close hibernate session
> 2006-09-28 16:11:54,002 ERROR [STDERR]  at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:191)
> 2006-09-28 16:11:54,002 ERROR [STDERR]  at org.jbpm.svc.Services.close(Services.java:211)
> 2006-09-28 16:11:54,002 ERROR [STDERR]  at org.jbpm.JbpmContext.close(JbpmContext.java:139)
> 2006-09-28 16:11:54,002 ERROR [STDERR]  at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
> 2006-09-28 16:11:54,002 ERROR [STDERR]  at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
> 2006-09-28 16:11:54,003 ERROR [STDERR] Caused by: org.hibernate.SessionException: Session was already closed
> 2006-09-28 16:11:54,003 ERROR [STDERR]  at org.hibernate.impl.SessionImpl.close(SessionImpl.java:277)
> 2006-09-28 16:11:54,003 ERROR [STDERR]  at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:189)
> 2006-09-28 16:11:54,003 ERROR [STDERR]  ... 4 more
> 2006-09-28 16:11:54,003 ERROR [org.jbpm.svc.Services] problem closing service 'persistence'
> org.jbpm.persistence.JbpmPersistenceException: couldn't close hibernate session
>         at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:191)
>         at org.jbpm.svc.Services.close(Services.java:211)
>         at org.jbpm.JbpmContext.close(JbpmContext.java:139)
>         at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
>         at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
> Caused by: org.hibernate.SessionException: Session was already closed
>         at org.hibernate.impl.SessionImpl.close(SessionImpl.java:277)
>         at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:189)
>         ... 4 more
> 2006-09-28 16:11:54,003 INFO  [org.jbpm.scheduler.impl.SchedulerThread] runtime exception while executing timers
> org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: couldn't close hibernate session}
>         at org.jbpm.svc.Services.close(Services.java:223)
>         at org.jbpm.JbpmContext.close(JbpmContext.java:139)
>         at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
>         at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
> Caused by: org.jbpm.persistence.JbpmPersistenceException: couldn't close hibernate session
>         at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:191)
>         at org.jbpm.svc.Services.close(Services.java:211)
>         ... 3 more
> Caused by: org.hibernate.SessionException: Session was already closed
>         at org.hibernate.impl.SessionImpl.close(SessionImpl.java:277)
>         at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:189)
>         ... 4 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list