ojdbc14.jar 与ojdbc6.jar的区别
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ojdbc14.jar 与ojdbc6.jar的区别相关的知识,希望对你有一定的参考价值。
参考技术A classes12.jar - for Java 1.2 and 1.3ojdbc14.jar - for Java 1.4 and 1.5
ojdbc5.jar - for Java 1.5
ojdbc6.jar - for Java 1.6本回答被提问者和网友采纳
使用兼容 Oracle 19C 的 ojdbc8.jar 启动 tomcat 时出现警告
【中文标题】使用兼容 Oracle 19C 的 ojdbc8.jar 启动 tomcat 时出现警告【英文标题】:Warning while starting up tomcat with Oracle 19C compatible ojdbc8.jar 【发布时间】:2020-05-19 04:19:21 【问题描述】:我们曾经在 tomcat/lib 中有一个与 Oracle 12C 兼容的 ojdbc8.jar 的环境。 哪个工作正常。
我们正在将 Oracle 升级到 19C 等 JDBC 驱动程序。 我们从:https://www.oracle.com/database/technologies/appdev/jdbc-ucp-19c-downloads.html
下载了新的驱动程序在 tomcat/lib 中只有 ojdbc8.jar,tomcat 会在警告后记录。
WARNING: Failed to scan [file:/C:/ApplicationServers/apache-tomcat-9.0.10/lib/oraclepki.jar] from classloader hierarchy
java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:212)
at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65)
at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:374)
at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:309)
at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:266)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:229)
at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262)
at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:83)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5098)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:209)
... 38 more
Caused by: java.nio.file.NoSuchFileException: C:\ApplicationServers\apache-tomcat-9.0.10\lib\oraclepki.jar
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:194)
at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1222)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:726)
at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:843)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:246)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:176)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
知道没有使用 Oracle 钱包,忽略此警告有多重要?
有没有办法在服务器启动时避免此类警告? 要么 添加 oraclepki.jar(以及随后的其他几个)是唯一的选择吗?
【问题讨论】:
【参考方案1】:刚刚意识到这是由 apache 在 tomcat 9.0.11 中处理的。 他们在跳过列表中添加了 oraclepki.jar。我已使用此版本进行了验证,并且不再记录任何警告。
https://bz.apache.org/bugzilla/show_bug.cgi?id=62560
【讨论】:
以上是关于ojdbc14.jar 与ojdbc6.jar的区别的主要内容,如果未能解决你的问题,请参考以下文章
roracle11g中有nls_charset12.jar吗有的话在哪里? 我的jdk是1.7, 我选的jdbc包是ojdbc6.jar还是ojdbc14
在用jdbc的时候,加载驱动类前为啥要下载ojdbc6.jar包或者ojdbc14.jar包。
maven中引入oracle驱动报错Missing artifact com.oracle:ojdbc14:jar:10.2.0.4.0