Details
-
Question
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.2.7
-
None
-
None
Description
We are upgrading our system from Karaf 3.0.8 to Karaf 4.2.7 and Java 8 to 9 (10/11 will follow). We use hibernate dependencies to connect to a database. In the old version of Karaf we had no issues, but now we have issues connecting to the database in our feature. The datasource.cfg is correct and within the Karaf console we have no issues performing queries on the database, but our feature cannot connect to it. GetSessionFactory (ConfigurationException): Could not locate cfg.xml resource [hibernate.cfg.xml] is the error we get. The hibernate.cfg.xml is located in the main/resources folder and after installing our feature the hibernate.cfg.xml can be found in the root of the corresponding bundle.jar in the data/cache folder. We also use all the defaults for creating a sessionFactory.
The Java working directory is the base of the apache karaf folder.
Dependency verions:
hibernate-jpa-2.1-api.version: 1.0.0.Final
hibernate-core version: 5.2.10.Final
hibernate-validator version: 5.2.5.Final
I've include our pom.xml of our persister. pom.xml
Any ideas where to start to find a solution for this issue?