简体   繁体   中英

Jboss Oracle JDBC connection failed

Jboss EAP 6.3, Oracle 11g Express. I have this oracle datasource in standalone:

                <datasource jta="true" jndi-name="java:/OracleDS" pool-name="OracleDS">
                <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
                <driver>oracleDriver</driver>
                <security>
                    <user-name>Boris</user-name>
                    <password>password</password>
                </security>
            </datasource>
            <drivers>
                <driver name="oracleDriver" module="com.oracle">
                    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
                </driver>
            </drivers>

The Oracle database is running, I can connect to it using sqlplus:

SQL> connect
Enter user-name: Boris
Enter password: 
Connected.

The datasource shows up in the Jboss admin panel. I run a test connection, but it responds with:

Unexpected HTTP response: 500

Request
{
    "address" => [
        ("subsystem" => "datasources"),
        ("data-source" => "OracleDS")
    ],
    "operation" => "test-connection-in-pool"
}

Response

Internal Server Error
{
    "outcome" => "failed",
    "failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
    "rolled-back" => true
}

And in the jboss console I found this:

Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL lev
el 1
ORA-12705: Cannot access NLS data files or invalid environment specified

but the solutions to that error I found on the internet didn't help.

What am I doing wrong?

The ORA-12705 error suggests that this might be a locale issue. You could try starting up JBoss with a locale that is supported by Oracle XE when converted into an NLS. For example, try adding this to your JBoss startup configuration ( JAVA_OPTS variable in jboss-as/bin/run.conf ):

-Duser.language=en -Duser.country=US

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM