MyEclipse

Database Tools (DB Explorer, Hibernate, etc.) - ORA-12705: invalid or unknown NLS parameter value [Closed]

zartc - Nov 17, 2005 - 05:16 PM
Post subject: ORA-12705: invalid or unknown NLS parameter value [Closed]
Hello,

I'm trying to connect to our Oracle 9i (9.2.0) database using the DB Browser.
I have configured the "Oracle Thin Driver" in the preferences.
The driver Librairie tab contains a path to the ojdbc14.jar that I downloaded from OTN.
The Driver Class Name is "oracle.jdbc.OracleDriver" as recommended in the Oracle release note.
The URL used in the Database profile is "jdbc:oracle:thin:@172.17.52.55:1521:BIMAT" which seem correct.
I have set the user name and the password and unchecked the "Prompt for password".


When I try to open a connection I have the following error and I have absolutely no idea what is causing it.

Please can you help me ?
At least indicate me if its a missconfiguration in our Databse server or if I missed a librarie or a properties file or something.

!ENTRY com.genuitec.eclipse.sqlexplorer 4 4 2005-11-17 17:38:59.265
!MESSAGE Error while trying to login to database
!STACK 0
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-12705: invalid or unknown NLS parameter value 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(Unknown Source)
Support-Brian - Nov 17, 2005 - 06:26 PM
Post subject:
Zartc,

Looks like your NLS_LANG value isn't supported as the error message says. Can you try starting eclipse like so and see if it works?

Code:
eclipse -vmargs -Duser.language=en -DNLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M


Note the NLS_LANG environment variable, the rest are our recommended startup arguments for MyEclipse.
There is also a list of supported values here: http://www-rohan.sdsu.edu/doc/oracle/server803/A54632_01/apd.htm

Hope this helps,
Best,
Brian.
csystem - Nov 25, 2005 - 03:39 PM
Post subject:
I had the same problem, and I discover that I have to change my regional settings on Windows XP.
For Windows XP:
To check the system locale: Open the Control Panel. Go to Regional and Language Options. Change language in Regional Options tab and set it to English (UnitedStates).
After that in Help>About Eclipse SDK>Configuration Details I have these settings :
osgi.nl=en_US
user.language=en

Restart Ecplise and try to connect to DB :D
Support-Brian - Nov 25, 2005 - 03:50 PM
Post subject:
csystem,

The solution I mentioned above should work without requiring a change in regional settings.

Still, thank you for following up with your experience, it will help other users yet.

Best,
Brian.
kingho - Nov 30, 2005 - 04:44 AM
Post subject:
Brian,

I am having the same problem. I am using XP with Language in Region and Language Options set to Chinese (Taiwan).

Adding the -DNLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 to the command line did not work for me.

To get it to work, I have to do as csystem said and change the language to English (US).

Best Regards,

King
Support-Brian - Nov 30, 2005 - 06:18 AM
Post subject:
King,

Thank you for following up. Additional question, did you include -Duser.language=en in your command line too? In retrospect, that seems as important as the -DNLS_LANG flag.

Best,
Brian.
kingho - Nov 30, 2005 - 06:38 AM
Post subject:
Brian,

Thanks for your quick reply!!

This is the command line I tried to use but still failed to connect to the oracle database server:

C:\eclipse-3.1\eclipse.exe -DNLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 -vm c:\progra~1\java\jdk15~2.0_0\bin\javaw.exe -vmargs -Duser.language=en -Xms256M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=256M

By the way, I am using MyEclipse 4.03GA and eclipse 3.1.

Thanks!

Best Regards,

King
kingho - Nov 30, 2005 - 06:44 AM
Post subject:
Brian,

I should have mentioned that I have also tried the following and failed:

C:\eclipse-3.1\eclipse.exe -vm c:\progra~1\java\jdk15~2.0_0\bin\javaw.exe -vmargs -Duser.language=en -Xms256M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=256M -DNLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1

That is, moved the -DNLS_LANG to the back of the command line.

Thanks.

King
Support-Brian - Nov 30, 2005 - 06:45 AM
Post subject:
King,

You need to change your command line string to
Code:

C:\eclipse-3.1\eclipse.exe -vm c:\progra~1\java\jdk15~2.0_0\bin\javaw.exe -vmargs -Duser.language=en -DNLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 -Xms256M -Xmx512M -XX:PermSize=128M -XX:MaxPermSize=256M


Since the NLS_LANG variable must got to the JVM, not eclipse, you have to place it after the -vmargs switch.

Best,
Brian.
Support-Brian - Nov 30, 2005 - 06:53 AM
Post subject:
King,

Okay, puttting it at the end will do too.

Are you seeing exactly the same exception as the first poster? Also, can you check what the value of this registry string is \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG.

Best,
Brian.
kingho - Nov 30, 2005 - 07:13 AM
Post subject:
Brian,

Yes, I am seeing the exact exception as the first poster and the error from the .log file is the same.

My registry don't have the \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG set. Actually, it doesn't have \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE as I have not install any oracle software other than the thin client that I am using.

Thanks.

Best Regards,

King
Support-Brian - Nov 30, 2005 - 07:29 AM
Post subject:
King,

Re: Registry string, I didn't realize that would most likely be set only for the machine on which oracle is actually installed. Please ignore.

Are you using the latest Oracle drivers? I was told they improved error reporting, perhaps the exception logged will be a little more descriptive as to what NLS value is being used after all.

If you find anything let us know, otherwise I would suggest you continue with your previous solution (changing the system language to english) and I'll file this issue for investigation and try to replicate the issue locally.

Thank you for following up, I appreciate your patience :)
Best,
Brian.
kingho - Nov 30, 2005 - 07:40 AM
Post subject:
Brian,

The driver that I am using is 10.2.0.1.0, I think is the latest.

To get more output, I think I need to switch to the one with debug enable. I'll see if I can get more information from it.

Thanks!

Best Regards,

King
antoine - Dec 16, 2005 - 11:01 AM
Post subject: Same pb : it wasn't there in 4.0GA
I've got the same pb and this driver (oracle14.jar) used to work in 4.0GA and doesn't work anymore since I'm using 4.1M1 (the same for M2) (cant' remember if it worked in 4.03GA)
I revert to old oracle driver classes12.jar to use db explorer.

Any clue to correct this ?

Thanks
Support-Brian - Dec 16, 2005 - 11:23 AM
Post subject:
Antoine,

Nothing in this area has changed - so it's odd that you see the problem after migrating from GA to 4.1. If it isn't too much trouble, could you reconfirm that it works for you currently in 4.0GA? Perhaps some system settings have changed due to some other software installed?

Did you try either of the suggestions listed in this thread?

Just confirming your statements, please correct me if I'm wrong.
oracle14.jar worked in 4.0GA but not 4.1, but your older driver - classes12.jar works in both. Am I right?

Could you please tell me where you downloaded the driver from - the default name seems to be ojdbc14.jar.

Best,
Brian.
antoine - Dec 16, 2005 - 02:56 PM
Post subject: Problem solved
Brian,


After installing 4.1M2 my command line was :

Code:
C:\eclipse\eclipse.exe -vmargs -Duser.language=en -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -Dosgi.splashLocation="C:\Program Files\MyEclipse\eclipse\MyEclipseSplash.bmp"


As my windows config is in french the JVM was taking en_FR as language code which is obviously unknow (french people are known to be poor english speakers ;-) ).

I looked into my backups and saw that I had a different command line when I was using 4.0.
Changing the command line to
Code:
C:\eclipse\eclipse.exe -vmargs -Duser.language=en_US -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M -Dosgi.splashLocation="C:\Program Files\MyEclipse\eclipse\MyEclipseSplash.bmp"


Make the whole thing work.

It also work with fr_FR but doesn't bring anything except loosy translated french error messages when using the driver.

Thanks for your prompt answer

Antoine
Support-Brian - Dec 16, 2005 - 03:58 PM
Post subject:
Antoine,

That's great. Glad you got it working and thank you for posting your solution for everyone to benefit from.

Best,
Brian.
mhavila - Dec 22, 2005 - 06:40 PM
Post subject: Oracle driver versions
I'm experiencing the same problem, but it is not related only to MyEclipse. In fact, I'm receiving the ORA-12705 error even running JDBC test cases directly on JVM command line (java).
What I've discovered up to now is:

I've tested Oracle JDBC driver versions 8i R3 (8.1.7.1), 9i R2 (9.2.0.5) and 10g R2 (10.2.0.1).
All these are available for download from Oracle TechNet (OTN): otn.oracle.com

(1) Driver 8.1.7.1 (classes12.zip + nls_charset12.zip) worked ok with all tested versions of Oracle Server (7.3.4 to 9.2.0.6, I've not tested on a 10g server), but it lacks some recent features, specially those related to full JDBC 2.0 and 3.0 compatibility. For instance, this version has poor support for LOB features.

(2) Driver 9.2.0.5 (ojdbc14.jar + nls_charset12.jar) worked ok on Oracle server versions 8i and 9i (again, no test with 10g), but there are many incompatibilities and errors with the old 7.3.4, since it's a desupported server version. This driver version has good compatibility with JDBC 2.0 and supports some features of JDBC 3.0.

(3) Driver 10.2.0.1 (ojdbc14.jar + orai18n.jar) do not work with Oracle server 9i on UNIX, although it worked on Windows. Server versions 7 and 8i was not tested, since they are desupported for this version of driver, and I currently have no 10g server to test with. The error, when trying to estabilish a connection, is exactly that reported by others:

Code:
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-12705: invalid or unknown NLS parameter value specified


I've tried many NLS configuration options, with no avail.
kingho - Dec 23, 2005 - 06:08 AM
Post subject:
I can confirm that using -Duser.language=en_US will make it works.

Thanks!!!

King
Support-Brian - Dec 23, 2005 - 06:58 AM
Post subject:
Mhavila,

If none of the suggestions already in this thread work for you, I would suggest asking over at the oracle JDBC forum here:
http://forums.oracle.com/forums/forum.jspa?forumID=99&start=0

Best,
Brian.
en - Jan 20, 2006 - 01:43 PM
Post subject: Very strange...
I'm have been struggling with the same problems with the thin driver connecting to an Oracle 8.1.7 on HP-UX from Windows 2000.

And using -Duser.language=en_US solves it for the MyEclipse DB Browser... BUT I still get the error (ORA-12705) in a small java application where I just try to get a connection with exactly the same driver?!? And yes - I do specify -Duser.language=en_US in the launch configuration - I also tried using System.setProperty("user.language", "en_US") directly in my code...

Also - I have tried Oracles Raptor early access release 2 with the same problems...

Then I hoped that I would somehow get some more log/trace messages if I used ojdbc14_g.jar instead of ojdbc14.jar, because Oracles download page states: "...same as ojdbc14.jar, except that classes were compiled with "javac -g" and contain some tracing information...."

So I tried that - and guess what? I get a connection with no problem in MyEclipse DB Browser, my java application and even in Raptor (just put ojdbc14_g.jar in %RAPTOR_HOME%/jdev/lib/patches) and btw now I don't need to specify -Duser.language=en_US.

Slightly confused! But happy... :D

Best regards,
Eyðun
hefter - Apr 19, 2006 - 11:36 AM
Post subject:
Hallo, did you know there are other countries in the world than america??? ;-)

Look at oracles enterprise console (v10....) menu-> object (or so) -> show/edit details -> in first tab (common) -> press button (all initial params ) -> find NLS_TERRITORY and NLS_LANGUAGE

Use these Values in the -DNLS_LANG= string and reues the part last part .WE8ISO8859P1
I also changed the -Duser.language= to my iso language.

Here an example for germany: ( A small country in europe ) ;-)

"C:\Program Files\eclipse3.1.2\eclipse.exe" -vmargs -Duser.language=de -DNLS_LANG=GERMAN_GERMANY.WE8ISO8859P1 -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M

Frank
NickolaIvshin - May 11, 2006 - 08:22 PM
Post subject: How to make it working
After changing ini file try to run Eclipse with -clear parameter in command line. It clears the cashe. It helps. I am sure. :D
antoine - Jun 05, 2006 - 11:28 AM
Post subject: this problem reapers in 5.0M1
Hi,

The NLS errors reappears in 5.0M1. I put the -Duser.language=en_US in command line but the error remains. No problem when going back to 4.1.1 with the same workspace and the same command line.

Any clue ?
antoine - Jun 07, 2006 - 10:29 AM
Post subject: Problem solved
I solved my problem, looking in log I saw that the system was using language=en_US_FR as locale. So I put a language=fr in the command line and the systme now use fr_FR as locale. I guess that this problem only occure for person outside speaking english countries.
Theface - Jun 14, 2006 - 04:41 AM
Post subject:
Don't use param of -Duser.language is best way!
shari - Aug 02, 2006 - 11:15 AM
Post subject:
Hi,
a quick update on this for all interested parties as I had to research into the very same problem and only found partial answers around.
I am not an Oracle representative so whatever I'm saying, you cannot blame Oracle for it, and you should check for yourself if in doubt.

This is a known bug for Oracle with 10.2.x (up to 10.2.0.1) drivers relating to mixing language and locales, e.g. en_DE or en_IT.
Normally you can set user.language and user.country or NLS_LANG with vmargs on the Eclipse command line, but these drivers will not be able to mix a language with a territory using a particular method, which seems to be the method mostly everybody uses today :-)
It is declared as fixed in 10.2.0.2, for en_DE at least according to the metalink db.
There is a patch for Oracle DBMS 10.2.0.2 on Windows available to supported customers, but it is not available as a public download as of today. I just checked and the 10.2.0.2 dist is available for public download for Linux; adventurers might want to try downloading the whole distro to extract the jdbc drivers. Check licenses carefully to understand if it's acceptable - I'm not going to do it so I didn't elaborate.
People with metalink access can monitor entry #4629654 (which is specific to en_DE) and related entries to stay updated.
Currently, the easiest workaround is downgrading to 10.1 drivers, unless you need 10.2 explicitly of course.

Generally speaking, if you routinely update your jdbc drivers only because they become available, well my advice is simply *change habit*, and update only if you need to do it for some specific reason. Bugs are frequently solved and re-introduced, unfortunately. This particular situation is not uncommon at all.

This said, I think MyEclipse should think about introducing support for setting language, locale and character sets option at the connection level for at least "major" databases, as this is a very common issue and for professional developers outside of USA, and it is very common to fight with mixed bags of these settings at the same time, even in the same project. It is inconvenient having to start a different instance of MyEclipse to work with different databases, considering the resources needed by MyEclipse to run smoothly, if the only way to set these parameters is on the command line.
I understand there is no standard way to approach setting this parameters programmatically at connection open time across databases, but we're sure the MyEclipse team can come out with a clever idea to work around this issue :-)

Keep up the good work!
Davide
martin.stransfeldt - Jan 21, 2007 - 06:02 PM
Post subject:
Hi,

I freshly installed MyEclipse 5.1.0 GA and wanted to use the DB Browser to connect to an Oracle 10g XE Univ database schema.
I'm working on an german Windows XP Pro machine.

By default the DB Browser is not able to open the database schema... a popup provides me ORA-12705 error.
I tried out different combinations of command line arguments (in myeclipse shortcut to eclipse.exe):
- specification of "-Duser.language=en" failed (standard after installation)
- specification of "-Duser.language=en_US" failed
- specification of "-Duser.language=en -DNLSLANG=GERMAN_GERMANY.UTF8" failed
- specification of "-Duser.language=en_US -DNLSLANG=GERMAN_GERMANY.UTF8" failed

Leaving those parameters will open the Oracle database schema in DB Browser without an error!!!

So, Theface's post is best tip for me ;-)


Greetings to the MyEclipse Crew - good job!
Martin
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits