Hi,

with jbpm-3.2.6.SP1, JBoss AS 4.2.3.GA I got a simple process working in a unit 
test and on the application server where it can be examined in the jbpm-console.

Problems arise however as soon as I try to use my own hibernate classes with 
the jbpm hibernate session like this:

  |   Session session = context.getJbpmContext().getSession();
  |   UrlLock lock = new UrlLock(url.toString(), this, new Date());
  |   session.save(lock);
  | 

After adding an appropriate hibernate mapping to a local 
hibernate.extra.hbm.xml this works in my unit tests (run from within Eclipse) 
but it's not working on the server since when the process gets to this line an 
exception is thrown:

anonymous wrote : 
  | Error signalling token: An exception of type 
"org.jbpm.graph.def.DelegationException" was thrown. The message is: Unknown 
entity: testprocess.UrlLock
  | 

I tried the following fixes:

1) add hibernate.extra.hbm.xml to the deployed par archive: Did not work since 
it is obviously ignored by hibernate.

2) copy hibernate.extra.hbm.xml to jbpm/jbpm-service.sar/ in the JBoss deploy 
directory: Results in the following error:

anonymous wrote : 
  | DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] Value to be 
rendered Error loading process list
  | DEBUG [javax.enterprise.resource.webcontainer.jsf.renderkit] 
component.getValue() returned : An exception of type 
"org.hibernate.InvalidMappingException" was thrown.  The message is: Could not 
parse mapping document from resource hibernate.extra.hbm.xml
  | 

Unfortunately there are no more detailed logs from the renderkit.  I do not 
believe that it's a simple parse error since the same hibernate.extra.hbm.xml 
did work in the unit test.

Might this error occur due to the fact that hibernate has no access to the 
UrlLock.class file (although the table jbpm_bytearray contains an entry 
classes/testprocess/UrlLock.class)? What is the best approach for using 
additional hibernate classes from within a process?

Any advice is appreciated.

Regards
Volker

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219177
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to