开发者

Problems connecting to Oracle database from Java classes (ocijdbc11.dll)

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:\t开发者_JAVA技巧ools\oracle\ocijdbc11.dll: %1 is not a valid Win32 application.

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


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜