我将在我本丢运行ok的springboot项目打成war包后部署到tomcat后,启动tomcat的时候一直显示:由于之前的错误,Context[/ruoyi]启动失败......,查看tomcat的日志文件发现报错:
12-Aug-2024 10:20:35.183 严重 [main] org.apache.catalina.core.StandardContext.listenerStart 配置应用程序监听器[oracle.ucp.jdbc.UCPServletContextListener]错误
java.lang.NoSuchMethodException: oracle.ucp.jdbc.UCPServletContextListener.<init>()at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:143)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4389)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4914)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1023)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1910)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:824)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
结果是orcale的maven依赖文件缺了一个 UCP 连接池管理库,在pox文件中加入依赖文件就没有报错了。
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ucp</artifactId>
<version>${orcale.version}</version>
</dependency>
配置成一下的样式就可以解决
标签:core,catalina,java,springboot,数据库,HostConfig,报错,apache,org From: https://blog.csdn.net/sunzhihuan/article/details/141132261