简体   繁体   中英

Error in jboss New missing/unsatisfied dependencies:

Hi I am learning jsf and jboss. I am stuck up at initial stage itself. I am trying to create datasource and connect to jboss server. I am using JBOSS-as-7.1.1 I have made following changes in standalone.xml

<datasource jndi-name="java:jboss/NewOracle" pool-name="NewOracle" enabled="true" use-java-context="true">
    <connection-url>jdbc:oracle:thin:@aaa:bbb</connection-url>
                <driver>ojdbc6</driver>
    <security>
        <user-name>aaaa</user-name>
        <password>bbb</password>
    </security>
</datasource>

<drivers>
<driver name="ojdbc6.jar" module="com.oracle.ojdbc">
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
</driver>
</drivers>

I have created a folder and named it oracle and have placed it in Jboss/modules/com Then i created a subfolder named it main and copied ojdbc6.jar in it I have also created a module.xml file, its content are as follows:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc">

    <resources>
       <resource-root path="ojdbc6.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="javax.servlet.api" optional="true"/>
    </dependencies>
</module>

When I start the server I get the following error: JBAS014775: New missing/unsatisfied dependencies: service jboss.jdbc-driver.ojdbc6 (missing) dependents: [service jboss.data-source.java:jboss/datasources/NewDS, service jboss.data-source.java:jboss/NewOracle]

17:35:27,167 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

The easiest way it to deploy your driver as a jar via the console (Add Deployment, select the jar from your hard drive).

You can then create a new datasource via the console too and select the driver that you have installed in step 1.

ps: unless you have a good reason to be on 7.1.1 you should probably use wildfly 8.xx instead.

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