哪个罐子里面有JPA 1.0?

时间:2015-08-26 12:10:21

标签: spring-mvc jpa spring-data-jpa

嗨,这就是我的类路径。任何人都可以告诉我哪个jar有JPA 1.0因为我正在

java.lang.nosuchmethoderror: javax.persistence.spi.persistenceunitinfo.getvalidationmode()

在我的所有研究之后,我得出结论,我的pom中的某些依赖性试图使用JPA 1.0而不是JPA 2.0。所以,请帮助我,我得到java.lang.nosuchmethoderror:javax.persistence.spi.persistenceunitinfo.getvalidationmode()

我的CLASSPATH

C:\DevEssentials\Git\spring-mvc\spring-mvc\target\classes
C:\Users\RD032936\.m2\repository\javax\servlet\javax.servlet-api\3.0.1\javax.servlet-api-3.0.1.jar
C:\Users\RD032936\.m2\repository\javax\servlet\jsp\javax.servlet.jsp-api\2.2.1\javax.servlet.jsp-api-2.2.1.jar
C:\Users\RD032936\.m2\repository\org\springframework\data\spring-data-jpa\1.5.1.RELEASE\spring-data-jpa-1.5.1.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\data\spring-data-commons\1.7.1.RELEASE\spring-data-commons-1.7.1.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-orm\4.0.2.RELEASE\spring-orm-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-jdbc\4.0.2.RELEASE\spring-jdbc-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-context\4.0.2.RELEASE\spring-context-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-aop\4.0.2.RELEASE\spring-aop-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-tx\4.0.2.RELEASE\spring-tx-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-beans\4.0.2.RELEASE\spring-beans-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-core\4.0.2.RELEASE\spring-core-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\aspectj\aspectjrt\1.7.4\aspectjrt-1.7.4.jar
C:\Users\RD032936\.m2\repository\org\slf4j\slf4j-api\1.7.6\slf4j-api-1.7.6.jar
C:\Users\RD032936\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.6\jcl-over-slf4j-1.7.6.jar
C:\Users\RD032936\.m2\repository\org\hsqldb\hsqldb\2.3.3\hsqldb-2.3.3.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-core\3.0.3\tiles-core-3.0.3.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-api\3.0.3\tiles-api-3.0.3.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-request-api\1.0.3\tiles-request-api-1.0.3.jar
C:\Users\RD032936\.m2\repository\commons-digester\commons-digester\2.0\commons-digester-2.0.jar
C:\Users\RD032936\.m2\repository\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-jsp\3.0.3\tiles-jsp-3.0.3.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-servlet\3.0.3\tiles-servlet-3.0.3.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-request-servlet\1.0.3\tiles-request-servlet-1.0.3.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-template\3.0.3\tiles-template-3.0.3.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-autotag-core-runtime\1.1.0\tiles-autotag-core-runtime-1.1.0.jar
C:\Users\RD032936\.m2\repository\org\apache\tiles\tiles-request-jsp\1.0.3\tiles-request-jsp-1.0.3.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-web\4.0.2.RELEASE\spring-web-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-webmvc\4.0.2.RELEASE\spring-webmvc-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\springframework\spring-expression\4.0.2.RELEASE\spring-expression-4.0.2.RELEASE.jar
C:\Users\RD032936\.m2\repository\org\hibernate\hibernate-entitymanager\4.3.4.Final\hibernate-entitymanager-4.3.4.Final.jar
C:\Users\RD032936\.m2\repository\org\jboss\logging\jboss-logging\3.1.3.GA\jboss-logging-3.1.3.GA.jar
C:\Users\RD032936\.m2\repository\org\jboss\logging\jboss-logging-annotations\1.2.0.Beta1\jboss-logging-annotations-1.2.0.Beta1.jar
C:\Users\RD032936\.m2\repository\org\hibernate\hibernate-core\4.3.4.Final\hibernate-core-4.3.4.Final.jar
C:\Users\RD032936\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar
C:\Users\RD032936\.m2\repository\org\jboss\jandex\1.1.0.Final\jandex-1.1.0.Final.jar
C:\Users\RD032936\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
C:\Users\RD032936\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar
C:\Users\RD032936\.m2\repository\org\hibernate\common\hibernate-commons-annotations\4.0.4.Final\hibernate-commons-annotations-4.0.4.Final.jar
C:\Users\RD032936\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar
C:\Users\RD032936\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.0.0.Final\jboss-transaction-api_1.2_spec-1.0.0.Final.jar
C:\Users\RD032936\.m2\repository\org\javassist\javassist\3.18.1-GA\javassist-3.18.1-GA.jar

我的pom.xml

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>4.0.2.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>


        </dependencies>
    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>javax.servlet.jsp-api</artifactId>
            <version>2.2.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
            <version>1.5.1.RELEASE</version>

        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>2.3.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-core</artifactId>
            <version>3.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-jsp</artifactId>
            <version>3.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>

        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.3.4.Final</version>
        </dependency>

    </dependencies>

1 个答案:

答案 0 :(得分:0)

您可以使用mvn dependency:tree Maven plugin

找到依赖项冲突

示例:mvn dependency:tree -Dverbose -Dincludes=javax.persistence