主题 : com.jeecms.common.configuration.ContextConfig初始化失败
级别: 童生
UID: 137011
积分:17 加为好友
威望: 0 精华: 0
主题:2 回复:5
注册时间:2021-01-07
在线时长:0
1#   发表于:2021-01-07 15:07:45  IP:110.227.*.*
环境为ubuntu 20.04,open jdk11,tomcat 8.5。

无论是自行maven打包还是从本论坛下载的编译后的包,都报错:

2021-01-07 14:48:19.140 [localhost-startStop-1] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jeecms.common.configuration.ContextConfig': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister 
2021-01-07 14:48:19.140 [localhost-startStop-1] INFO  com.zaxxer.hikari.HikariDataSource - HikariCP - Shutdown initiated... 
2021-01-07 14:48:19.146 [localhost-startStop-1] INFO  com.zaxxer.hikari.HikariDataSource - HikariCP - Shutdown completed. 
2021-01-07 14:48:19.159 [localhost-startStop-1] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 
2021-01-07 14:48:19.164 [localhost-startStop-1] ERROR org.springframework.boot.SpringApplication - Application run failed 
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.jeecms.common.configuration.ContextConfig': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5144)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1858)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
级别: 童生
UID: 137011
积分:17 加为好友
威望: 0 精华: 0
主题:2 回复:5
注册时间:2021-01-07
在线时长:0
2#   发表于:2021-01-07 18:37:06  IP:110.227.*.*
貌似是jre版本问题,我改成1.8没报了。
级别: 管理员
UID: 136269
积分:8356 加为好友
威望: 0 精华: 0
主题:0 回复:6382
注册时间:2020-10-26
在线时长:0
3#   发表于:2021-01-08 08:44:41  IP:111.201.*.*
回复第2楼
不是享乐,也不是受苦;而是行动,在每个明天,我们命定的目标和道路,都要比今天前进一步。
1 共1页