Data source from Oracle

Can't make connection with Oracle XE from WI.
Got error:
Can't establish connection to database
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.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:406)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
    at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:799)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:368)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)



It seems WI doesn't use environment variables such as NLS_LANG. How can I test it?
By the way other oracle clients (sqlplus, sqldeveloper, my php app that connects to oracle) work ok.

JDBC Driver Class: oracle.jdbc.driver.OracleDriver
Database url: jdbc:oracle:thin:[user/password]@localhost:1521:XE

6 comments
Comment actions Permalink

That's the specifics of Oracle JDBC dirvers. Easiest way is to globally override regional settings for WI by adding to bin/*.vmoptions following lines:
-Duser.language=en
-Duser.country=GB

0
Comment actions Permalink

Thank you very much, connection now succeeded, but queries still aren't executed. I'll play with these parameters further.

0
Comment actions Permalink

Fixed connection and queries executing problem without changing vmoptions by replacing ojdbc driver from here: http://6709.su/node/63
Now there is a little problem:
When I hit "Refresh Tables" in Data Source Properties I got following error
27 of 27 tables were loaded.

The following errors were encountered:

Table: CARDS_SEQ

java.sql.SQLException: ORA-02201: sequence not allowed here

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
    at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:474)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
    at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1451)
    at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3271)

... and etc with all my sequences.

Dunno is it error in WI or in driver, maybe you know about this problem?

0
Comment actions Permalink

No new info yet, we'll investigate further.

0
Comment actions Permalink

Judging from our experience with DB Oracle plugin support and TeamCity Oracle support we strongly don't recommend you to use ANY but official drivers provided by Oracle for your version of Oracle Database. Use system properties with mentioned in my previous reply to fix NLS problem for unsupported (i.e. Russian) locales.

0
Comment actions Permalink

I use IdeaX IU-96.1190 and -Duser.language=en -Duser.country=GB in idea.vmoptions not work for me. JDBC driver class - oracle.jdbc,OracleDriver in ojdbc14.jar (from oficial site)

0

Please sign in to leave a comment.