5 Replies Latest reply: Apr 24, 2012 8:35 AM by Carey Brown RSS

    Sybase datasource config: New missing/unsatisfied dependencies

    Gopinath Arumugam Newbie

      Hi All,

       

      I am stuck with this issue for almost 3 days and I had gone through quite a lot of posts regarding this " missing/unsatisfied dependencies " issue.

      And finally I came here for expertise solution.

       

      Hence I post it very briefly by writing down my standalone.xml, module.xml & logs.

       

      standalone.xml:

       

      <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                  <datasources>

       

                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="H2DS" enabled="true">

                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                          <driver>h2</driver>                   

                          <security>

                              <user-name>sa</user-name>

                              <password>sa</password>

                          </security>

                      </datasource>

       

                      <datasource jndi-name="java:jboss/datasources/SybaseDS" pool-name="SybaseDS" enabled="true">

                          <connection-url>

                              jdbc:sybase:Tds:localhost:10553

                          </connection-url>

                          <driver>sybaseDriver</driver>

                          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                          <pool>

                              <min-pool-size>5</min-pool-size>

                              <max-pool-size>100</max-pool-size>

                              <prefill>true</prefill>

                          </pool>

                          <security>

                              <user-name>chomo</user-name>

                              <password>king</password>

                          </security>

                      </datasource>

       

                      <drivers>

                          <driver name="h2" module="com.h2database.h2">

                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                          </driver>

       

                          <driver name="sybaseDriver" module="com.sybaseDS.sybase">

                              <driver-class>com.sybase.jdbc4.jdbc.SybDriver</driver-class>

                              <xa-datasource-class>com.sybase.jdbc4.jdbc.SybDriver</xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

      </subsystem>

       

      modules.xml:

          

           Location:     D:\JBOSS\jboss-as-7.1.0.Beta1b\modules\com\sybaseDS\sybase\main

       

      <module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybase">

        <resources>

          <resource-root path="jconn4.jar"/>

        </resources>

        <dependencies>

          <module name="javax.api"/>

          <module name="javax.transaction.api"/>

          <module name="jboss-as-connector-7.1.0.Beta1b"/>

        </dependencies>

      </module>

       

      jconn4.jar is jdbc4 compliant.

       

      Logs:

       

      21:31:35,273 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      21:31:35,389 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory D:\JBOSS\jboss-as-7.1.0.Beta1b\standalone\deployments

      21:31:35,395 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.sybaseDriver (missing) dependents: [service jboss.data-source.java:jboss/datasources/SybaseDS]

      ..........................

       

      21:07:29,617 INFO  [org.jboss.as.server.deployment] Stopped deployment jboss-annotations-api_1.1_spec-1.0.0.Final.jar in 37ms
      21:07:29,617 INFO  [org.jboss.as.server.deployment] Stopped deployment javax.inject-1.jar in 36ms
      21:07:29,617 INFO  [org.jboss.as.server.deployment] Stopped deployment Helloworld_servelet.jar in 37ms
      21:07:29,633 INFO  [com.arjuna.ats.jbossatx] ARJUNA32014: Stopping transaction recovery manager
      21:07:29,617 INFO  [org.jboss.as.server.deployment] Stopped deployment WebApps.war in 36ms
      21:07:29,633 INFO  [org.jboss.as.server.deployment] Stopped deployment WebAppsEAR.ear in 44ms
      21:07:29,633 INFO  [org.jboss.as.controller] JBAS014774: Service status reportJBAS014776:    Newly corrected services:
            service jboss.jdbc-driver.sybaseDriver (new available)

      21:07:29,633 INFO  [org.jboss.as] JBoss AS 7.1.0.Beta1b "Tesla" stopped in 30ms
      Terminate batch job (Y/N)?

       

       

      Please do reply with your suggestions.

       

      Regards,

      Gopinath.K.A.

        • 1. Re: Sybase datasource config: New missing/unsatisfied dependencies
          Wolf-Dieter Fink Master

          If you start JBoss without standalone.xml changes (only add the module) do you see that the module is started within the log?

          • 2. Re: Sybase datasource config: New missing/unsatisfied dependencies
            Gopinath Arumugam Newbie

            Hi Dieter,

             

            Thanks a lot for your reply. Yes. The module is started.

             

            But right now the problem is solved. I did a minimal changes in standalone.xml which made things work.

            But I dont have logical answers to jboss behavior for not working with the above configuration.

             

            Here I post the standalone.xml, module.xml, server logs and jboss-admin console logs.

             

            standalone.xml:

             

            <?xml version="1.0" encoding="UTF-8"?>

                    <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                        <datasources>

                            <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="H2DS" enabled="true">

                                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                                <driver>h2</driver>

                                <security>

                                     <user-name>sa</user-name>

                                    <password>sa</password>

                                </security>

                            </datasource>

                            <datasource jndi-name="java:jboss/datasources/SybaseDS" pool-name="SybaseDS" enabled="true">

                               <connection-url>

                                    jdbc:sybase:Tds:localhost:10553

                                </connection-url>

                                <driver-class>

                                    com.sybase.jdbc4.jdbc.SybDriver

                                </driver-class>

                                <driver>

                                    sybaseDriver

                                </driver>

                                <transaction-isolation>

                                    TRANSACTION_READ_COMMITTED

                                </transaction-isolation>

                                <pool>

                                    <min-pool-size>

                                        5

                                    </min-pool-size>

                                    <max-pool-size>

                                        100

                                    </max-pool-size>

                                    <prefill>

                                        true

                                    </prefill>

                                </pool>

                                <security>

                                    <user-name>

                                        chomolungma

                                    </user-name>

                                    <password>

                                        expedition

                                    </password>

                                </security>

                            </datasource>

                            <drivers>

                                <driver name="h2" module="com.h2database.h2">

                                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                                </driver>

                               <driver name="sybaseDriver" module="com.sybaseDS.sybaseDriver"/>

                            </drivers>

                        </datasources>

                    </subsystem>

             

            modules.xml:

                

                 Location:     D:\JBOSS\jboss-as-7.1.0.Beta1b\modules\com\sybaseDS\sybase\main

             

            <?xml version="1.0" encoding="UTF-8"?>

            <module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybaseDriver">

              <resources>

                <resource-root path="jconn4.jar"/>

              </resources>

              <dependencies>

                <module name="javax.api"/>

              </dependencies>

            </module>

             

            Logs:

             

            16:52:02,676 INFO  [org.jboss.as.clustering] (ServerService Thread Pool -- 29) JBAS010300: Activating Infinispan subsystem.

            16:52:02,678 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 37) JBAS011910: Activating OSGi Subsystem

            16:52:02,685 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 42) Activating Security Subsystem

            16:52:02,699 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 36) JBAS011800: Activating Naming Subsystem

            16:52:02,701 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activating WebServices Extension

            16:52:02,710 INFO  [org.jboss.as.security] (MSC service thread 1-10) Picketbox version=4.0.6.Beta1

            16:52:02,749 INFO  [org.jboss.as.connector] (MSC service thread 1-15) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.5.Final)

            16:52:02,785 INFO  [org.jboss.as.naming] (MSC service thread 1-15) JBAS011802: Starting Naming Service

            16:52:02,811 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Bound mail session [java:jboss/mail/Default]

             

            16:52:02,860 INFO  [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-3) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\glassfish3\jdk7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Drivers\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\SQL Anywhere 10\win32;C:\Program Files\SQL Anywhere 10\Sybase Central 5.0.0\win32;%JAVA_HOME%\bin;%M2_HOME%\bin;D:\Software\tattletale-1.1.2.Final;;.

             

            16:52:02,890 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

            16:52:02,912 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010404: Deploying non-JDBC-compliant driver class com.sybase.jdbc4.jdbc.SybDriver (version 7.0)

            16:52:02,932 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-10) null null

            16:52:02,996 INFO  [org.jboss.as.remoting] (MSC service thread 1-10) Listening on /127.0.0.1:4447

            16:52:02,996 INFO  [org.jboss.as.remoting] (MSC service thread 1-15) Listening on /127.0.0.1:9999

            16:52:03,013 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080

            16:52:03,238 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-15) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

            16:52:03,247 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-15) JBAS010400: Bound data source [java:jboss/datasources/SybaseDS]

            16:52:03,358 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory D:\JBOSS\jboss-as-7.1.0.Beta1b\standalone\deployments

            16:52:03,360 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found WebApps.war in deployment directory. To trigger deployment create a file called WebApps.war.dodeploy

            16:52:03,362 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found WebAppsEAR.ear in deployment directory. To trigger deployment create a file called WebAppsEAR.ear.dodeploy

             

            16:52:03,380 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.Beta1b "Tesla" started in 1675ms - Started 130 of 192 services (60 services are passive or on-demand)

             

             

            Jboss-admin console:

             

            You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.

            [disconnected /] connect

            [standalone@localhost:9999 /] /subsystem=datasources:read-operation-names

            {

                "outcome" => "success",

                "result" => [

                    "add",

                    "get-installed-driver",

                    "installed-drivers-list",

                    "read-attribute",

                    "read-children-names",

                    "read-children-resources",

                    "read-children-types",

                    "read-operation-description",

                    "read-operation-names",

                    "read-resource",

                    "read-resource-description",

                    "validate-address",

                    "write-attribute"

                ]

            }

             

            [standalone@localhost:9999 /] /subsystem=datasources/data-source=java\:jboss\/datasources\/SybaseDS:read-operation-names

            {

                "outcome" => "success",

                "result" => [

                    "add",

                    "disable",

                    "enable",

                    "flush-all-connection-in-pool",

                    "flush-idle-connection-in-pool",

                    "read-attribute",

                    "read-children-names",

                    "read-children-resources",

                    "read-children-types",

                    "read-operation-description",

                    "read-operation-names",

                    "read-resource",

                    "read-resource-description",

                    "remove",

                    "test-connection-in-pool",

                    "validate-address",

                    "write-attribute"

                ]

            }

             

            [standalone@localhost:9999 /] /subsystem=datasources/data-source=java\:jboss\/datasources\/SybaseDS:test-connection-in-pool

            {

                "outcome" => "success",

                "result" => [true]

            }

             

            [standalone@localhost:9999 /] /subsystem=datasources/data-source=java\:jboss\/datasources\/SybaseDS:validate-address

            {"outcome" => "success"}



            • 3. Re: Sybase datasource config: New missing/unsatisfied dependencies
              Carey Brown Newbie

              Sorry to bring this up again but I'm new to this and I am unable to connect to Sybase using the above example. In straight Java/Jdbc (without Jboss) I can get it to work. Setting up a datasource seems to be my sticking point.

               

              Here's what I have:

               

              08:05:58,357 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service

              thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

              08:05:58,982 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774

              : Service status report

              JBAS014775:    New missing/unsatisfied dependencies:

                    service jboss.jdbc-driver.sybaseDriver (missing) dependents: [service jbos

              s.data-source.java:jboss/datasources/SybaseDS]

               

               

              ...\standalone\configuration\standalone.xml

               

              <subsystem xmlns="urn:jboss:domain:datasources:1.0">

              ...

              <datasources>

                <datasource jndi-name="java:jboss/datasources/SybaseDS" pool-name="SybaseDS" enabled="true">

                  <connection-url>jdbc:sybase:Tds:10.250.5.27:5000</connection-url>

                  <driver-class>com.sybase.jdbc4.jdbc.SybDriver</driver-class>

                  <driver>sybaseDriver</driver>

                  <security>

                    <user-name>sa</user-name>

                    <password>angels</password>

                  </security>

                </datasource>

                <drivers>

                    <driver name="sybaseDriver" module="com.sybaseDS.sybaseDriver"/>

                  </drivers>

                </datasources>

              ...

              </subsystem>

               

               

               

              And

               

              ...com\sybaseDS\sybase\main\module.xml

               

              <module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybaseDriver">

                  <resources>

                      <resource-root path="jconn4.jar"/>

                      <!-- Insert resources here -->

                  </resources>

                  <dependencies>

                      <module name="javax.api"/>

                  </dependencies>

              </module>

              • 4. Re: Sybase datasource config: New missing/unsatisfied dependencies
                Wolf-Dieter Fink Master

                The module name and the directory must match.

                rename the path of the module to sybaseDS/sybaseDriver/main or change the name of the module.

                • 5. Re: Sybase datasource config: New missing/unsatisfied dependencies
                  Carey Brown Newbie

                  Thanks for the input. Greatly appreciated. I also had missed the updating of web.xml and jboss-web.xml and didn't have the datasoure name correctly specified in the Java code.

                   

                  Here's what it looked like when I finally got it to work.

                   

                  Java souce code

                   

                  private static final String DATA_SOURCE_NAME = "java:jboss/datasources/sybaseDS";

                  ...

                  Context ctx = new InitialContext();

                  System.out.println( ctx );

                  DataSource dbSource = (DataSource)ctx.lookup( DATA_SOURCE_NAME );

                  ctx.close();

                   

                   

                  webapp/web/WEB-INF/web.xml

                   

                      <resource-ref>

                          <res-ref-name>jdbc/sybaseDS</res-ref-name>

                          <res-type>javax.sql.DataSource</res-type>

                          <res-auth>Container</res-auth>

                          <res-sharing-scope>Shareable</res-sharing-scope>

                      </resource-ref>

                   

                   

                  webapp/web/WEB-INF/jboss-web.xml

                   

                  <jboss-web>

                      <resource-ref>

                          <res-ref-name>jdbc/sybaseDS</res-ref-name>

                          <jndi-name>java:jboss/datasources/sybaseDS</jndi-name>

                      </resource-ref>

                  </jboss-web>

                   

                   

                  jboss-as-7.1.1.Final\modules\com\sybaseDS\sybase\main\module.xml

                   

                  <module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybase">

                      <resources>

                          <resource-root path="jconn4.jar"/>

                          <!-- Insert resources here -->

                      </resources>

                      <dependencies>

                          <module name="javax.api"/>

                      </dependencies>

                  </module>

                   

                  jboss-as-7.1.1.Final\standalone\configuration\standalone.xml

                   

                  <datasources>

                      <datasource jndi-name="java:jboss/datasources/sybaseDS"

                          pool-name="sybaseDS" enabled="true">

                          <connection-url>jdbc:sybase:Tds:10.250.5.27:5000</connection-url>

                          <driver-class>com.sybase.jdbc4.jdbc.SybDriver</driver-class>

                          <driver>sybaseDriver</driver>

                          <security>

                              <user-name>sa</user-name>

                              <password>angels</password>

                          </security>

                      </datasource>

                      <drivers>

                          <driver name="sybaseDriver" module="com.sybaseDS.sybase"/>

                      </drivers>

                  </datasources>