简体   繁体   English

Oracle 19c 与 jdk7 的兼容性

[英]Oracle 19c compatibility with jdk7

I would like to know if oracle 19c is compatible with jdk 7.我想知道 oracle 19c 是否与 jdk 7 兼容。

I have found out 2 drivers for oracle 19c我找到了 2 个 oracle 19c 的驱动程序

  • ojdbc8 : for jdk8, jdk9 and jdk11 ojdbc8 :用于 jdk8、jdk9 和 jdk11
  • ojdbc10 : for jdk10 and jdk11 ojdbc10 :用于 jdk10 和 jdk11

I would like to know if there is a way to have oracle 19c with a jdk7, and if yes what is the driver that will allow to do it ?我想知道是否有办法让 oracle 19c 和 jdk7 一起使用,如果是的话,什么是允许这样做的驱动程序?

According to the Oracle JDBC FAQ (Question "What are the Oracle JDBC releases Vs JDK versions?"), only the Java versions you listed (Java 8 to 11) are supported for Oracle 19c.根据Oracle JDBC FAQ (问题“Oracle JDBC 版本与 JDK 版本是什么?”),Oracle 19c 仅支持您列出的 Java 版本(Java 8 到 11)。

  • I expect that support for later Java versions will be added in the future.我希望将来会添加对更高版本的 Java 的支持。
  • Java 9 and Java 10 were short-life releases, and are both end-of-life. Java 9 和 Java 10 是生命周期较短的版本,并且都是生命周期结束的版本。

As a comment notes, Java 7 has been "end of life" since April 2015. It would be counter-productive for Oracle to encourage continued use of Java 7 by supporting it with new JDBC drivers for new Oracle database releases.正如评论所指出的,Java 7 自 2015 年 4 月以来一直“生命终结”。如果 Oracle 通过为新的 Oracle 数据库版本提供新的 JDBC 驱动程序来支持 Java 7 来鼓励继续使用 Java 7,这将适得其反。

Note that the Oracle drivers are proprietary and source code is not available.请注意,Oracle 驱动程序是专有的,源代码不可用。 So back-porting one of the Oracle 19c compatible drivers to Java 7 is not an option.因此,将 Oracle 19c 兼容驱动程序之一反向移植到 Java 7 不是一种选择。

You may be able to identify a 3rd-party vendor who will provide (probably sell) you a driver that works.您可能能够确定一个第三方供应商,他们将为您提供(可能出售)一个有效的驱动程序。 The best I could come up with is this old page that lists vendors:我能想到的最好的办法是列出供应商的页面:


In summary : If you want to use Oracle 19c with Oracle supported drivers, upgrading to Java 8 LTS or later is the only feasible solution.总结:如果您想将 Oracle 19c 与 Oracle 支持的驱动程序一起使用,升级到 Java 8 LTS或更高版本是唯一可行的解​​决方案。 Upgrading to Java 11 LTS is advisable:建议升级到 Java 11 LTS:

  • Oracle Java 8 LTS free public updates (for commercial users) have ended, and Premium Support is due to end in March 2022; Oracle Java 8 LTS 免费公共更新(面向商业用户)已结束,高级支持将于 2022 年 3 月结束; see the Oracle Java SE Support Roadmap .请参阅Oracle Java SE 支持路线图

  • You can still get free public Java 8 LTS updates from 3rd-party vendors post 2020; 2020 年后,您仍然可以从第三方供应商处获得免费的公共 Java 8 LTS 更新; see Java is Still Free for all of the details.有关所有详细信息,请参阅Java 仍然免费

I can confirm the the ojdbc7.jar running on a JDK 7 will work connecting to an Oracle 19C server.我可以确认在JDK 7上运行的ojdbc7.jar可以连接到Oracle 19C服务器。

Looking at the Oracle JDBC FAQ it does not look like this is officially supported, however we have a current client in the process of upgrading their JDK, but we needed to support JDK 7 in the short term.查看 Oracle JDBC FAQ 似乎没有官方支持,但是我们目前有一个客户端正在升级他们的 JDK,但我们需要在短期内支持 JDK 7。

Our Oracle server was an AWS RDS instance, previously running Oracle 12C , but Amazon is no longer supporting this, and we were forced to upgrade to Oracle 19c .我们的 Oracle 服务器是一个 AWS RDS 实例,之前运行的是Oracle 12C ,但亚马逊不再支持这个,我们被迫升级到Oracle 19c

We had some JDK 8 environments (container JBoss 7) which were already using ojdbc7.jar and these were fine.我们有一些 JDK 8 环境(容器 JBoss 7)已经在使用ojdbc7.jar ,这些都很好。 The JDK 7 environment (container JBoss 5.2) were using ojdbc6-11.2.0.1.0.jar and was failing with exception: JDK 7 环境(容器 JBoss 5.2)正在使用ojdbc6-11.2.0.1.0.jar并且失败并出现异常:

Caused by: java.sql.SQLException: ORA-28040: No matching authentication protocol引起:java.sql.SQLException:ORA-28040:没有匹配的身份验证协议

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381) at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:427) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186) at oracle.jdbc.driver.T4CTTIoauthenticate.doOSESSKEY(T4CTTIoauthenticate.java:390) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:356) at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:531) at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:221) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503) at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207在 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439) 在 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388) 在 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381 ) 在 oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436) 在 oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java: 186) 在 oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:356) 在 oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java: 531) 在 oracle.jdbc.driver.T4CConnection.(T4CConnection.java:221) 在 oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) 在 oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java: 503) 在 org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207

After switching from ojdbc6-11.2.0.1.0.jar to: ojdbc7.jar the application functioned normally.ojdbc6-11.2.0.1.0.jar切换到: ojdbc7.jar后,应用程序运行正常。

Just a caveat, I quickly tested our application read/writing to the DB, and these worked as expected, your mileage may vary, as mentioned above this is not officially supported.需要注意的是,我快速测试了我们的应用程序对数据库的读/写,并且这些都按预期工作,您的里程可能会有所不同,如上所述,这不是官方支持的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM