从 Java 类 (ocijdbc11.dll) 连接到 Oracle 数据库时出现问题

发布于 2024-09-09 06:02:34 字数 418 浏览 1 评论 0原文

我有一些数据库导入和导出 ant 脚本,它们运行一些 Java 程序来导入和导出 Oracle 11g 数据。

这些脚本曾经在 Vista 32 位上运行,但在 Windows 7 64 位上停止运行。我可以使用两个版本的 ocijdbc11.dll。

当我使用 64 位版本时,错误消息为: java.lang.UnsatisfiedLinkError: C:\tools\oracle\ocijdbc11.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform。

当我使用32位版本时,错误消息是:java.lang.UnsatisfiedLinkError: C:\tools\oracle\ocijdbc11.dll: %1不是有效的Win32应用程序。

有谁知道我需要改变什么来解决这个问题?

I have some database import and export ant scripts that run little java programs to import and export data to and from oracle 11g.

The scripts used to work on Vista 32 bit, but stopped working with Windows 7 64 bit. There are two versions of ocijdbc11.dll that I can use.

When I use the 64bit version, the error message is: java.lang.UnsatisfiedLinkError: C:\tools\oracle\ocijdbc11.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform.

When I use the 32bit version, the error message is: java.lang.UnsatisfiedLinkError: C:\tools\oracle\ocijdbc11.dll: %1 is not a valid Win32 application.

Does anyone know what I would need to change to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦屿孤独相伴 2024-09-16 06:02:34

抱歉,我不是 Windows 专家,但我也使用 Windows java 的 11g,但不是使用 oci 驱动程序,而是使用包含瘦驱动程序的 ojdbc14.jar。据我所知,这个驱动程序不需要本机 dll。

jar中的11不是oracle服务器版本,而是要使用的JDK版本。因此 ocijdbc11 是一个 JDK 1.1 兼容的驱动程序。您应该使用 ojdbc14.jar、ojdbc5.jar 或 ojdbc6.jar(ojdbc14.jar 也适用于 Java 6,但 ojdbc6.jar 不适用于 Java 1.4)。

Sorry, I'm not a windows guru, but I also use an 11g from windows java, but not with the oci driver, but the ojdbc14.jar which contains the thin driver. This driver does not need a native dll as I know.

The 11 in the jar is not the oracle server version, but the JDK version to be used with. So the ocijdbc11 is a JDK 1.1 compatible driver. You should use ojdbc14.jar, ojdbc5.jar or ojdbc6.jar (ojdbc14.jar also works with Java 6, but ojdbc6.jar not with Java 1.4).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文