2

I use netbeans 8.1. An I try to set up JBoss 7.1.1 on it. My database connection is oracle. But when I run my enterprise app, there is an error on my console like JBAS014775:New missing/unsatisfied dependencies. standalone.xml

 <datasource jta="false" jndi-name="java:/ETOBSORACLEJNDI" pool-name="oracle-thin_GTBDEV1_ETOBSPool" enabled="true" use-ccm="false">
                <connection-url>jdbc:oracle:thin:@***************</connection-url>
                <driver-class>oracle.jdbc.OracleDriver</driver-class>
                <driver>ojdbc7.jar</driver>
                <security>
                    <user-name>ETOBS</user-name>
                    <password>*******</password>
                </security>

  </datasource>

module.xml

<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc">
<resources>
    <resource-root path="ojdbc7.jar"/>
</resources>
<dependencies>
    <module name="javax.api"/>
    <module name="javax.transaction.api"/>
    <module name="javax.servlet.api" optional="true"/>

any suggestion?

aysegulP
  • 443
  • 3
  • 6
  • 18

2 Answers2

1

module.xml

<module xmlns="urn:jboss:module:1.1" name="com.oracle.jdbc">
      <resources>
        <resource-root path="ojdbc7.jar"/>
      </resources>
      <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
      </dependencies>
    </module>

standalone(-).xml or domain(-).xml to configure a datasource that references this module:

<subsystem xmlns="urn:jboss:domain:datasources:1.2">
        <datasources>
          <datasource jndi-name="java:jboss/datasources/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true">
            <connection-url>jdbc:oracle:thin:@myhostname:1521:oracle</connection-url>
            <driver>oracle</driver>
            <pool>
              <min-pool-size>10</min-pool-size>
              <max-pool-size>20</max-pool-size>
              <prefill>true</prefill>
            </pool>
            <security>
              <user-name>myuser</user-name>
              <password>mypass</password>
            </security>
            <validation>
              <validate-on-match>true</validate-on-match>
              <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"></valid-connection-checker>
              <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"></stale-connection-checker>
              <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"></exception-sorter>
            </validation>
          </datasource>
          <drivers>
            <driver name="oracle" module="com.oracle.jdbc">
              <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
            </driver>
          </drivers>
        </datasources>
      </subsystem>
Anup Dey
  • 876
  • 5
  • 6
0

Follow the below step by step procedure:

  • Install a JDBC driver as a core module

Create a directory under $JBOSS_HOME/modules. In this example: "$JBOSS_HOME/modules/com/oracle/jdbc/main". Put the the JDBC driver jar (ojdbc7.jar) in this directory

  • Create a module configuration file module.xml:

  • Note that the jdbc driver jar must contain a META-INF/services/java.sql.Driver text file that specifies the jdbc Driver, otherwise the Java service provider mechanism used to load the driver will not work. From the main/common vendors only Informix does not have this out of the box.

  • Configure a datasource setting in standalone.xml or domain.xml.

  • You can now edit your standalone(-).xml or domain(-).xml to configure a datasource that references this module:

    jdbc:oracle:thin:@myhostname:1521:oracle oracle 10 20 true myuser mypass true oracle.jdbc.xa.client.OracleXADataSource

  • Any JDBC 4 compliant driver will automatically be recognized and installed into the system by name and version by Java service provider mechanism. Such JDBC 4 compliant driver have a text file named META-INF/services/java.sql.Driver, which contains the name of the class(es) of the JDBC Drivers, in that JAR. However, non JDBC 4 compliant driver JAR does not contain such META-INF/services/java.sql.Driver file. So it needs some modification to be made deployable. Use ojdbc7.jar when using Java 1.7 .

Try this if you have any issue attach server.log file.

Anup Dey
  • 876
  • 5
  • 6