ORA-00604 ORA-12705

35,519

Solution 1

Try following:

  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.

Edit:
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.

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:

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

Solution 2

I figured out that that you could pass that two params to your Java app to resolve the issue:

-Duser.country=en -Duser.language=en

You could configure the values at environment variable level as well (depends from your OS).

Solution 3

I had the same problem. The solution was to add the country and the language to sqldeveloper.conf

Please open the file:

\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf

And add the following:

AddVMOption -Duser.language=en
AddVMOption -Duser.region=us

The above does the trick.

Reference: http://forum.oradba.net/showthread.php?t=423&langid=1

Solution 4

For Windows env, you need to change the System Locale and System Format to English/US.

How to change system locale?

Solution 5

I found solution, I just change the regional and language in my OS (windows 7), make sure it matches with the oracle regional and language.

Share:
35,519
cedric
Author by

cedric

Updated on May 01, 2021

Comments

  • cedric
    cedric about 3 years

    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)
    

    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.

    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

  • cedric
    cedric over 14 years
    Do I have to install an oracle client for my web app to connect? I thought I just need the odbc driver jar included in my project.
  • nikita
    nikita over 6 years
    Worked for me. But that is rocket science... I mean how would I guess it...
  • Maciej S.
    Maciej S. over 5 years
    you should provide more info about this variable: where to find it? what does it really do? etc.
  • Toparvion
    Toparvion about 4 years
    Thank you for this answer! In my case it was System.setProperty("oracle.jdbc.territoryMap", "ru=RUSSIA;RU=CIS"); assignment that solved the problem (for the old Oracle9i).
  • Joe Mwa
    Joe Mwa over 3 years
    You're the governor lol, 2 hours later thank you so much!
  • Burhan Ul Haqq Zahir
    Burhan Ul Haqq Zahir over 3 years
    You saved my day.