On 09/03/2015 08:55, Christian Kaltepoth wrote:
AFAIK both Hibernate and Weld require Jandex in different versions. Make sure you are using an up to date version of Janex. I had similar problems in the past and adding a <dependencyManagment> section for Jandex fixed the problem for me.
I took a look and noticed that : * there is not jandex version conflict in the dependency tree
$ mvn dependency:tree -Dverbose=true
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building restlet-deltaspike-demo 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for org.restlet.jse:org.restlet.ext.guice:jar:2.3.1 is missing, no dependency information available [INFO] [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ restlet-deltaspike-demo --- [WARNING] Missing POM for org.restlet.jse:org.restlet.ext.guice:jar:2.3.1 [INFO] com.zanclus:restlet-deltaspike-demo:jar:1.0-SNAPSHOT [INFO] +- org.apache.deltaspike.core:deltaspike-core-api:jar:1.2.1:compile [INFO] +- org.apache.deltaspike.modules:deltaspike-servlet-module-api:jar:1.2.1:compile [INFO] | \- (org.apache.deltaspike.core:deltaspike-core-api:jar:1.2.1:compile - omitted for duplicate) [INFO] +- org.apache.deltaspike.cdictrl:deltaspike-cdictrl-api:jar:1.2.1:compile [INFO] +- org.apache.deltaspike.modules:deltaspike-jpa-module-api:jar:1.2.1:compile [INFO] | \- (org.apache.deltaspike.core:deltaspike-core-api:jar:1.2.1:compile - omitted for duplicate) [INFO] +- org.restlet.jse:org.restlet:jar:2.3.1:compile [INFO] +- org.restlet.jse:org.restlet.ext.jaxrs:jar:2.3.1:compile [INFO] | +- commons-fileupload:commons-fileupload:jar:1.3:compile [INFO] | | \- commons-io:commons-io:jar:2.2:compile [INFO] | +- javax.mail:mail:jar:1.4.2:compile [INFO] | | \- javax.activation:activation:jar:1.1:compile [INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile [INFO] | | \- javax.xml.bind:jaxb-api:jar:2.1:compile [INFO] | | +- javax.xml.stream:stax-api:jar:1.0-2:compile [INFO] | | \- (javax.activation:activation:jar:1.1:compile - omitted for duplicate) [INFO] | +- javax.ws.rs:javax.ws.rs-api:jar:2.0:compile [INFO] | +- org.restlet.jse:org.restlet.lib.org.json:jar:2.0:compile [INFO] | +- commons-lang:commons-lang:jar:2.6:compile [INFO] | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile [INFO] | \- (org.restlet.jse:org.restlet:jar:2.3.1:compile - omitted for duplicate) [INFO] +- org.restlet.jse:org.restlet.ext.guice:jar:2.3.1:compile [INFO] +- org.reflections:reflections:jar:0.9.9-RC1:compile [INFO] | +- com.google.guava:guava:jar:11.0.2:compile [INFO] | | \- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | +- org.javassist:javassist:jar:3.16.1-GA:compile [INFO] | \- dom4j:dom4j:jar:1.6.1:compile [INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile [INFO] +- org.slf4j:slf4j-api:jar:1.7.10:compile [INFO] +- org.jboss.weld.se:weld-se:jar:2.2.9.Final:compile [INFO] +- com.h2database:h2:jar:1.3.175:compile [INFO] +- org.projectlombok:lombok:jar:1.14.8:compile [INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile [INFO] +- org.hibernate:hibernate-entitymanager:jar:4.3.1.Final:compile [INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile [INFO] | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile [INFO] | +- org.hibernate:hibernate-core:jar:4.3.1.Final:compile [INFO] | | +- (org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile - omitted for duplicate) [INFO] | | +- (org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile - omitted for duplicate) [INFO] | | +- (org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile - omitted for duplicate) [INFO] | | +- (dom4j:dom4j:jar:1.6.1:compile - omitted for duplicate) [INFO] | | +- (org.hibernate.common:hibernate-commons-annotations:jar:4.0.4.Final:compile - omitted for duplicate) [INFO] | | +- (org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile - omitted for duplicate) [INFO] | | +- (org.javassist:javassist:jar:3.18.1-GA:compile - omitted for conflict with 3.16.1-GA) [INFO] | | +- antlr:antlr:jar:2.7.7:compile [INFO] | | \- org.jboss:jandex:jar:1.1.0.Final:compile [INFO] | +- (dom4j:dom4j:jar:1.6.1:compile - omitted for duplicate) [INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.4.Final:compile [INFO] | | +- (org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile - omitted for duplicate) [INFO] | | \- (org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile - omitted for duplicate) [INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile [INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile [INFO] | \- (org.javassist:javassist:jar:3.18.1-GA:compile - omitted for conflict with 3.16.1-GA) [INFO] +- org.restlet.jse:org.restlet.ext.jetty:jar:2.3.1:runtime [INFO] | +- org.eclipse.jetty:jetty-http:jar:9.2.6.v20141205:runtime [INFO] | | \- (org.eclipse.jetty:jetty-util:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty:jetty-io:jar:9.2.6.v20141205:runtime [INFO] | | \- (org.eclipse.jetty:jetty-util:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty:jetty-server:jar:9.2.6.v20141205:runtime [INFO] | | +- (javax.servlet:javax.servlet-api:jar:3.1.0:runtime - omitted for duplicate) [INFO] | | +- (org.eclipse.jetty:jetty-http:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | \- (org.eclipse.jetty:jetty-io:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty:jetty-client:jar:9.2.6.v20141205:runtime [INFO] | | +- (org.eclipse.jetty:jetty-http:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | \- (org.eclipse.jetty:jetty-io:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty:jetty-util:jar:9.2.6.v20141205:runtime [INFO] | +- org.eclipse.jetty.spdy:spdy-client:jar:9.2.6.v20141205:runtime [INFO] | | +- (org.eclipse.jetty.spdy:spdy-core:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | \- org.eclipse.jetty:jetty-alpn-client:jar:9.2.6.v20141205:runtime [INFO] | | \- (org.eclipse.jetty:jetty-io:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty.spdy:spdy-core:jar:9.2.6.v20141205:runtime [INFO] | | +- (org.eclipse.jetty:jetty-util:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | \- (org.eclipse.jetty:jetty-io:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty.spdy:spdy-http-common:jar:9.2.6.v20141205:runtime [INFO] | | \- (org.eclipse.jetty.spdy:spdy-core:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty.spdy:spdy-http-server:jar:9.2.6.v20141205:runtime [INFO] | | +- (org.eclipse.jetty.spdy:spdy-http-common:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | +- (org.eclipse.jetty.spdy:spdy-server:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | \- (org.eclipse.jetty:jetty-client:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- org.eclipse.jetty.spdy:spdy-server:jar:9.2.6.v20141205:runtime [INFO] | | +- (org.eclipse.jetty.spdy:spdy-core:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | +- (org.eclipse.jetty.spdy:spdy-client:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | | \- (org.eclipse.jetty:jetty-server:jar:9.2.6.v20141205:runtime - omitted for duplicate) [INFO] | +- (javax.servlet:javax.servlet-api:jar:3.1.0:runtime - omitted for duplicate) [INFO] | \- (org.restlet.jse:org.restlet:jar:2.3.1:runtime - omitted for duplicate) [INFO] +- org.apache.deltaspike.cdictrl:deltaspike-cdictrl-weld:jar:1.2.1:runtime [INFO] | \- (org.apache.deltaspike.cdictrl:deltaspike-cdictrl-api:jar:1.2.1:runtime - omitted for duplicate) [INFO] +- org.apache.deltaspike.modules:deltaspike-servlet-module-impl:jar:1.2.1:runtime [INFO] | +- (org.apache.deltaspike.core:deltaspike-core-api:jar:1.2.1:runtime - omitted for duplicate) [INFO] | +- org.apache.deltaspike.core:deltaspike-core-impl:jar:1.2.1:runtime [INFO] | | \- (org.apache.deltaspike.core:deltaspike-core-api:jar:1.2.1:runtime - omitted for duplicate) [INFO] | \- (org.apache.deltaspike.modules:deltaspike-servlet-module-api:jar:1.2.1:runtime - omitted for duplicate) [INFO] +- org.apache.deltaspike.modules:deltaspike-jpa-module-impl:jar:1.2.1:runtime [INFO] | +- (org.apache.deltaspike.core:deltaspike-core-api:jar:1.2.1:runtime - omitted for duplicate) [INFO] | +- (org.apache.deltaspike.core:deltaspike-core-impl:jar:1.2.1:runtime - omitted for duplicate) [INFO] | \- (org.apache.deltaspike.modules:deltaspike-jpa-module-api:jar:1.2.1:runtime - omitted for duplicate) [INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.1:runtime [INFO] | +- (org.slf4j:slf4j-api:jar:1.7.7:runtime - omitted for conflict with 1.7.10) [INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.1:runtime [INFO] +- junit:junit:jar:4.12:test [INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] \- org.apache.deltaspike.modules:deltaspike-test-control-module-api:jar:1.2.1:test [INFO] \- (org.apache.deltaspike.core:deltaspike-core-api:jar:1.2.1:test - omitted for duplicate)
However, there is a version conflict with javassist that I strongly advise to handle using dependencyManagement, or you will get hard to understand "bugs". :-)
It seems to me that you do not have a version conflict, but rather that the jandex jar (and I guess many others) is not in the classpath when your test is run.
Hope this helps... Ludovic | | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT. |
