ojdbc14.jar 出现 UnsatisifiedLinkError

发布于 2024-07-19 06:05:52 字数 1348 浏览 5 评论 0原文

我正在尝试运行一些连接到 Oracle 数据库的 JUnit 测试以及是否进行连接尝试。 抛出以下错误:

oracle/jdbc/driver/T2CConnection.t2cGetCharSet([CI[CI[CII[SLoracle/jdbc/driver/GetCharSetError;)S
at oracle.jdbc.driver.T2CConnection.getCharSetIds(T2CConnection.java:2801)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:300)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:344)
at oracle.jdbc.driver.T2CConnection.(T2CConnection.java:136)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:79)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:194)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:109)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:59)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:414)
at oracle.jdbc.pool.OracleConnectionCacheImpl.setMinLimit(OracleConnectionCacheImpl.java:739)

以前有人遇到过此错误吗?

直到最近我才遇到这个错误。 但是,在运行相同 JUnit 并使用相同 ojbdc14.jar 文件的同事计算机上不会发生此错误。 所以某种环境问题应该是造成这种情况的原因。

你能帮我吗?

I am trying to run some JUnit tests that connect to an Oracle database and whether a connection attempt is made. The following error is thrown:

oracle/jdbc/driver/T2CConnection.t2cGetCharSet([CI[CI[CII[SLoracle/jdbc/driver/GetCharSetError;)S
at oracle.jdbc.driver.T2CConnection.getCharSetIds(T2CConnection.java:2801)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:300)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:344)
at oracle.jdbc.driver.T2CConnection.(T2CConnection.java:136)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:79)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:194)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:109)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:59)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:414)
at oracle.jdbc.pool.OracleConnectionCacheImpl.setMinLimit(OracleConnectionCacheImpl.java:739)

Has anyone had this error before?

I never used to get this error until recently. However, this error does not occur on a colleague's computer running the same JUnit and using the same ojbdc14.jar file. So some sort of environmental issue should be causing this.

Can you help?

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

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

发布评论

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

评论(4

眼中杀气 2024-07-26 06:05:52

我在Webesphere环境中使用oci dirver时遇到了同样的错误,这是由于jar ojdbc14.jar的版本不匹配,ORACLE_HOME/jdbc/lib中的jar和管理控制台中定义的JDBCProvider类路径中的jar不同。

I got the same error in Webesphere environment when using oci dirver, it was due to version mismatch of jar ojdbc14.jar, jar from ORACLE_HOME/jdbc/lib and the the jar in the classpath of JDBCProvider defined in admin console were diffrent.

人间☆小暴躁 2024-07-26 06:05:52

你安装了Oracle客户端吗? 我认为您正在使用“oci”而不是纯java驱动程序,这需要客户端安装来获取本机共享库。

Do you have the Oracle client installed? I think you are using the "oci" instead of pure java drivers which would require the client install to pick up the native shared libs.

倒带 2024-07-26 06:05:52

确保您有 -Djava.library.path=\bin 作为运行时的参数

Make sure you have -Djava.library.path=<your-oracle-home>\bin as a parameter to the runtime

话少心凉 2024-07-26 06:05:52

在我看来,您打算使用 JDBC Type 2 驱动程序(胖客户端),该驱动程序需要在您的机器上安装 Oracle 客户端库。 或者如果可能的话,只需更改 URL 即可切换到瘦驱动程序。

It seems to me that you are intending to use JDBC Type 2 driver (thick client) that require Oracle client library to be installed on your box. Or switch to thin driver if possible by simply changing the URL.

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