[
https://issues.apache.org/jira/browse/KARAF-6607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17024136#comment-17024136
]
Jean-Baptiste Onofré commented on KARAF-6607:
---------------------------------------------
Thanks for the report. The main difference is now we use the feature provided
directly by the Hibernate project. Maybe they don't include a hibernate cfg
file. Let me check.
> hibernate.cfg.xml not found - upgrade Karaf 3.0.8 - 4.2.7 / Java 8-9
> --------------------------------------------------------------------
>
> Key: KARAF-6607
> URL: https://issues.apache.org/jira/browse/KARAF-6607
> Project: Karaf
> Issue Type: Question
> Components: karaf
> Affects Versions: 4.2.7
> Reporter: Cor Faber
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Attachments: pom.xml
>
>
> 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?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)