tomcat 启动报错, Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
来源:互联网 发布:网络推广培训学校 编辑:程序博客网 时间:2024/05/29 15:49
在eclipse上启动项目一直正常,但是将项目部署到centos7上时启动失败,查看Tomcat日志如下:
刚开始以为是数据库表字段跟jpa 的entity实体类没有对应上导致,检查一遍发现没问题。
但是后面发现项目部署在本地tomcat上Ok,初步怀疑数据库差异导致,检查centos7上的数据库,centos7的数据库密码不知道被谁给更改了,127.0.0.1没有设置密码,而我在项目上是以127.0.0.1方式访问数据库,且设置了密码,所以报错,后面将密码去掉,重新部署,OK。
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1245)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1895)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroConfig': Unsatisfied dependency expressed through field 'resourceService': Error creating bean with name 'resourceServiceImpl': Unsatisfied dependency expressed through field 'resourceDao': Error creating bean with name 'IResourceDao': Cannot create inner bean '(inner bean)#17cb25af' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#17cb25af': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; 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/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IResourceDao': Cannot create inner bean '(inner bean)#17cb25af' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#17cb25af': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; 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/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceServiceImpl': Unsatisfied dependency expressed through field 'resourceDao': Error creating bean with name 'IResourceDao': Cannot create inner bean '(inner bean)#17cb25af' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#17cb25af': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; 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/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IResourceDao': Cannot create inner bean '(inner bean)#17cb25af' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#17cb25af': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; 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/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
0 0
- tomcat 启动报错, Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- hibernate 报错Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- Hibernate:Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- Unable to create requested service [org.hibernate.engine.spi.CacheImple
- org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine
- org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine
- hibernate异常Unable to create requested service [org.hibernate.engine.spi.CacheImple
- Unable to create requested service [org.hibernate.service.jdbc.connections.spi.ConnectionProvider]
- Unable to create requested service [org.hibernate.service.jdbc.connections.spi.ConnectionProvider]
- Tomcat报异常: java.lang.NoSuchMethodError: org.hibernate.engine.spi.SessionFactoryImplemen
- org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.stat.spi.Sta
- 启动Genymotion,报错Unable to load virtualbox engine
- Genymotion-启动报错Unable to load VirtualBox engine....
- SSH整合时,tomcat启动报错(unable to load class com.mysql.jdbc.Driver)
- Spring4.1+Hibernate4.3报org.hibernate.cache.spi.RegionFactory或org.hibernate.engine.spi.CacheImplement
- String,StringBuffer,StringBuilder的效率区别
- mac版 Intellij IDEA 弹窗报 this license XXXXXXXX has been cancelled
- RecyclerView利用Glide加载大量图片into(Target)导致OOM异常
- hdu 5842 Lweb and String
- Java内部类总结
- tomcat 启动报错, Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- 剑指Offer面试题30最小的K个数(涉及堆或快排)
- 聚集索引和非聚集索引-基础篇(加精)
- leetcode 77. Combinations
- Eclipse在线安装插件的方法
- Codeforces 1B Spreadsheets
- AndroidStudio 导入工程gradle更新太慢的问题
- mysql
- TensorFlow不同版本引起的错误