we need to load the hibernate.queries.hbm.xml which is in the default hibernate config files.
I had a hibernate config file of my own, where this named queries were not loaded.
Within the named query file the type string_max is defined and then everything works fine
In jBPM Beta 3 the
<typedef class="org.jbpm.db.hibernate.StringMax" name="string_max" />is not present.
I am using jBPM 3.1 Final and I tried your suggestion but it failed :(
Which version of jBPM are you using?
Any suggestions from jBPM guys, please?
Thanks in advance!
I'm using the 3.1 release from yesterday
What I did is add
<mapping resource="org/jbpm/db/hibernate.queries.hbm.xml"/>mapping to my hibernate.cfg.xml file. I use hibernate.cfg.xml of my own just like you.
But I get the same error. Is there anything else I am supposed to do?
Appreciate any advice!
that's all I did.
I'm not sure if the order of the mapping files in hibernate.cfg.xml is important. In the original file teh queries are inserted directly below Membership.hbm.xml.
Are you sure, you are using the right configuration file at runtime?
You should be able to see this in the log files. Yust search for the name of your config file.
Have a look at the docs on switching the database. It describes how to switch to PostgreSQL. However, I just saw there are some problems with the images. Apparently the distribution released yesterday does not have this problem. We will upload the docs again.
Hi, again Maplat!
It seems that the order of the mapping files in Hibernate.cfg.xml matters. When I moved the
<mapping resource="org/jbpm/db/hibernate.queries.hbm.xml"/>mapping just after the identity mappings everything went well and I succeeded in deploying.
Just as an additional INFO through one of my attempts I made a copy of
hibernate.queries.hbm.xmland put it in the class path. If the queries mapping is at the mentioned position in
hibernate.cfg.xmlall was fine too, otherwise it failed again.
Thank you very much for your time and for your fast replies! Have a nice day!
Hi Saviola, Maplat,
I'm using Jbpm 3.1 with jboss-4.0.4rc1 and jboss-seam beta2, I'm using container managed persistence with ejb3.0RC5 and even if I followed your solution, I coudn't make it work, details on the problem are here:
as far as I understand, hibernate.queries.hbm.xml is needed for jbpm to work properly.
Thanks for your help
What I can say for sure is that if you use jBPM 3.1 Beta 3 or jBPM 3.1 Final (I've tested with them only) you will definitelly need hibernate.queries.hbm.xml because the named queries that JbpmContext uses for its common methods like (get all process definitions for example) are defined in this file.
You can see