ORA-12705: Cannot access NLS data files or invalid environment specified

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


import java.util.*;

Locale.setDefault(Locale.ENGLISH); // use this for change NLS
   String URL = "jdbc:oracle:thin:@//"+khost+":"+kport+"/"+kbasename;

DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
   Connection con = DriverManager.getConnection(URL,kuser,kpassword);

What is

NLS_LANG

set to on the machine where you are trying to execute the java program from? If you haven't already, you should first unset NLS_LANG and try that. If that doesn't work, set it to the character set of your specific database and see if that fixes the issue.