1

I am trying to migrate my project war from Tomcat 6 to JBoss EAP 6.2.0. When trying to deploy the war I am getting the following exception:

16:58:58,493 WARN [org.jboss.as.ee] (MSC service thread 1-4) JBAS011001: Could not resolve resource-env-ref java:/mwdb 16:58:58,568 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) JBAS010403: Deploying JDBC-compliant driver class com.microsoft.sqlserver.jdbc.SQLServerDriver (version 4.0) 16:58:58,787 ERROR [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS015870: Deploy of deployment "csc.war" was rolled back with the following failure message: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.csc.csc.env.jdbc.mwdb is missing [jboss.naming.context.java.jboss.resources.jdbc.mwdb]"]}

I am using MSSQL server as database and following is the configuration in my standalone.xml file.

<datasources>
            <datasource jta="true" jndi-name="java:/mwdb" pool-name="jdbc/mwdb" enabled="true" use-java-context="true" use-ccm="true">
                <connection-url>jdbc:sqlserver://<ServerIP>\\<Instance>:<port>;Database=MWDB</connection-url>
                <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                <driver>sqlserver</driver>
                <pool>
                    <min-pool-size>2</min-pool-size>
                    <max-pool-size>20</max-pool-size>
                    <prefill>true</prefill>
                </pool>
                <security>
                    <user-name>admin</user-name>
                    <password>admin</password>
                </security>
                <validation>
                    <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
                    <validate-on-match>false</validate-on-match>
                    <background-validation>false</background-validation>
                    <use-fast-fail>false</use-fast-fail>
                </validation>
            </datasource>
            <drivers>
                <driver name="sqlserver" module="com.microsoft.sqlserver.jdbc">
                    <datasource-class>com.microsoft.sqlserver.jdbc.SQLServerDataSource</datasource-class>
                </driver>
            </drivers>
        </datasources>

I have placed sqljdbc4.jar and module.xml at jboss-as\modules\com\microsoft\sqlserver\jdbc\main.

My module.xml reads as follows:

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

I have searched a lot about this issue in last two days and tried many things but nothing seems to work.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Yogesh A
  • 11
  • 2

0 Answers0