I'm evaluating Jboss, after declined Apache Geronimo.
I've configured a datasource to connect to my oracle database (10g) by the book.
After that, I created a JSP that has this code:
DataSource ds = null;
Connection con = null;
PreparedStatement pr = null;
ic = new InitialContext();
ds = (DataSource)ic.lookup( "java:/OracleDS" );
con = ds.getConnection();
When I execute the same after deployement it returns:
Exception thrown org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified ); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-12705: Cannot access NLS data files or invalid environment specified )) end
For testing porposes, I've added in my datasource:
But still I've got the same error.
My environment is Microsoft XP and my Oracle database NLS_LANG is AMERICAN_AMERICA.WE8MSWIN1252
After re-checking the correct drivers for my database version, and substitute then for the _g version (debug version), I've noticed that orai18n.jar was missing.
Hope to help someone with similar problem. The oracle drivers page is: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html