创建EJB提供者javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType [英] create EJB Provider javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType

查看:647
本文介绍了创建EJB提供者javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行一个简单的JPA网页,在我的测试中,我正在使用ejb. Maven全新安装可以毫无问题地运行测试,但仅运行测试本身会给我带来错误

Im trying to run a simple JPA web page, in my tests I am using ejb. Maven clean install runs the tests without problem but only running the tests by itself gibes me an error

javax.ejb.EJBException:没有可用的EJBContainer提供程序 名为org.apache.openejb.OpenEjbContainer $ Provider的提供程序在创建EJBContainer时引发了意外的异常: java.lang.NoSuchMethodError java.lang.NoSuchMethodError:javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType;

javax.ejb.EJBException: No EJBContainer provider available Provider named org.apache.openejb.OpenEjbContainer$Provider threw unexpected exception at create EJBContainer: java.lang.NoSuchMethodError java.lang.NoSuchMethodError: javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType;

我尝试过更改依赖项和内容,但是仍然无法正常工作.

I've tried changing around dependencies and stuff but it still doesn't work.

pom.xml依赖项:

pom.xml dependencies:


<dependencies>
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>openejb-client</artifactId>
            <version>8.0.0-M1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>5.4.1.Final</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>openejb-core</artifactId>
            <version>8.0.0-M2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>openejb-server</artifactId>
            <version>8.0.0-M1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>openejb-cxf</artifactId>
            <version>8.0.0-M1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.2.5</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>openejb-junit</artifactId>
            <version>8.0.0-M2</version>
        </dependency>

        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>2.4.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>5.4.1.Final</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.faces</artifactId>
            <version>2.4.0</version>
        </dependency>

        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>6.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>openejb-jee</artifactId>
            <version>8.0.0-M2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>javaee-api</artifactId>
            <version>8.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.11.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.11.2</version>
        </dependency>
    </dependencies>

运行依赖项:tree -Dverbose:

running dependency:tree -Dverbose:

[INFO] +- org.apache.tomee:openejb-client:jar:8.0.0-M1:provided
[INFO] |  +- (org.apache.tomee:javaee-api:jar:8.0:provided - omitted for duplicate)
[INFO] |  +- (javax.xml.bind:jaxb-api:jar:2.3.0:compile - scope updated from provided; omitted for duplicate)
[INFO] |  +- com.sun.xml.bind:jaxb-impl:jar:2.3.0:provided
[INFO] |  \- com.sun.xml.bind:jaxb-core:jar:2.3.0:provided
[INFO] +- junit:junit:jar:4.12:test (scope not updated to compile)
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hibernate:hibernate-core:jar:5.4.1.Final:compile
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] |  +- org.javassist:javassist:jar:3.24.0-GA:compile
[INFO] |  +- net.bytebuddy:byte-buddy:jar:1.9.5:compile
[INFO] |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.1.1.Final:compile
[INFO] |  +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] |  +- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.0.Final:compile
[INFO] |  |  \- (org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile - omitted for duplicate)
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] |  |  \- (javax.activation:javax.activation-api:jar:1.2.0:compile - omitted for duplicate)
[INFO] |  \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] |     +- (javax.xml.bind:jaxb-api:jar:2.3.1:compile - omitted for conflict with 2.3.0)
[INFO] |     +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
[INFO] |     +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] |     +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] |     +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] |     \- (javax.activation:javax.activation-api:jar:1.2.0:compile - omitted for duplicate)
[INFO] +- org.apache.tomee:openejb-core:jar:8.0.0-M2:test (scope not updated to compile)
[INFO] |  +- org.apache.tomee:mbean-annotation-api:jar:8.0.0-M2:test
[INFO] |  +- org.apache.tomee:openejb-jpa-integration:jar:8.0.0-M2:test
[INFO] |  +- (org.apache.tomee:javaee-api:jar:8.0:test - omitted for duplicate)
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.8.1:test
[INFO] |  +- org.apache.tomee:openejb-api:jar:8.0.0-M2:test
[INFO] |  |  +- (org.apache.tomee:mbean-annotation-api:jar:8.0.0-M2:test - omitted for duplicate)
[INFO] |  |  \- (org.apache.tomee:javaee-api:jar:8.0:test - omitted for duplicate)
[INFO] |  +- org.apache.tomee:openejb-loader:jar:8.0.0-M2:test
[INFO] |  +- org.apache.tomee:openejb-javaagent:jar:8.0.0-M2:test
[INFO] |  +- (org.apache.tomee:openejb-jee:jar:8.0.0-M2:test - omitted for duplicate)
[INFO] |  +- org.apache.tomee:openejb-jee-accessors:jar:8.0.0-M2:test
[INFO] |  |  +- (org.apache.tomee:openejb-jee:jar:8.0.0-M2:test - omitted for duplicate)
[INFO] |  |  +- (org.apache.tomee:openejb-loader:jar:8.0.0-M2:test - omitted for duplicate)
[INFO] |  |  \- org.metatype.sxc:sxc-jaxb-core:jar:0.8:test
[INFO] |  |     \- org.metatype.sxc:sxc-runtime:jar:0.8:test
[INFO] |  +- commons-cli:commons-cli:jar:1.2:test
[INFO] |  +- commons-collections:commons-collections:jar:3.2.2:test
[INFO] |  +- org.apache.activemq:activemq-ra:jar:5.15.6:test
[INFO] |  |  +- (org.apache.activemq:activemq-broker:jar:5.15.6:test - omitted for duplicate)
[INFO] |  |  \- org.apache.activemq:activemq-kahadb-store:jar:5.15.6:test
[INFO] |  |     +- (org.apache.activemq:activemq-broker:jar:5.15.6:test - omitted for duplicate)
[INFO] |  |     \- org.apache.activemq.protobuf:activemq-protobuf:jar:1.1:test
[INFO] |  +- org.apache.activemq:activemq-broker:jar:5.15.6:test
[INFO] |  |  +- org.apache.activemq:activemq-client:jar:5.15.6:test
[INFO] |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:test - omitted for conflict with 1.7.21)
[INFO] |  |  |  \- org.fusesource.hawtbuf:hawtbuf:jar:1.11:test
[INFO] |  |  \- org.apache.activemq:activemq-openwire-legacy:jar:5.15.6:test
[INFO] |  |     \- (org.apache.activemq:activemq-client:jar:5.15.6:test - omitted for duplicate)
[INFO] |  +- org.apache.activemq:activemq-jdbc-store:jar:5.15.6:test
[INFO] |  +- org.apache.geronimo.components:geronimo-connector:jar:3.1.4:test
[INFO] |  |  +- (org.apache.geronimo.components:geronimo-transaction:jar:3.1.4:test - omitted for duplicate)
[INFO] |  |  \- org.apache.geronimo.specs:geronimo-j2ee-connector_1.6_spec:jar:1.0:test
[INFO] |  +- org.apache.geronimo.components:geronimo-transaction:jar:3.1.4:test
[INFO] |  |  \- (org.apache.geronimo.specs:geronimo-j2ee-connector_1.6_spec:jar:1.0:test - omitted for duplicate)
[INFO] |  +- org.objectweb.howl:howl:jar:1.0.1-1:test
[INFO] |  +- org.apache.geronimo.javamail:geronimo-javamail_1.4_mail:jar:1.9.0-alpha-2:test
[INFO] |  +- org.apache.xbean:xbean-asm7-shaded:jar:4.12:test
[INFO] |  +- org.apache.xbean:xbean-finder-shaded:jar:4.12:test
[INFO] |  |  \- (org.apache.xbean:xbean-asm7-shaded:jar:4.12:test - omitted for duplicate)
[INFO] |  +- org.apache.xbean:xbean-reflect:jar:4.12:test
[INFO] |  +- org.apache.xbean:xbean-naming:jar:4.12:test
[INFO] |  +- org.apache.xbean:xbean-bundleutils:jar:4.12:test
[INFO] |  +- (org.hsqldb:hsqldb:jar:2.3.2:test - omitted for conflict with 2.4.1)
[INFO] |  +- org.apache.commons:commons-dbcp2:jar:2.1:test
[INFO] |  |  \- (commons-logging:commons-logging:jar:1.2:test - omitted for duplicate)
[INFO] |  +- org.apache.commons:commons-pool2:jar:2.3:test
[INFO] |  +- org.codehaus.swizzle:swizzle-stream:jar:1.6.2:test
[INFO] |  +- commons-logging:commons-logging:jar:1.2:test
[INFO] |  +- org.apache.openejb.shade:quartz-openejb-shade:jar:2.2.1:test
[INFO] |  +- org.slf4j:slf4j-jdk14:jar:1.7.21:test
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.21:test
[INFO] |  +- org.apache.openwebbeans:openwebbeans-impl:jar:2.0.9:test
[INFO] |  |  +- (org.apache.xbean:xbean-asm7-shaded:jar:4.12:test - omitted for duplicate)
[INFO] |  |  \- (org.apache.openwebbeans:openwebbeans-spi:jar:2.0.9:test - omitted for duplicate)
[INFO] |  +- org.apache.openwebbeans:openwebbeans-spi:jar:2.0.9:test
[INFO] |  +- org.apache.openwebbeans:openwebbeans-ejb:jar:2.0.9:test
[INFO] |  |  \- (org.apache.openwebbeans:openwebbeans-impl:jar:2.0.9:test - omitted for duplicate)
[INFO] |  +- org.apache.openwebbeans:openwebbeans-ee:jar:2.0.9:test
[INFO] |  |  +- (org.apache.openwebbeans:openwebbeans-impl:jar:2.0.9:test - omitted for duplicate)
[INFO] |  |  \- (org.apache.openwebbeans:openwebbeans-ee-common:jar:2.0.9:test - omitted for duplicate)
[INFO] |  +- org.apache.openwebbeans:openwebbeans-ee-common:jar:2.0.9:test
[INFO] |  |  \- (org.apache.openwebbeans:openwebbeans-impl:jar:2.0.9:test - omitted for duplicate)
[INFO] |  +- org.apache.openwebbeans:openwebbeans-web:jar:2.0.9:test
[INFO] |  |  +- (org.apache.openwebbeans:openwebbeans-impl:jar:2.0.9:test - omitted for duplicate)
[INFO] |  |  \- org.apache.openwebbeans:openwebbeans-el22:jar:2.0.9:test
[INFO] |  +- org.apache.openjpa:openjpa:jar:3.0.0:test
[INFO] |  |  +- net.sourceforge.serp:serp:jar:1.15.1:test
[INFO] |  |  \- (org.apache.xbean:xbean-asm6-shaded:jar:4.8:test - omitted for conflict with 4.10)
[INFO] |  \- org.apache.tomee.patch:bval-jsr:jar:2.0.1-83f28d8:test
[INFO] +- org.apache.tomee:openejb-server:jar:8.0.0-M1:test
[INFO] |  +- (org.apache.tomee:javaee-api:jar:8.0:test - omitted for duplicate)
[INFO] |  +- (org.apache.tomee:openejb-jee:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  +- (org.apache.tomee:openejb-loader:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  +- (org.apache.tomee:openejb-core:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  +- (org.apache.tomee:openejb-client:jar:8.0.0-M1:test - omitted for duplicate)
[INFO] |  +- org.apache.xbean:xbean-asm6-shaded:jar:4.10:test
[INFO] |  +- (org.apache.xbean:xbean-finder-shaded:jar:4.10:test - omitted for conflict with 4.12)
[INFO] |  +- (org.apache.xbean:xbean-reflect:jar:4.10:test - omitted for conflict with 4.12)
[INFO] |  \- (commons-cli:commons-cli:jar:1.2:test - omitted for duplicate)
[INFO] +- org.apache.tomee:openejb-cxf:jar:8.0.0-M1:test
[INFO] |  +- org.apache.tomee:openejb-webservices:jar:8.0.0-M1:test
[INFO] |  |  +- (org.apache.tomee:openejb-loader:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  |  +- (org.apache.tomee:openejb-core:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  |  +- (org.apache.tomee:openejb-server:jar:8.0.0-M1:test - omitted for duplicate)
[INFO] |  |  +- org.apache.tomee:openejb-http:jar:8.0.0-M1:test
[INFO] |  |  |  +- (org.apache.tomee:javaee-api:jar:8.0:test - omitted for duplicate)
[INFO] |  |  |  +- (org.apache.tomee:openejb-core:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  |  |  +- (org.apache.tomee:openejb-loader:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  |  |  +- (org.apache.tomee:openejb-server:jar:8.0.0-M1:test - omitted for duplicate)
[INFO] |  |  |  \- org.apache.tomee:openejb-ejbd:jar:8.0.0-M1:test
[INFO] |  |  |     +- (org.apache.tomee:javaee-api:jar:8.0:test - omitted for duplicate)
[INFO] |  |  |     +- (org.apache.tomee:openejb-core:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  |  |     +- (org.apache.tomee:openejb-server:jar:8.0.0-M1:test - omitted for duplicate)
[INFO] |  |  |     +- (org.apache.tomee:openejb-loader:jar:8.0.0-M1:test - omitted for conflict with 8.0.0-M2)
[INFO] |  |  |     \- (org.apache.tomee:openejb-client:jar:8.0.0-M1:test - omitted for duplicate)
[INFO] |  |  +- (javax.xml.bind:jaxb-api:jar:2.3.0:test - omitted for duplicate)
[INFO] |  |  +- (com.sun.xml.bind:jaxb-impl:jar:2.3.0:test - omitted for duplicate)
[INFO] |  |  +- (com.sun.xml.bind:jaxb-core:jar:2.3.0:test - omitted for duplicate)
[INFO] |  |  +- (org.codehaus.swizzle:swizzle-stream:jar:1.6.2:test - omitted for duplicate)
[INFO] |  |  +- (org.apache.tomee:javaee-api:jar:8.0:test - omitted for duplicate)
[INFO] |  |  \- (wsdl4j:wsdl4j:jar:1.6.3:test - omitted for duplicate)
[INFO] |  +- org.apache.tomee:openejb-cxf-transport:jar:8.0.0-M1:test
[INFO] |  |  +- (org.apache.tomee:openejb-http:jar:8.0.0-M1:test - omitted for duplicate)
[INFO] |  |  +- org.apache.cxf:cxf-rt-transports-http:jar:3.2.6:test
[INFO] |  |  |  \- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  \- org.apache.cxf:cxf-rt-management:jar:3.2.6:test
[INFO] |  |     \- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  +- wsdl4j:wsdl4j:jar:1.6.3:test
[INFO] |  +- org.apache.wss4j:wss4j-ws-security-dom:jar:2.2.2:test
[INFO] |  |  \- org.apache.wss4j:wss4j-ws-security-common:jar:2.2.2:test
[INFO] |  |     +- (org.slf4j:slf4j-api:jar:1.7.25:test - omitted for conflict with 1.7.21)
[INFO] |  |     +- org.apache.santuario:xmlsec:jar:2.1.2:test
[INFO] |  |     |  +- (org.slf4j:slf4j-api:jar:1.7.25:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- (com.fasterxml.woodstox:woodstox-core:jar:5.0.3:test - omitted for conflict with 5.1.0)
[INFO] |  |     |  \- commons-codec:commons-codec:jar:1.11:test
[INFO] |  |     +- org.opensaml:opensaml-saml-impl:jar:3.3.0:test
[INFO] |  |     |  +- org.opensaml:opensaml-profile-api:jar:3.3.0:test
[INFO] |  |     |  |  +- org.opensaml:opensaml-core:jar:3.3.0:test
[INFO] |  |     |  |  |  +- (joda-time:joda-time:jar:2.9:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- org.opensaml:opensaml-saml-api:jar:3.3.0:test
[INFO] |  |     |  |  +- org.opensaml:opensaml-xmlsec-api:jar:3.3.0:test
[INFO] |  |     |  |  |  +- (org.opensaml:opensaml-security-api:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  |  +- org.opensaml:opensaml-soap-api:jar:3.3.0:test
[INFO] |  |     |  |  |  +- (org.opensaml:opensaml-xmlsec-api:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  |  +- (org.opensaml:opensaml-profile-api:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- org.opensaml:opensaml-security-impl:jar:3.3.0:test
[INFO] |  |     |  |  +- org.opensaml:opensaml-security-api:jar:3.3.0:test
[INFO] |  |     |  |  |  +- (org.opensaml:opensaml-core:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (org.apache.santuario:xmlsec:jar:2.0.5:test - omitted for conflict with 2.1.2)
[INFO] |  |     |  |  |  +- org.cryptacular:cryptacular:jar:1.1.1:test
[INFO] |  |     |  |  |  |  \- (org.bouncycastle:bcprov-jdk15on:jar:1.54:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (org.bouncycastle:bcprov-jdk15on:jar:1.54:test - omitted for conflict with 1.60)
[INFO] |  |     |  |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- org.opensaml:opensaml-xmlsec-impl:jar:3.3.0:test
[INFO] |  |     |  |  +- (org.opensaml:opensaml-xmlsec-api:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (org.opensaml:opensaml-security-impl:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- net.shibboleth.utilities:java-support:jar:7.3.0:test
[INFO] |  |     |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  +- joda-time:joda-time:jar:2.9:test
[INFO] |  |     |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     +- org.opensaml:opensaml-xacml-impl:jar:3.3.0:test
[INFO] |  |     |  +- org.opensaml:opensaml-xacml-api:jar:3.3.0:test
[INFO] |  |     |  |  +- (org.opensaml:opensaml-core:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     +- org.opensaml:opensaml-xacml-saml-impl:jar:3.3.0:test
[INFO] |  |     |  +- org.opensaml:opensaml-xacml-saml-api:jar:3.3.0:test
[INFO] |  |     |  |  +- (org.opensaml:opensaml-xacml-api:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (org.opensaml:opensaml-saml-api:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     |  +- (org.opensaml:opensaml-saml-impl:jar:3.3.0:test - omitted for duplicate)
[INFO] |  |     |  +- (net.shibboleth.utilities:java-support:jar:7.3.0:test - omitted for duplicate)
[INFO] |  |     |  +- (commons-codec:commons-codec:jar:1.10:test - omitted for conflict with 1.11)
[INFO] |  |     |  \- (org.slf4j:slf4j-api:jar:1.7.12:test - omitted for conflict with 1.7.21)
[INFO] |  |     +- org.jasypt:jasypt:jar:1.9.2:test
[INFO] |  |     \- (org.apache.geronimo.javamail:geronimo-javamail_1.4_mail:jar:1.8.4:test - omitted for conflict with 1.9.0-alpha-2)
[INFO] |  +- org.bouncycastle:bcprov-jdk15on:jar:1.60:test
[INFO] |  +- org.apache.wss4j:wss4j-policy:jar:2.2.2:test
[INFO] |  |  \- org.apache.neethi:neethi:jar:3.1.1:test
[INFO] |  |     \- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:test
[INFO] |  |        +- javax.xml.stream:stax-api:jar:1.0-2:test
[INFO] |  |        \- org.codehaus.woodstox:stax2-api:jar:3.1.4:test
[INFO] |  +- org.apache.wss4j:wss4j-ws-security-stax:jar:2.2.2:test
[INFO] |  |  +- org.apache.wss4j:wss4j-bindings:jar:2.2.2:test
[INFO] |  |  |  \- (org.apache.santuario:xmlsec:jar:2.1.2:test - omitted for duplicate)
[INFO] |  |  \- (org.apache.wss4j:wss4j-ws-security-common:jar:2.2.2:test - omitted for duplicate)
[INFO] |  +- org.apache.wss4j:wss4j-ws-security-policy-stax:jar:2.2.2:test
[INFO] |  |  +- (org.apache.wss4j:wss4j-ws-security-stax:jar:2.2.2:test - omitted for duplicate)
[INFO] |  |  \- (org.apache.wss4j:wss4j-policy:jar:2.2.2:test - omitted for duplicate)
[INFO] |  +- (org.apache.xbean:xbean-finder-shaded:jar:4.10:test - omitted for conflict with 4.12)
[INFO] |  +- (org.apache.geronimo.components:geronimo-transaction:jar:3.1.4:test - omitted for duplicate)
[INFO] |  +- (org.apache.xbean:xbean-reflect:jar:4.10:test - omitted for conflict with 4.12)
[INFO] |  +- (org.slf4j:slf4j-api:jar:1.7.21:test - omitted for duplicate)
[INFO] |  +- (javax.xml.bind:jaxb-api:jar:2.3.0:test - omitted for duplicate)
[INFO] |  +- (com.sun.xml.bind:jaxb-impl:jar:2.3.0:test - omitted for duplicate)
[INFO] |  +- (com.sun.xml.bind:jaxb-core:jar:2.3.0:test - omitted for duplicate)
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.2.6:test
[INFO] |  |  +- xml-resolver:xml-resolver:jar:1.2:test
[INFO] |  |  +- org.apache.cxf:cxf-core:jar:3.2.6:test
[INFO] |  |  |  +- com.fasterxml.woodstox:woodstox-core:jar:5.1.0:test
[INFO] |  |  |  |  \- (org.codehaus.woodstox:stax2-api:jar:4.1:test - omitted for conflict with 3.1.4)
[INFO] |  |  |  \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.3:test
[INFO] |  |  +- org.apache.cxf:cxf-rt-bindings-soap:jar:3.2.6:test
[INFO] |  |  |  +- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  |  +- org.apache.cxf:cxf-rt-wsdl:jar:3.2.6:test
[INFO] |  |  |  |  +- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  |  |  \- (wsdl4j:wsdl4j:jar:1.6.3:test - omitted for duplicate)
[INFO] |  |  |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.2.6:test
[INFO] |  |  |     +- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  |     \- (org.apache.cxf:cxf-rt-wsdl:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.2.6:test
[INFO] |  |  |  \- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.2.6:test
[INFO] |  |  |  +- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  |  +- (org.apache.cxf:cxf-rt-bindings-soap:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  |  \- (org.apache.cxf:cxf-rt-wsdl:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |  \- org.apache.cxf:cxf-rt-ws-addr:jar:3.2.6:test
[INFO] |  |     +- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |     +- (org.apache.cxf:cxf-rt-bindings-soap:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |     \- org.apache.cxf:cxf-rt-ws-policy:jar:3.2.6:test
[INFO] |  |        +- (wsdl4j:wsdl4j:jar:1.6.3:test - omitted for duplicate)
[INFO] |  |        +- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |  |        \- (org.apache.neethi:neethi:jar:3.1.1:test - omitted for duplicate)
[INFO] |  \- org.apache.cxf:cxf-rt-ws-security:jar:3.2.6:test
[INFO] |     +- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |     +- (org.apache.cxf:cxf-rt-bindings-soap:jar:3.2.6:test - omitted for duplicate)
[INFO] |     +- org.apache.cxf:cxf-rt-security-saml:jar:3.2.6:test
[INFO] |     |  +- org.apache.cxf:cxf-rt-security:jar:3.2.6:test
[INFO] |     |  |  \- (org.apache.cxf:cxf-core:jar:3.2.6:test - omitted for duplicate)
[INFO] |     |  \- (org.apache.wss4j:wss4j-ws-security-dom:jar:2.2.2:test - omitted for duplicate)
[INFO] |     +- (org.apache.wss4j:wss4j-ws-security-dom:jar:2.2.2:test - omitted for duplicate)
[INFO] |     +- (org.apache.wss4j:wss4j-policy:jar:2.2.2:test - omitted for duplicate)
[INFO] |     +- (org.apache.wss4j:wss4j-ws-security-stax:jar:2.2.2:test - omitted for duplicate)
[INFO] |     \- (org.apache.wss4j:wss4j-ws-security-policy-stax:jar:2.2.2:test - omitted for duplicate)
[INFO] +- org.postgresql:postgresql:jar:42.2.5:compile
[INFO] +- org.apache.tomee:openejb-junit:jar:8.0.0-M2:compile
[INFO] |  +- (junit:junit:jar:4.12:compile - omitted for duplicate)
[INFO] |  \- (org.apache.tomee:openejb-core:jar:8.0.0-M2:compile - omitted for duplicate)
[INFO] +- org.hsqldb:hsqldb:jar:2.4.1:test
[INFO] +- org.hibernate:hibernate-entitymanager:jar:5.4.1.Final:compile
[INFO] |  +- (org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile - omitted for duplicate)
[INFO] |  +- (org.hibernate:hibernate-core:jar:5.4.1.Final:compile - omitted for duplicate)
[INFO] |  +- (org.dom4j:dom4j:jar:2.1.1:compile - omitted for duplicate)
[INFO] |  +- (org.hibernate.common:hibernate-commons-annotations:jar:5.1.0.Final:compile - omitted for duplicate)
[INFO] |  +- (javax.persistence:javax.persistence-api:jar:2.2:compile - omitted for duplicate)
[INFO] |  +- (net.bytebuddy:byte-buddy:jar:1.9.5:compile - omitted for duplicate)
[INFO] |  \- (org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.1.1.Final:compile - omitted for duplicate)
[INFO] +- org.glassfish:javax.faces:jar:2.4.0:compile
[INFO] |  +- javax.el:javax.el-api:jar:3.0.1-b04:compile
[INFO] |  \- org.glassfish:javax.el:jar:3.0.1-b04:compile
[INFO] +- org.primefaces:primefaces:jar:6.2:compile
[INFO] +- org.apache.tomee:openejb-jee:jar:8.0.0-M2:compile
[INFO] +- org.apache.tomee:javaee-api:jar:8.0:provided
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.11.2:compile
[INFO] \- org.apache.logging.log4j:log4j-core:jar:2.11.2:compile
[INFO]    \- (org.apache.logging.log4j:log4j-api:jar:2.11.2:compile - omitted for duplicate)

我看到了所有冲突,重复出现了,但是我不确定该怎么办.应用程序本身可以运行,并且可以执行测试,只有测试没有运行通过(类配置)

I see all the conflicts and omitted for duplicate but I am not sure what to do with it. The application itself runs and does what it should only the tests are not running trough (Class Configuration)

推荐答案

您具有带有范围测试的open-ejb依赖项

You have open-ejb dependencies with scope test

它在运行时中运行,因为它取决于您在运行应用程序时apache服务器具有的提供的依赖项,在运行测试时,您没有提供所需的依赖项.

It is working in runtime , because it depends on provided dependencies which apache server has when you are running the application , when running tests you don't have provided dependencies which you need.

您可以引用此链接 https://mvnrepository.com /artifact/org.apache.openjpa/openjpa/3.0.0

要解决此问题,请添加此依赖项: https://mvnrepository.com/artifact/org. hibernate.javax.persistence/hibernate-jpa-2.1-api

To fix the problem add this dependency : https://mvnrepository.com/artifact/org.hibernate.javax.persistence/hibernate-jpa-2.1-api

这篇关于创建EJB提供者javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆