Hi All 

I have a project with similar ake up to dvdstore example (JBPM processes). 

I am trying to start a process (registerInterest), this works succesfully. 
(@createProcess("matchCustomer")). 

I then have a page containing a list of all the tasks that need to be completed 
(straight out of the manual, except that instead of assiging the task to a 
specific actor I launch straight into @StartTask). 

But when I try to start work on the task (the first wait state in the process), 
the  @StartTask annotation is started (and it gathers the taskid and processid 
properly in the aroundInvoke method). 

But after you call task.start(actorID) in 
BusinessProcessInterceptor.startTask() it blows up with the following stack 
trace: 


  | 22:49:19,703 ERROR [Services] problem closing service 'persistence'
  | org.jbpm.persistence.JbpmPersistenceException: couldn't flush hibernate 
session
  |     at 
org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:166)
  |     at org.jbpm.svc.Services.close(Services.java:211)
  |     at org.jbpm.JbpmContext.close(JbpmContext.java:138)
  |     at 
org.jboss.seam.core.ManagedJbpmContext.destroy(ManagedJbpmContext.java:80)
  |     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.seam.util.Reflections.invoke(Reflections.java:13)
  |     at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
  |     at org.jboss.seam.contexts.Contexts.callDestroyMethod(Contexts.java:204)
  |     at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:187)
  |     at 
org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:239)
  |     at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:164)
  |     at 
org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:107)
  |     at 
org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.afterPhase(SeamExtendedManagedPersistencePhaseListener.java:52)
  |     at 
org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:536)
  |     at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:359)
  |     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |     at 
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |     at 
org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:44)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |     at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |     at 
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
  |     at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
  |     at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  |     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
  |     at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
  |     at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |     at 
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  |     at java.lang.Thread.run(Thread.java:595)
  | Caused by: org.hibernate.HibernateException: instance not of expected 
entity type: org.jbpm.graph.def.Node
  |     at 
org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3301)
  |     at 
org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1330)
  |     at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:180)
  |     at 
org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:215)
  |     at org.hibernate.type.EntityType.getIdentifier(EntityType.java:108)
  |     at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:221)
  |     at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:476)
  |     at 
org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:2803)
  |     at 
org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:467)
  |     at 
org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:190)
  |     at 
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:113)
  |     at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195)
  |     at 
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
  |     at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
  |     at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
  |     at 
org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:164)
  |     ... 43 more
  | 

I am using the jbpm 3.1beta3 and I have checked the hibernate.cfg.xml and 
jbpm.cfg.xml files against the dvdexample and they are identical (apart from 
the obvious persistence information). 

The other thing of note is that I have injected some variables into the 
business process context (but these seam to be correctly placed in the database 
tables, so I don't see any problem). 

If anybody can point me in the right direction, i'd be thankful. 

James 

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

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


-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to