Can you try without a kar .. just by installing the features on the console?
Christian On 10.03.2016 14:42, Olivier21 wrote:
Christian, I'm completely lost... I'm a newbie for Karaf and Maven... You said "You should also not use the individual hibernate bundles but rather use their feature." Therefore, in the "feature.xml" file, I wrote : /<?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.hibernate/hibernate-osgi/5.1.0.Final/xml/karaf</repository> <feature name="dependencies" version="${project.version}"> <feature version="3.1.5">cxf-jaxrs</feature> <feature version="3.1.5">cxf-jaxws</feature> <feature version="3.1.5">cxf-http-jetty</feature> <feature>jndi</feature> <feature>transaction</feature> <feature version="[2.2, 3)">jpa</feature> <feature version="5.1.0.Final">hibernate</feature> </feature><feature name='application' description='${project.name}'version='${project.version}'> <bundle>mvn:com.exemple.customerRestFulHibernateWS/module-data/0.0.1-SNAPSHOT</bundle> <bundle>mvn:com.exemple.customerRestFulHibernateWS/module-services/0.0.1-SNAPSHOT</bundle> <bundle>mvn:com.exemple.customerRestFulHibernateWS/module-jaxrs/0.0.1-SNAPSHOT</bundle> </feature> </features>/ But it doesn't work. I generate a Kar file with Karaf Maven Plugin in Eclipse. My "pom.xml" file is the following : 192.168.21.11 /<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>customerRestFulHibernateWS</artifactId> <groupId>com.exemple.customerRestFulHibernateWS</groupId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>module-kar</artifactId> <packaging>kar</packaging> <name>module-kar-feature</name> <description>module-kar details</description> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> <version>4.0.3</version> <extensions>true</extensions> </plugin> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId> org.apache.karaf.tooling </groupId> <artifactId> karaf-maven-plugin </artifactId> <versionRange> [4.0.3,) </versionRange> <goals> <goal> features-generate-descriptor </goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> <configuration> <startLevel>50</startLevel> <aggregateFeatures>true</aggregateFeatures><checkDependencyChange>true</checkDependencyChange><failOnDependencyChange>false</failOnDependencyChange> <logDependencyChanges>true</logDependencyChanges><overwriteChangedDependencies>true</overwriteChangedDependencies></configuration> </plugin> </plugins> </build> </project>/ But I got this error : *2016-03-10 14:34:39,124 | WARN | d kar deployment | KarServiceImpl | 37 - org.apache.karaf.kar.core - 4.0.4 | Unable to install Kar feature dependencies/0.0.1.SNAPSHOT org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=hibernate; type=karaf.feature; version=5.1.0.Final* Please, could you say me how to write the "feature.xml" file? Moreover, could you say me why the "features" is better than the "individual bundle" in the "feature.xml" file? Thank you in advance to take a few time to help me. -- View this message in context: http://karaf.922171.n3.nabble.com/JPA-and-Hibernate-tp4045735p4045744.html Sent from the Karaf - User mailing list archive at Nabble.com.
-- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com
