3

I try to create jdbc connection. I use WildFly Application Server
9.0.0.CR1 and oracle 11g. I put ojdbc14 and created module.xml in the folder C:\wildfly-9.0.0.CR1\modules\com\oracle\ojdbc14\main:

<?xml version="1.0" encoding="UTF-8"?> 
<module xmlns=xm lns="urn:jboss:module:1.0"" name="com.oracle.ojdbc14"> 
<resources> 
<resource-root path="ojdbc14.jar"/> 
</resources> 
<dependencies> 
<module name="javax.api"/> 
</dependencies> 
</module>

and inserted to the standalone.xml:

<subsystem xmlns="urn:jboss:domain:datasources:1.0">     
            <datasources>
             <datasource jndi-name="java:jboss/datasources/accounting" pool-name="OracleDS" enabled="true" use-java-context="true"> 
                <connection-url>jdbc:oracle:thin:@cmx-itm-03:1521/COREJAVA</connection-url> 
                <driver-class>oracle.jdbc.OracleDriver</driver-class> 
                <driver>oracle</driver> 
                <security> 
                <user-name>Java_Learning</user-name> 
                <password>Qazxsw123</password> 
                </security> 
            </datasource> 
            <drivers>
                <driver name="oracle" module="com.oracle.ojdbc14"/> 
            </drivers>
            </datasources>
        </subsystem>

So, I got the error when try test connection from console:

Unexpected HTTP response: 500

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

Response

Internal Server Error
{
    "outcome" => "failed",
    "failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0042: failed to match pool. Check JndiName: java:jboss/datasources/accounting",
    "rolled-back" => true
}

I googled it and tried all that I found but still have this error. Please, help me.

Revival
  • 71
  • 1
  • 2
  • 6

2 Answers2

0

This kind of failures are sometimes difficult to fix, because are exceptions from the own server. However check this, check your invalid jndiName in your code.

https://issues.jboss.org/browse/AS7-2199

Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
carlos gil
  • 139
  • 3
  • This problem I resolved by change my jar to ojdbc.jar. But now I got problem when testing connection - Internal Server Error { "outcome" => "failed", "failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0042: failed to match pool. Check JndiName: java:/OracleDS", "rolled-back" => true, "response-headers" => {"process-state" => "reload-required"} } – Revival Jun 30 '15 at 08:09
  • 1
    Try this, check you pool connections. And tell us what happens . Also there can be a lot of reasons to fail... https://developer.jboss.org/thread/257721 – carlos gil Jun 30 '15 at 08:20
-1
  1. I changed ojdbc14.jar to ojdbc6.jar;
  2. Locate module.xml with ojdbc6.jar to wildfly-home\modules\com\oracle\ojdbc\main;
  3. Change max-pool-size from 0 to 70.

So, it works

Revival
  • 71
  • 1
  • 2
  • 6
  • Rather than renaming a Java 1.4 version of the drivers it would be better to obtain the ojdbc6.jar (or preferably odjbc7.jar) from Oracle. – shonky linux user May 10 '16 at 00:54