目前正在努力部署WAR8.5中的war文件,但每次我启动我的war文件时,都会出现一个错误。
初始化上下文时捕获异常:{0}org.springframework.beans.factory.beanCreationException:创建ServletContext资源[/web-inf/my-servlet.xml]中定义的名为“Entity ManagerFactory”的bean时出错:调用init方法失败;嵌套异常是java.lang.nosuchmethoderror:javax/persistence/table.indexes()[Ljavax/persistence/index;
pom.xml
<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>
<groupId>something-awesome</groupId>
<artifactId>something-awesome</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>something-awesome</name>
<url>/something-awesome</url>
<packaging>war</packaging>
<properties>
<java-version>1.7</java-version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc</artifactId>
<version>3.61</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20151123</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.3.5.Final</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<!-- Swagger Documentation -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>compile</defaultGoal>
<finalName>${project.name}</finalName>
<outputDirectory>${project.basedir}\src\main\webapp\WEB-INF\classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/lib/servlet-api-2.5.jar,WEB-INF/lib/bootstrap-1.0.0.jar,WEB-INF/lib/com.ibm.mq-1.0.0.jar,WEB-INF/lib/com.ibm.mq.commonservices-1.0.0.jar,WEB-INF/lib/com.ibm.mq.connector-1.0.0.jar,WEB-INF/lib/com.ibm.mq.headers-1.0.0.jar,WEB-INF/lib/com.ibm.mq.jmqi-1.0.0.jar,WEB-INF/lib/com.ibm.mq.pcf-1.0.0.jar,WEB-INF/lib/com.ibm.websphere.sca.1.0-sca_api-1.0.0.jar,WEB-INF/lib/com.ibm.websphere.sca.2.0-sca_api-1.0.0.jar,WEB-INF/lib/com.ibm.ws.admin.core-1.0.0.jar,WEB-INF/lib/com.ibm.ws.admin.services-1.0.0.jar,WEB-INF/lib/com.ibm.ws.batch.runtime-1.0.0.jar,WEB-INF/lib/com.ibm.ws.emf-1.0.0.jar,WEB-INF/lib/com.ibm.ws.jaxrs-1.0.0.jar,WEB-INF/lib/com.ibm.ws.jpa-1.0.0.jar,WEB-INF/lib/com.ibm.ws.jsf.myfaces-1.0.0.jar,WEB-INF/lib/com.ibm.ws.portletcontainer-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.jackson-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.jaxrs-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.soap-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.vajava-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.wsdl4j-1.0.0.jar,WEB-INF/lib/com.ibm.ws.prereq.xlxp-1.0.0.jar,WEB-INF/lib/com.ibm.ws.runtime-1.0.0.jar,WEB-INF/lib/com.ibm.ws.runtime.dist-1.0.0.jar,WEB-INF/lib/com.ibm.ws.sib.server-1.0.0.jar,WEB-INF/lib/com.ibm.ws.sip.container-1.0.0.jar,WEB-INF/lib/com.ibm.ws.sip.interface-1.0.0.jar,WEB-INF/lib/com.ibm.ws.wccm-1.0.0.jar,WEB-INF/lib/com.ibm.ws.webcontainer-1.0.0.jar,WEB-INF/lib/com.ibm.wsfp.main-1.0.0.jar,WEB-INF/lib/dhbcore-1.0.0.jar,WEB-INF/lib/ffdcSupport-1.0.0.jar,WEB-INF/lib/j2ee-1.0.0.jar,WEB-INF/lib/mail-impl-1.0.0.jar,WEB-INF/lib/org.apache.tuscany.sca.api-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.common-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.commonj.sdo-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore.change-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore.sdo-1.0.0.jar,WEB-INF/lib/org.eclipse.emf.ecore.xmi-1.0.0.jar,WEB-INF/lib/osgi.cmpn-1.0.0.jar,WEB-INF/lib/osgi.core-1.0.0.jar,WEB-INF/lib/PD-1.0.0.jar,WEB-INF/lib/RPCAdapter-1.0.0.jar,WEB-INF/lib/RPCAdapter-annotation-1.0.0.jar,WEB-INF/lib/rsadbutils-1.0.0.jar,WEB-INF/lib/servlet-api-2.5.jar,WEB-INF/lib/webmsg_applib-1.0.0.jar,WEB-INF/lib/wink-jaxrs-webdav-1.0.0.jar,WEB-INF/lib/wsadie.marshall-1.0.0.jar,WEB-INF/lib/wsadie.wsatlib-1.0.0.jar,WEB-INF/lib/xmlapi-1.0.0.jar,WEB-INF/lib/wink-jaxrs-webdav-1.0.0.jar,WEB-INF/lib/wsadie.marshall-1.0.0.jar,WEB-INF/lib/wsadie.wsatlib-1.0.0.jar,WEB-INF/lib/xmlapi-1.0.0.jar</packagingExcludes>
</configuration>
</plugin>
<!-- <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version> <configuration> <port>8080</port> <path>/</path> </configuration>
</plugin> -->
</plugins>
</build>
依赖项-树:
[INFO] +- com.ibm.db2.jcc:db2jcc:jar:3.61:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.5.3.RELEASE:compile
[INFO] | | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | \- org.springframework:spring-context:jar:4.3.8.RELEASE:compile
[INFO] | | +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-expression:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.3.RELEASE:compile
[INFO] | | \- (org.springframework.boot:spring-boot:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.3.RELEASE:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] | | | +- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.24; omitted for duplicate)
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] | | \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] | +- org.springframework:spring-core:jar:4.3.8.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.3.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.3.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.14:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.14:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.14:compile
[INFO] | | \- (org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.14:compile - omitted for duplicate)
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.5.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.3.0.Final; omitted for duplicate)
[INFO] | | \- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.8:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.8:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.8.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:4.3.8.RELEASE:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- org.springframework:spring-beans:jar:4.3.8.RELEASE:compile
[INFO] | | | \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.8.RELEASE:compile
[INFO] | +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-expression:jar:4.3.8.RELEASE:compile
[INFO] | | \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-web:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.3.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.3.RELEASE:compile
[INFO] | | +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.3.RELEASE:compile
[INFO] | | +- (org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile - omitted for duplicate)
[INFO] | | +- org.apache.tomcat:tomcat-jdbc:jar:8.5.14:compile
[INFO] | | | \- org.apache.tomcat:tomcat-juli:jar:8.5.14:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.3.8.RELEASE:compile
[INFO] | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-tx:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.hibernate:hibernate-core:jar:5.0.12.Final:compile - omitted for duplicate)
[INFO] | +- org.hibernate:hibernate-entitymanager:jar:5.0.12.Final:compile
[INFO] | | +- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.3.0.Final; omitted for duplicate)
[INFO] | | +- (org.hibernate:hibernate-core:jar:5.0.12.Final:compile - omitted for duplicate)
[INFO] | | +- (dom4j:dom4j:jar:1.6.1:compile - omitted for duplicate)
[INFO] | | +- (org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile - omitted for duplicate)
[INFO] | | \- (org.javassist:javassist:jar:3.21.0-GA:compile - version managed from 3.18.1-GA; omitted for duplicate)
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.11.3.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.13.3.RELEASE:compile
[INFO] | | | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | | +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.24; omitted for duplicate)
[INFO] | | | \- (org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime - version managed from 1.7.24; omitted for duplicate)
[INFO] | | +- org.springframework:spring-orm:jar:4.3.8.RELEASE:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | | +- (org.springframework:spring-jdbc:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-tx:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- org.springframework:spring-tx:jar:4.3.8.RELEASE:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] | | \- (org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime - version managed from 1.7.24; omitted for duplicate)
[INFO] | \- org.springframework:spring-aspects:jar:4.3.8.RELEASE:compile
[INFO] | \- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.9; omitted for duplicate)
[INFO] +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] +- org.json:json:jar:20151123:compile
[INFO] +- org.hibernate:hibernate-core:jar:5.0.12.Final:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] | +- org.javassist:javassist:jar:3.21.0-GA:compile (version managed from 3.18.1-GA)
[INFO] | +- antlr:antlr:jar:2.7.7:compile
[INFO] | +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] | +- org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | \- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.3.0.Final; omitted for duplicate)
[INFO] +- org.hibernate:hibernate-c3p0:jar:4.3.5.Final:compile
[INFO] | +- (org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile - version managed from 3.1.3.GA; omitted for duplicate)
[INFO] | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[INFO] | +- (org.hibernate:hibernate-core:jar:5.0.12.Final:compile - version managed from 4.3.5.Final; omitted for duplicate)
[INFO] | \- com.mchange:c3p0:jar:0.9.2.1:compile
[INFO] | \- com.mchange:mchange-commons-java:jar:0.2.3.4:compile
[INFO] +- javax.transaction:jta:jar:1.1:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.2.2:compile
[INFO] | +- org.mapstruct:mapstruct:jar:1.0.0.CR1:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.3:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.3:compile
[INFO] | | +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile - version managed from 2.4.5; omitted for duplicate)
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.6.3; omitted for duplicate)
[INFO] | | \- (io.swagger:swagger-annotations:jar:1.5.3:compile - omitted for duplicate)
[INFO] | +- io.springfox:springfox-spi:jar:2.2.2:compile
[INFO] | | \- io.springfox:springfox-core:jar:2.2.2:compile
[INFO] | | +- (com.google.guava:guava:jar:18.0:compile - omitted for duplicate)
[INFO] | | +- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] | | +- (org.aspectj:aspectjrt:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] | | +- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] | | +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile - version managed from 0.18.0.RELEASE; omitted for duplicate)
[INFO] | +- io.springfox:springfox-schema:jar:2.2.2:compile
[INFO] | | +- (io.springfox:springfox-core:jar:2.2.2:compile - omitted for duplicate)
[INFO] | | \- (io.springfox:springfox-spi:jar:2.2.2:compile - omitted for duplicate)
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.2.2:compile
[INFO] | | +- (io.swagger:swagger-annotations:jar:1.5.3:compile - omitted for duplicate)
[INFO] | | +- (io.swagger:swagger-models:jar:1.5.3:compile - omitted for duplicate)
[INFO] | | +- (io.springfox:springfox-spi:jar:2.2.2:compile - omitted for duplicate)
[INFO] | | +- (io.springfox:springfox-schema:jar:2.2.2:compile - omitted for duplicate)
[INFO] | | +- (io.springfox:springfox-spring-web:jar:2.2.2:compile - omitted for duplicate)
[INFO] | | +- (com.google.guava:guava:jar:18.0:compile - omitted for duplicate)
[INFO] | | +- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] | | +- (org.aspectj:aspectjrt:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] | | +- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] | | +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile - version managed from 0.18.0.RELEASE; omitted for duplicate)
[INFO] | +- io.springfox:springfox-spring-web:jar:2.2.2:compile
[INFO] | | +- (com.google.guava:guava:jar:18.0:compile - omitted for duplicate)
[INFO] | | +- (com.fasterxml:classmate:jar:1.3.3:compile - version managed from 1.2.0; omitted for duplicate)
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.12; omitted for duplicate)
[INFO] | | +- (org.aspectj:aspectjrt:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] | | +- (org.aspectj:aspectjweaver:jar:1.8.10:compile - version managed from 1.8.6; omitted for duplicate)
[INFO] | | +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile - version managed from 0.18.0.RELEASE; omitted for duplicate)
[INFO] | | +- (io.springfox:springfox-spi:jar:2.2.2:compile - omitted for duplicate)
[INFO] | | \- (io.springfox:springfox-schema:jar:2.2.2:compile - omitted for duplicate)
[INFO] | +- com.google.guava:guava:jar:18.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.3:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.8.10:compile
[INFO] | +- org.aspectj:aspectjweaver:jar:1.8.10:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - version managed from 4.0.9.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - version managed from 4.0.9.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - version managed from 4.0.9.RELEASE; omitted for duplicate)
[INFO] | | \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.10; omitted for duplicate)
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | | +- (org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.10; omitted for duplicate)
[INFO] | \- org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile
[INFO] | +- (org.springframework:spring-aop:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-web:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-webmvc:jar:4.3.8.RELEASE:compile - version managed from 4.3.5.RELEASE; omitted for duplicate)
[INFO] | \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.22; omitted for duplicate)
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.2.2:compile
[INFO] | \- (io.springfox:springfox-spring-web:jar:2.2.2:compile - omitted for duplicate)
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.7:compile
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.7:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] \- org.projectlombok:lombok:jar:1.16.16:provided
我只是不知道这个错误导致了什么。我执行了其他操作的问题,这是某种程度上与我当前的问题相关联的,但遗憾的是,没有运气从我的结束。有帮手吗?
初始化上下文时捕获异常:{0}org.springframework.beans.factory.BeanCreationException:创建ServletContext资源[/web-inf/something-servlet.xml]中定义的名为“Entity ManagerFactory”的bean时出错:设置bean属性“JPA VendorAdapter”时无法解析对bean“JPA VendorAdapter”的引用;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建ServletContext资源[/web-inf/something-servlet.xml]中定义的名为“JPA VendorAdapter”的bean时出错:bean实例化失败;嵌套异常为org.springframework.beans.beanInstantiationException:无法实例化[org.springframework.orm.jpa.vendor.HibernatejpavendorAdapter]:构造函数引发异常;嵌套异常为java.lang.IllegalStateException:无法确定Hibernate PersistenceProvider
对于那些寻找这个问题答案的人来说,
我们将JPA从JPA2.1降级到JPA2.0(因为WAS8.5不能支持JPA2.1)
有关JPA2.0/JPA2.1-WAS之间的依赖关系问题,请参见下表
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.7.Final</version>
根据我的理解,springboot使用的是最新版本(JPA的最新版本是2.1),因此我们做了这个解决方案。
更多的细节: 我正在尝试创建第一个没有注释的Spring MVC应用程序。下面是我的URL请求'http://localhost:8080/firstspringmvc/welcome.html',它调用了我的代码。 以下是我的错误列表供参考:
我创建了一个Spring App,我使用hibernate进行逆向工程,从MySQL Db生成java类。之后,我想使用这个类来实现存储库,但我有这个问题: 组织。springframework。豆。工厂BeanCreationException:创建名为“entityManagerFactory”的bean时出错,该bean在类路径资源[org/springframework/boot/auto
http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/
问题内容: 问题: 我正在为在类中执行方法创建切入点。该类是控制器类,由注解@Controller表示,因此对于方面所要求的相同,不需要bean。我附加了dispathcher servlet代码,方面和控制器类。有人可以识别出问题所在。 DISPATCHER SERVLET : 方面: 控制器类别: 控制台错误: 问题答案: 这是Spring AOP中的限制。当你使用AspectJ切入点将方面编
在我的Spring应用程序中,我有这些问题。有人能帮我吗? 我在pom.xml上添加了一些东西,但是应用程序没有启动,有很多错误。 启动应用程序上下文时出错。若要显示条件报告,请在启用“调试”的情况下重新运行应用程序。2019-01-26 14:58:17.003 错误 14580 --- [ 重新启动主屏幕] o.s.boot.Spring 应用程序: 应用程序运行失败
我有一个带有Hibernate的spring boot应用程序。spring boot 2.13分,Java 11分。 当我启动应用程序时,我得到一个异常: 下面是我的pom.xml: 我尝试了很多事情:spring boot数据jpa多个数据源entityManagerFactory错误创建在类路径资源中定义名称为'entityManagerFactory'的bean错误:调用init方法失败