0

我有一个spring-boot项目。我创建了一个war文件,我将它部署在2个基于linux的tomcat服务器和1个基于windows的tomcat服务器上,该文件成功部署在1个基于linux的服务器和基于windows的服务器上,但在1个失败基于linux的服务器

尝试更改 pom 中的依赖项

下面是 pom.xml 当前使用的片段

 <dependency>
    <groupId>com.github.noraui</groupId>
    <artifactId>ojdbc7</artifactId>
    <version>12.1.0.2</version>
 </dependency>

以前我使用的是以下范围和系统路径

 <groupId>com.oracle</groupId>
 <artifactId>ojdbc</artifactId>
 <version>7</version>
 <scope>system</scope>
 <systemPath>${project.basedir}/lib/oracle/ojdbc/7/ojdbc-7.jar</systemPath>

我仍然收到 java.sql.SQLException: No suitable driver found for jdbc:oracle:thin on 1 个特定的 linux 服务器

请提供建议,如果有的话,从昨天开始就卡住了

来自stacktrace的片段如下

2017-10-18 15:01:29.862 DEBUG 34036 --- [kground-preinit] org.jboss.logging                        : Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
15:01:29.862 [DEBUG] o.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider found via system property
2017-10-18 15:01:42.347  INFO 34036 --- [ost-startStop-1] c.h.instance.DefaultAddressPicker        : [LOCAL] [dev] [3.7] Picked [127.0.0.1]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
15:01:42.347 [INFO ] c.h.i.DefaultAddressPicker - [LOCAL] [dev] [3.7] Picked [127.0.0.1]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
2017-10-18 15:01:42.402  INFO 34036 --- [ost-startStop-1] com.hazelcast.system                     : [127.0.0.1]:5701 [dev] [3.7] Hazelcast 3.7 (20160817 - 1302600) starting at [127.0.0.1]:5701
15:01:42.402 [INFO ] c.h.system - [127.0.0.1]:5701 [dev] [3.7] Hazelcast 3.7 (20160817 - 1302600) starting at [127.0.0.1]:5701
2017-10-18 15:01:42.403  INFO 34036 --- [ost-startStop-1] com.hazelcast.system                     : [127.0.0.1]:5701 [dev] [3.7] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
15:01:42.403 [INFO ] c.h.system - [127.0.0.1]:5701 [dev] [3.7] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
2017-10-18 15:01:42.404  INFO 34036 --- [ost-startStop-1] com.hazelcast.system                     : [127.0.0.1]:5701 [dev] [3.7] Configured Hazelcast Serialization version : 1
15:01:42.404 [INFO ] c.h.system - [127.0.0.1]:5701 [dev] [3.7] Configured Hazelcast Serialization version : 1
2017-10-18 15:01:43.217  INFO 34036 --- [ost-startStop-1] c.h.s.i.o.impl.BackpressureRegulator     : [127.0.0.1]:5701 [dev] [3.7] Backpressure is disabled
15:01:43.217 [INFO ] c.h.s.i.o.i.BackpressureRegulator - [127.0.0.1]:5701 [dev] [3.7] Backpressure is disabled
2017-10-18 15:01:45.730 DEBUG 34036 --- [ost-startStop-1] c.h.internal.cluster.ClusterService      : [127.0.0.1]:5701 [dev] [3.7] Updating members [Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this]
15:01:45.730 [DEBUG] c.h.i.c.ClusterService - [127.0.0.1]:5701 [dev] [3.7] Updating members [Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this]
2017-10-18 15:01:45.731 DEBUG 34036 --- [ost-startStop-1] c.h.i.p.InternalPartitionService         : [127.0.0.1]:5701 [dev] [3.7] Adding Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this
15:01:45.731 [DEBUG] c.h.i.p.InternalPartitionService - [127.0.0.1]:5701 [dev] [3.7] Adding Member [127.0.0.1]:5701 - 9daa0612-f3dc-4eaa-9b29-06e4b11c225a this
2017-10-18 15:01:45.815  INFO 34036 --- [ost-startStop-1] com.hazelcast.core.LifecycleService      : [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTING
15:01:45.815 [INFO ] c.h.c.LifecycleService - [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTING
2017-10-18 15:01:46.387  INFO 34036 --- [ost-startStop-1] c.h.s.i.o.impl.OperationExecutorImpl     : [127.0.0.1]:5701 [dev] [3.7] Starting 4 partition threads
15:01:46.387 [INFO ] c.h.s.i.o.i.OperationExecutorImpl - [127.0.0.1]:5701 [dev] [3.7] Starting 4 partition threads
2017-10-18 15:01:46.391  INFO 34036 --- [ost-startStop-1] c.h.s.i.o.impl.OperationExecutorImpl     : [127.0.0.1]:5701 [dev] [3.7] Starting 3 generic threads (1 dedicated for priority tasks)
15:01:46.391 [INFO ] c.h.s.i.o.i.OperationExecutorImpl - [127.0.0.1]:5701 [dev] [3.7] Starting 3 generic threads (1 dedicated for priority tasks)
2017-10-18 15:01:46.407  INFO 34036 --- [ost-startStop-1] c.h.n.t.n.NonBlockingIOThreadingModel    : [127.0.0.1]:5701 [dev] [3.7] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
15:01:46.407 [INFO ] c.h.n.t.n.NonBlockingIOThreadingModel - [127.0.0.1]:5701 [dev] [3.7] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
2017-10-18 15:01:46.410 DEBUG 34036 --- [ost-startStop-1] c.h.n.t.n.NonBlockingIOThreadingModel    : [127.0.0.1]:5701 [dev] [3.7] IO threads selector mode is SELECT
15:01:46.410 [DEBUG] c.h.n.t.n.NonBlockingIOThreadingModel - [127.0.0.1]:5701 [dev] [3.7] IO threads selector mode is SELECT
2017-10-18 15:01:46.438  WARN 34036 --- [ost-startStop-1] com.hazelcast.instance.Node              : [127.0.0.1]:5701 [dev] [3.7] No join method is enabled! Starting standalone.
15:01:46.438 [WARN ] c.h.i.Node - [127.0.0.1]:5701 [dev] [3.7] No join method is enabled! Starting standalone.
2017-10-18 15:01:46.569  INFO 34036 --- [ost-startStop-1] com.hazelcast.core.LifecycleService      : [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTED
15:01:46.569 [INFO ] c.h.c.LifecycleService - [127.0.0.1]:5701 [dev] [3.7] [127.0.0.1]:5701 is STARTED
profile:dev
property file lookup
2017-10-18 15:01:50.998  WARN 34036 --- [ost-startStop-1] o.a.tomcat.jdbc.pool.PooledConnection    : Not loading a JDBC driver as driverClassName property is null.
15:01:50.998 [WARN ] o.a.t.j.p.PooledConnection - Not loading a JDBC driver as driverClassName property is null.
2017-10-18 15:01:51.025 ERROR 34036 --- [ost-startStop-1] o.a.tomcat.jdbc.pool.ConnectionPool      : Unable to create initial connections of pool.

java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@mumchora65:1821:STAGE
    at java.sql.DriverManager.getConnection(DriverManager.java:689)
    at java.sql.DriverManager.getConnection(DriverManager.java:208)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:308)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:718)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:650)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:468)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
    at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:257)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:231)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:240)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:846)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:873)
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:373)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:362)
    at com.crisil.quantix.config.DatabaseConfiguration.entityManagerFactory(DatabaseConfiguration.java:109)
    at com.crisil.quantix.config.DatabaseConfiguration$$EnhancerBySpringCGLIB$$61a361cf.CGLIB$entityManagerFactory$5(<generated>)
    at com.crisil.quantix.config.DatabaseConfiguration$$EnhancerBySpringCGLIB$$61a361cf$$FastClassBySpringCGLIB$$5775aed4.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
    at com.crisil.quantix.config.DatabaseConfiguration$$EnhancerBySpringCGLIB$$61a361cf.entityManagerFactory(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:589)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:589)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:234)
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:215)
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:91)
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:79)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:241)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:228)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:168)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
    at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
    at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)
    at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

15:01:51.025 [ERROR] o.a.t.j.p.ConnectionPool - Unable to create initial connections of pool.
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@mumchora65:1821:STAGE
    at java.sql.DriverManager.getConnection(DriverManager.java:689)
    at java.sql.DriverManager.getConnection(DriverManager.java:208)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:308)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:718)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:650)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:468)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
    at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:257)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:231)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:240)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:846)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:873)
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
4

3 回答 3

0

检查是否在同一路径中的故障服务器tomcat.home/lib/oracle/ojdbc/7/ojdbc-7.jar /lib 中也找到了此 jar。

如果没有,添加它,重新启动tomcat,看看它是否部署好。

您还可以将依赖项范围更改为编译,如果在其他服务器中找到该 jar,这不是一个好主意。

于 2017-10-18T08:47:46.470 回答
0

如前所述,它是一个 spring-boot 项目。我在 1 台服务器上使用 dev 配置文件运行战争,并在另一台服务器上使用配置文件。

在 application.yml 中配置驱动器后,JDBC 驱动器未在服务器 1 上正确配置,这是根本原因。有效

于 2017-12-02T06:24:20.103 回答
0

我是 com.github.noraui 的共同创建者,此 jar 文件已弃用,请使用此示例:github.com/sgrillon14/MavenSampleOracleJdbc

于 2018-10-04T09:46:12.147 回答