[jboss-user] [JBoss jBPM] - Combining hibernate classes

merinshaji do-not-reply at jboss.com
Fri Sep 21 06:36:26 EDT 2007


Hi,

I am trying to combine my hibernate classes with jbpm's persistence classes. I have configured jbpm to use my application specific hibernate.cfg.xml. Things are working fine except for session.getNamedQuery method call in TaskMgmtSession.findPooledTaskInstances(). I have added hibernate.queries.hbm.xml to my hibernate configuration programmatically (using the code configuration.addResource()). But when I execute getNamedQuery, I get the following exception:


org.jbpm.JbpmException: couldn't get pooled task instances list for actors '[UW]'


Caused by: org.hibernate.SessionException: Session is closed!
	at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
	at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1258)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
	at $Proxy21.getNamedQuery(Unknown Source)
	at org.jbpm.db.TaskMgmtSession.findPooledTaskInstances(TaskMgmtSession.java:119)

Could any one help me to solve this?

Thanks in advance 
Merin

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087159#4087159

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087159



More information about the jboss-user mailing list