ORA-00604 ORA-12705 [英] ORA-00604 ORA-12705

查看:184
本文介绍了ORA-00604 ORA-12705的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在j2ee网络应用程序中遇到此错误。

I am having this error in my j2ee web application.

java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-12705: Cannot access NLS data files or invalid environment specified

 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
 oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:785)
 oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:376)
 oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
 oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
 oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
 oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:839)
 java.sql.DriverManager.getConnection(Unknown Source)
 java.sql.DriverManager.getConnection(Unknown Source)
 org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
 org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
 org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
 org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
 org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
 org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)


 org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
 org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)

这个项目在同事的电脑上工作......我的意思是这个项目适用于他们,但当我要求他们的项目时文件夹并在我的日食中导入它,当我运行我我遇到这个错误。 jar文件已经与项目文件夹打包在一起。

This project works in my colleagues' PCs... I mean this project works for them but when I asked for their project folder and imported it on my eclipse, when i run it i meet this error. The jar files are already packaged with the project folder.

我还使用hibernate创建了一个简单的j2ee项目,但我遇到了同样的错误。
我试图ping数据库服务器并使用PL / SQL开发人员浏览它我没有任何问题

I also created a simple j2ee project using hibernate but I had the same error. I tried to ping the DB server and browse it using PL/SQL developer and I don't have any problem with it

推荐答案

请尝试以下操作:


  1. 检查NLS_LANG设置是否正确。在Windows上,它位于 \HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE 下的注册表中。

  2. 检查是否正确安装了Oracle客户端软件。

  3. 检查该计算机上是否有多个Oracle主目录。在这种情况下,找到活动的并检查它是否有效。

  4. 如果安装了SQL * Plus,请使用SQL * Plus进行测试。 Sql Developer的工作原理是因为它有自己的客户端安装。

  1. Check that NLS_LANG setting is correct. On windows it is in registry under \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE.
  2. Check that Oracle client software is correctly installed.
  3. Check if there are multiple Oracle homes on that computer. In that case, find active one and check if it works.
  4. Test with SQL*Plus if there is one installed. Sql Developer works because it has its own client installation.

编辑


关于驱动程序,请查看此网站: Oracle Instant Client 。在那里,您将找到有关JDBC访问Oracle所需的最低驱动程序安装的文档。我对此并不了解,因为我使用.Net。


Regarding drivers, check this site: Oracle Instant Client. There you will find documentation on minimum drivers installation needed for JDBC access to Oracle. I don't know much about that because I use .Net.

编辑2:

看到这个问题: JDBC瘦驱动程序的NLS_LANG设置。您遇到了同样的错误,问题是未定义NLS LANG的默认语言环境。引用:

Edit 2:
See this question: NLS_LANG setting for JDBC thin driver. There is same error as you have and problem was that default locale for NLS LANG was not defined. Quote:


NLS_LANG设置源自java.util.Locale。因此,在连接之前,您需要进行类似的调用:

The NLS_LANG settings are derived from the java.util.Locale . Therefore, you will need to make a call similar to this before connecting:



  Locale.setDefault(Locale.<your locale here>);

这篇关于ORA-00604 ORA-12705的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆