没有ocijdbc9 java .

时间:2023-01-22 09:56:38

When I try to run Java application, I receive the following error:

当我尝试运行Java应用程序时,我收到以下错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path

I don't have a file "ocijdbc9.*" on my PC, but I have "ocijdbc10.dll" in %ORACLE_HOME%\bin.

我没有“ocijdbc9”文件。在我的电脑上,但是我有ocijdbc10。dll”% ORACLE_HOME % \ bin。

%ORACLE_HOME% is correctly specified, so I think the problem is that the application is searching for the wrong version (9 instead of 10).

%ORACLE_HOME%被正确指定,所以我认为问题是应用程序正在搜索错误的版本(9而不是10)。

Both Oracle and Java Builder are freshly installed, so the problem may be in project preferences? Do you have any ideas on how to search for the place where the wrong version is specified?

Oracle和Java Builder都是新安装的,所以问题可能在项目首选项中?对于如何搜索指定错误版本的地方,您有什么想法吗?

4 个解决方案

#1


3  

You're missing a file from your java CLASSPATH.

您从java类路径中丢失了一个文件。

You need to add the OCI jar to your classpath.

您需要将OCI jar添加到类路径中。

For my oracle 10.0.2 install on windows it's located in

我的oracle 10.0.2安装在windows上。

%ORACLE_HOME%\jdbc\lib\ojdbc14.jar

If your application requires ocijdbc9 then you'll have to download it from somewhere and add it to the CLASSPATH. I don't know where to download it from, try the oracle site

如果您的应用程序需要ocijdbc9,那么您必须从某处下载它并将其添加到类路径中。我不知道从哪里下载,试试oracle站点

#2


2  

an additional tip: if you're using oci jdbc urls; it is always better to use the jar library of your oracle client version.

另外一个提示:如果您使用的是oci jdbc url;最好使用oracle客户端版本的jar库。

please check this address for these libraries: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

请检查这些库的地址:http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

for example if your client is Oracle 10.2.0.4, then you'd better use this client's ojdbc14.jar for java >= 1.4 and classes12.jar for java <= 1.3

例如,如果您的客户端是Oracle 10.2.0.4,那么您最好使用这个客户端的ojdbc14。java >= 1.4和classes12的jar。java的jar = 1.3

note that until Oracle 11, jdbc libraries have the same names in every version such as ojdbc14.jar and classes12.jar.

注意,在Oracle 11之前,jdbc库在每个版本(如ojdbc14)中都有相同的名称。jar和classes12.jar。

#3


1  

You need to pass -Djava.library.path=YOUR_ORACLE_HOME\bin to the JRE as a runtime parameter

您需要传递-Djava.library。path=YOUR_ORACLE_HOME\bin到JRE作为运行时参数。

So....

所以....

java [other java switches + runtime parameters] -Djava.library.path=YOUR_ORACLE_HOME\bin run-classname

#4


-1  

I think it is because you have not yet installed Oracle Client. After installing it, maybe it is ok

我认为这是因为您还没有安装Oracle客户端。安装之后,也许可以。

#1


3  

You're missing a file from your java CLASSPATH.

您从java类路径中丢失了一个文件。

You need to add the OCI jar to your classpath.

您需要将OCI jar添加到类路径中。

For my oracle 10.0.2 install on windows it's located in

我的oracle 10.0.2安装在windows上。

%ORACLE_HOME%\jdbc\lib\ojdbc14.jar

If your application requires ocijdbc9 then you'll have to download it from somewhere and add it to the CLASSPATH. I don't know where to download it from, try the oracle site

如果您的应用程序需要ocijdbc9,那么您必须从某处下载它并将其添加到类路径中。我不知道从哪里下载,试试oracle站点

#2


2  

an additional tip: if you're using oci jdbc urls; it is always better to use the jar library of your oracle client version.

另外一个提示:如果您使用的是oci jdbc url;最好使用oracle客户端版本的jar库。

please check this address for these libraries: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

请检查这些库的地址:http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

for example if your client is Oracle 10.2.0.4, then you'd better use this client's ojdbc14.jar for java >= 1.4 and classes12.jar for java <= 1.3

例如,如果您的客户端是Oracle 10.2.0.4,那么您最好使用这个客户端的ojdbc14。java >= 1.4和classes12的jar。java的jar = 1.3

note that until Oracle 11, jdbc libraries have the same names in every version such as ojdbc14.jar and classes12.jar.

注意,在Oracle 11之前,jdbc库在每个版本(如ojdbc14)中都有相同的名称。jar和classes12.jar。

#3


1  

You need to pass -Djava.library.path=YOUR_ORACLE_HOME\bin to the JRE as a runtime parameter

您需要传递-Djava.library。path=YOUR_ORACLE_HOME\bin到JRE作为运行时参数。

So....

所以....

java [other java switches + runtime parameters] -Djava.library.path=YOUR_ORACLE_HOME\bin run-classname

#4


-1  

I think it is because you have not yet installed Oracle Client. After installing it, maybe it is ok

我认为这是因为您还没有安装Oracle客户端。安装之后,也许可以。