Hi,

I have created a Job that calls a custom java class. That class has been packed into a jar. This class connects to a data source, using hibernate and jdbc, gets some data from de database, does some tasks and finally stores the results again in the database. I have placed the jar and its dependences in the classpath of the Pentaho Data Integration (PDI).

Well, if i launch the job from the PDI all the things are right.

The problem appears when I create a xaction in the Pentaho Design Studio that calls the mentioned job. I have placed the necesaries jars in the classpath of the BI Server. When I call my xaction from the BI Sever, on the log of the Tomcat it shows how Hibernate is loading. But when it has to load the hibernate.cfg.xml configuration file thows an exception:

INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
org.hibernate.HibernateException: /resources/hibernate.cfg.xml not found


And as you can imagin all fails...

That resource (hibernate.cfg.xml) is allocated inside the jar, and as I said before it runs when I launch it from PDI.

I know that the BI Server uses an hsql database to perform some tasks and it uses hibernate. I have found in the path
biserver-ce\pentaho-solutions\system\hibernate
some configuration files but I'm no able to discover the way to configure it.

I have configure the database that I use in the job in the Admiministration Console as a DataSource. I have tested that it works with a simple job that does a tipically transformation (without calling own java classes).

¿Where should I place the hibernate.cfg.xml file?


Thanks in advance