- This topic has 2 replies, 3 voices, and was last updated 18 years ago by Haris Peco.
-
AuthorPosts
-
Markus DoeringMemberHello,
I try to connect to a local Oracle XE installation with the My Eclipse Database Explorer and get the following error:
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278) at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:785) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:362) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99) at com.genuitec.eclipse.sqlexplorer.actions.LoginProgress$Login.run(LoginProgress.java:43) at java.lang.Thread.run(Thread.java:595)
The driver configuration includes the following jar:
C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\odbc14.jar
My classname is:
oracle.jdbc.driver.OracleDriver
and I am using this connection url:
jdbc:oracle:thin:@localhost:1521:XE
If I try to login to the database using a small Testclass everything works fine:
package de.tccproducts.test.oracle; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import oracle.jdbc.driver.OracleDriver; class JDBCVersion { public static void main(String args[]) throws SQLException { oracle.jdbc.driver.OracleDriver driver = new OracleDriver(); Connection conn = DriverManager .getConnection("jdbc:oracle:thin:kn/kn@localhost:1521:XE"); DatabaseMetaData meta = conn.getMetaData(); PreparedStatement stmt = conn.prepareStatement("SELECT * FROM DUAL"); ResultSet result = stmt.executeQuery(); while (result.next()) { System.out.println(result.getObject(1)); } System.out.println("Number of columns: " + stmt.getMetaData().getColumnCount()); // gets driver info: System.out.println("JDBC driver version is " + meta.getDriverVersion()); } }
The program gives this output:
X Number of columns: 1 JDBC driver version is 10.2.0.1.0XE
The only special library on the classpath of my test application is the C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\odbc14.jar also used in the driver configuration for the oracle database.
What is the problem with the database explorer, what is it doing different compared to my test application?
The NLS_LANG Parameter in the registry is set to:
GERMAN_GERMANY.WE8MSWIN1252under [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_XE]
I am using SUN JDK 1.5.0_03 on Windows XP SP2 and My Eclipse 20060810-5.0.1-GA connecting to oracle xe 10.2.0.1.0XE.
Any help would be greatly appreciated!
Regards
Jochen
Riyad KallaMemberI have asked someone from the DB team to help you.
Haris PecoMemberJochen,
This is known bug for oracle jdbc 10 and oracle 9 jdbc driver in international environment.
Latest jdbc driver 10.2.0.2 fix this problem.You can download from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.htmlI suppose that your test succeeds, because you use English (or default) locale.
Try add -Duser.language=de -Duser.country=DE – Change ‘de’ and ‘DE” to values which you use for start Eclipse/MyEclipse
and you will got same errorRegards,
Peco -
AuthorPosts