Hello Christian,
It works fine now with a Kar file.
The "feature.xml" file to create the Kar file contains :
<?xml version="1.0" encoding="UTF-8"?>
<features name="${project.artifactId}-${project.version}"
xmlns="http://karaf.apache.org/xmlns/features/v1.3.0">
<repository>mvn:org.apache.cxf.karaf/apache-cxf/3.1.5/xml/features</repository>
<repository>mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.7.0/xml/features</repository>
<feature name='${project.artifactId}' description='${project.name}'
version='${project.version}'>
<details>${project.description}</details>
<feature version="3.1.5">cxf</feature>
<feature>pax-jdbc</feature>
<feature>pax-jdbc-config</feature>
<feature>pax-jdbc-pool-dbcp2</feature>
<feature>jdbc</feature>
<feature version="4.3.6.Final">hibernate</feature>
<feature version="2.3.0">jpa</feature>
<feature version="1.3.0">transaction</feature>
<feature version="4.0.4">jndi</feature>
<bundle>mvn:org.postgresql/postgresql/9.4-1203-jdbc41</bundle>
<bundle>mvn:org.osgi/org.osgi.core/6.0.0</bundle>
<bundle>mvn:commons-logging/commons-logging/1.2</bundle>
<bundle>mvn:commons-io/commons-io/2.4</bundle>
<bundle>mvn:org.eclipse.persistence/javax.persistence/2.1.1</bundle>
...
</feature>
</features>
Nevertheless, I have an other little problem but my REST service works
despite of this problem.
In a file "blueprint.xml", I have put this :
<cxf:bus id="bus">
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
in order to have the log message. And with this parameter, I see this new
error message :
*2016-03-23 16:17:10,635 | ERROR | ool-183-thread-1 |
JavassistLazyInitializer | 6538 - org.jboss.logging.jboss-logging -
3.1.4.GA | HHH000142: Javassist Enhancement failed:
com.exemple.customerRestFulHibernateWS.data.model.Customer
java.lang.RuntimeException: by java.lang.NoClassDefFoundError:
org/hibernate/proxy/HibernateProxy*
Do you know how to resolve this? In spite of that, my application works fine
and the records are inserted in the database.
Thank you in advance for your answer.
--
View this message in context:
http://karaf.922171.n3.nabble.com/JPA-and-Hibernate-tp4045735p4045944.html
Sent from the Karaf - User mailing list archive at Nabble.com.