006_javax.persistence.Table.indexes

1 篇文章 0 订阅
1 篇文章 0 订阅

springboot整合jpa时候出现一下错误:

D:\Develop\Java\jdk1.8.0_141\bin\java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=51279 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:D:\Develop\IDEA\lib\idea_rt.jar=51280:D:\Develop\IDEA\bin -Dfile.encoding=UTF-8 -classpath D:\Develop\Java\jdk1.8.0_141\jre\lib\charsets.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\deploy.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\access-bridge-64.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\cldrdata.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\dnsns.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\jaccess.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\jfxrt.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\localedata.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\nashorn.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\sunec.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\sunjce_provider.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\sunmscapi.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\sunpkcs11.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\ext\zipfs.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\javaws.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\jce.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\jfr.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\jfxswt.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\jsse.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\management-agent.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\plugin.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\resources.jar;D:\Develop\Java\jdk1.8.0_141\jre\lib\rt.jar;D:\Develop\idea_workspace\webgis-datacenter\target\classes;D:\Develop\idea_workspace\webgis-datacenter\lib\javax.jms.jar;D:\Develop\idea_workspace\webgis-datacenter\lib\javax.transaction.jar;D:\Develop\idea_workspace\webgis-datacenter\lib\javax.ejb.jar;D:\Develop\idea_workspace\webgis-datacenter\lib\javax.servlet.jsp.jar;D:\Develop\idea_workspace\webgis-datacenter\lib\javax.resource.jar;D:\Develop\idea_workspace\webgis-datacenter\lib\javax.servlet.jsp.jstl.jar;D:\Develop\idea_workspace\webgis-datacenter\lib\javax.persistence.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-starter-jdbc\1.5.19.RELEASE\spring-boot-starter-jdbc-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-starter\1.5.19.RELEASE\spring-boot-starter-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot\1.5.19.RELEASE\spring-boot-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-autoconfigure\1.5.19.RELEASE\spring-boot-autoconfigure-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-starter-logging\1.5.19.RELEASE\spring-boot-starter-logging-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;D:\Develop\Maven_repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;D:\Develop\Maven_repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\Develop\Maven_repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;D:\Develop\Maven_repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;D:\Develop\Maven_repository\org\apache\tomcat\tomcat-jdbc\8.5.37\tomcat-jdbc-8.5.37.jar;D:\Develop\Maven_repository\org\apache\tomcat\tomcat-juli\8.5.37\tomcat-juli-8.5.37.jar;D:\Develop\Maven_repository\org\springframework\spring-jdbc\4.3.22.RELEASE\spring-jdbc-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-beans\4.3.22.RELEASE\spring-beans-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-tx\4.3.22.RELEASE\spring-tx-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-starter-data-jpa\1.5.19.RELEASE\spring-boot-starter-data-jpa-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-starter-aop\1.5.19.RELEASE\spring-boot-starter-aop-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-aop\4.3.22.RELEASE\spring-aop-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;D:\Develop\Maven_repository\org\hibernate\hibernate-core\5.0.12.Final\hibernate-core-5.0.12.Final.jar;D:\Develop\Maven_repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\Develop\Maven_repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar;D:\Develop\Maven_repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;D:\Develop\Maven_repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\Develop\Maven_repository\org\jboss\jandex\2.0.0.Final\jandex-2.0.0.Final.jar;D:\Develop\Maven_repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\Develop\Maven_repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;D:\Develop\Maven_repository\org\hibernate\hibernate-entitymanager\5.0.12.Final\hibernate-entitymanager-5.0.12.Final.jar;D:\Develop\Maven_repository\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;D:\Develop\Maven_repository\org\springframework\data\spring-data-jpa\1.11.18.RELEASE\spring-data-jpa-1.11.18.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\data\spring-data-commons\1.13.18.RELEASE\spring-data-commons-1.13.18.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-orm\4.3.22.RELEASE\spring-orm-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-context\4.3.22.RELEASE\spring-context-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\Develop\Maven_repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;D:\Develop\Maven_repository\org\springframework\spring-aspects\4.3.22.RELEASE\spring-aspects-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-starter-web\1.5.19.RELEASE\spring-boot-starter-web-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.19.RELEASE\spring-boot-starter-tomcat-1.5.19.RELEASE.jar;D:\Develop\Maven_repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.37\tomcat-embed-core-8.5.37.jar;D:\Develop\Maven_repository\org\apache\tomcat\tomcat-annotations-api\8.5.37\tomcat-annotations-api-8.5.37.jar;D:\Develop\Maven_repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.37\tomcat-embed-el-8.5.37.jar;D:\Develop\Maven_repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.37\tomcat-embed-websocket-8.5.37.jar;D:\Develop\Maven_repository\org\hibernate\hibernate-validator\5.3.6.Final\hibernate-validator-5.3.6.Final.jar;D:\Develop\Maven_repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;D:\Develop\Maven_repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\Develop\Maven_repository\com\fasterxml\jackson\core\jackson-databind\2.8.11.3\jackson-databind-2.8.11.3.jar;D:\Develop\Maven_repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;D:\Develop\Maven_repository\com\fasterxml\jackson\core\jackson-core\2.8.11\jackson-core-2.8.11.jar;D:\Develop\Maven_repository\org\springframework\spring-web\4.3.22.RELEASE\spring-web-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-webmvc\4.3.22.RELEASE\spring-webmvc-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-expression\4.3.22.RELEASE\spring-expression-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\org\springframework\spring-core\4.3.22.RELEASE\spring-core-4.3.22.RELEASE.jar;D:\Develop\Maven_repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar;D:\Develop\Maven_repository\com\alibaba\druid\1.0.11\druid-1.0.11.jar;D:\Develop\Java\jdk1.8.0_141\lib\jconsole.jar;D:\Develop\Java\jdk1.8.0_141\lib\tools.jar;D:\Develop\Maven_repository\com\oracle\ojdbc6\1.0.0\ojdbc6-1.0.0.jar com.ctjsoft.webgisdatacenter.WebgisDatacenterApplication

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v1.5.19.RELEASE)

2019-03-12 09:04:34.817  INFO 5412 --- [           main] c.c.w.WebgisDatacenterApplication        : Starting WebgisDatacenterApplication on SZL with PID 5412 (D:\Develop\idea_workspace\webgis-datacenter\target\classes started by szl in D:\Develop\idea_workspace\webgis-datacenter)
2019-03-12 09:04:34.823  INFO 5412 --- [           main] c.c.w.WebgisDatacenterApplication        : No active profile set, falling back to default profiles: default
2019-03-12 09:04:34.920  INFO 5412 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@68999068: startup date [Tue Mar 12 09:04:34 CST 2019]; root of context hierarchy
2019-03-12 09:04:36.274  INFO 5412 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$4fa87841] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-03-12 09:04:36.375  WARN 5412 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2019-03-12 09:04:36.755  INFO 5412 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8091 (http)
2019-03-12 09:04:36.818  INFO 5412 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-03-12 09:04:36.818  INFO 5412 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.37
2019-03-12 09:04:37.086  INFO 5412 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-03-12 09:04:37.086  INFO 5412 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2171 ms
2019-03-12 09:04:37.370  INFO 5412 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2019-03-12 09:04:37.374  INFO 5412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-03-12 09:04:37.374  INFO 5412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-03-12 09:04:37.375  INFO 5412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-03-12 09:04:37.375  INFO 5412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2019-03-12 09:04:37.375  INFO 5412 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'corsFilter' to: [/*]
2019-03-12 09:04:38.400  INFO 5412 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
2019-03-12 09:04:38.471  INFO 5412 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2019-03-12 09:04:38.486  INFO 5412 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
	name: default
	...]
2019-03-12 09:04:38.592  INFO 5412 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.0.12.Final}
2019-03-12 09:04:38.596  INFO 5412 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-03-12 09:04:38.597  INFO 5412 --- [           main] org.hibernate.cfg.Environment            : HHH000021: Bytecode provider name : javassist
2019-03-12 09:04:38.680  INFO 5412 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-03-12 09:04:38.799  INFO 5412 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.Oracle9iDialect
2019-03-12 09:04:39.339  WARN 5412 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
2019-03-12 09:04:39.368  INFO 5412 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed
2019-03-12 09:04:39.371  INFO 5412 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2019-03-12 09:04:39.390  INFO 5412 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-03-12 09:04:39.403 ERROR 5412 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call the method javax.persistence.Table.indexes()[Ljavax/persistence/Index; but it does not exist. Its class, javax.persistence.Table, is available from the following locations:

    jar:file:/D:/Develop/idea_workspace/webgis-datacenter/lib/javax.persistence.jar!/javax/persistence/Table.class
    jar:file:/D:/Develop/Maven_repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar!/javax/persistence/Table.class

It was loaded from the following location:

    file:/D:/Develop/idea_workspace/webgis-datacenter/lib/javax.persistence.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.persistence.Table


Process finished with exit code 1

看错误提示: 发现是两个路径下都有javax.persistence.jar 这个jar包,

jar:file:/D:/Develop/idea_workspace/webgis-datacenter/lib/javax.persistence.jar!/javax/persistence/Table.class
jar:file:/D:/Develop/Maven_repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar!/javax/persistence/Table.class

因此去项目中删除/D:/Develop/idea_workspace/webgis-datacenter/lib/javax.persistence.jar,
保留maven仓库的jar即可

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值