[JBoss jBPM] - deployment problem with additional hibernate classes
by boercher
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
17 years, 1 month
[JBoss jBPM] - Problem with default controller variable
by zuipli
Hi,
I'm a newbie of JBPM. I'm creating my first process with jbpm-jpdl-designer-site-3.1.6 in Eclipse Ganymede, following a tutorial.
I choose a task of my process definition, on the Diagram panel, then in bottom part of Eclipse I choose the Properties folder. In this folder there are some sections, I choose Tasks. I see the list of the tasks associated to the selected Task of the process. For each task there are 5 folders: General, Details, Assignement, Controller, Reminder, I click on Controller.
Here I can define a list of variables that will be displayed, so I click on Add button and automatically I get a new variable called variable1.
This variable1 is highlighted in blue so that I can modify its name; I change the name in myVariable (sigh) and when I TAB or I click on any other position the name return to variable1.
If I go in the Source panel of the main window I see the description of my process in XML format. Here I can find the variable1 of my task. If I change here its name then in the Controller folder I see the myVariable name, but again it's impossible to change.
Is it a bug? Is it possible that there is a trivial bug like this? Or - more probably - I'm doing something wrong?
Thanks for yor help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219175#4219175
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219175
17 years, 1 month
[Persistence, JBoss/CMP, Hibernate, Database] - Approach for mappng a properties table
by bryan.kearney
I am looking for advice on how to map a properties table. Assume a schema such as:
Objects_Table
ObjectID
ObjectName
ObjectType
Properties_Table
ObjectID
PropertyID
PropertyValue
Assuming that for OID 12 there are 2 properties (NAME and Description) I would like to map a class which looks like
ClassA
- getName()
- setName()
- getDescription()
- setDescription()
I have looked at two approaches for this, and was curious if there was other:
First: Map Objects_Table to ClassA, and give it a relatioship of Properties (@OneToMany). Then, hand craft the getters and setters to manage the properties. This works fine, but searching will be a bit sketchy to code.
Second: Map both tables to ClassA using customer @Loader and @SqlInsert commands. These in turn are backed by heavily joined queries and/or stored procedures. This hides the underlieing tables (good) but requires lots of hand crafted SQL code.
Are there other approaches to this?
-- bk
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219167#4219167
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219167
17 years, 1 month
[JBoss Cache: Core Edition] - Re: JBC 3.0 as L2 cache on other appservers than JBossAS
by bstansberry@jboss.com
I don't think Manik's intent was to say "RTFM, JBC 3 details are covered in the guide." Rather its just that the info in the hibernate-jbosscache-guide works with JBC 3 as well. If you use the jboss-cache.jar from JBC 3 instead of the one from JBC 2, everything covered in the guide will work.
Use of MVCC in the Hibernate use case essentially comes down to changing the node locking scheme config in your cache config from PESSIMISTIC to MVCC. Note however that there are some issues related to MVCC that are popping up; see some threads on this forum that have been active in the last week.
Note that JBC 3 supports a different config format from the JBC 2 one. The stock configurations that ship with Hibernate use the old format, as does any discussion in the hibernate-jbosscache-guide. But JBC 3 can handle the old format just fine. And if you are creating a your own cache configuration and want to use the JBC 3 format that will work as well.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219164#4219164
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219164
17 years, 1 month