8 Replies Latest reply on May 5, 2015 12:35 PM by Manish Sharma

    Sybase datasource connection failure

    Manish Sharma Newbie

      Trying to set-up Datasource and conncetion pool in 6.4 version (standalone). Getting following error

       

      "outcome" => "failed",

        "failure-description" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.driver-demander.java:/ARP3_SybDataSource is missing [jboss.jdbc-driver.jconn3_jar]"

       

      Below configuration was done -

      1. Copied filed jconn3.jar in > JBOSSEap\standalone\deployments\jconn3.jar

      2. Restarted Jboss application server

      3. The above file is appearing in Deployment list.

          Available Deployments list.

       

      3. Tried to set the Datasource as follows:

                            Name> MyDatasource

                            JNDI Name > java:/MyJNDI

                             As the driver in jconn3.jar is not appearing in Detected Driver list. I went in Specify Driver

                                  Name > jconn3.jar  (Name of the jar file - registered in step 1)

                                 Driver Class > com.sybase.jdbc3.jdbc.SybDriver

                                  Major version/Minor Version > Left blank.

                                 Connection URL: jdbc:sybase:Tds:hostname:port/dbname

                                 username: xyz

                                 password: abc

       

      On click of Done button it throws above shared error message.

       

      Anyone aware what am i doing wrong here?

      Many thanks in Advance.

        • 1. Re: Sybase datasource connection failure
          Wolf-Dieter Fink Master

          Did you see that the driver is installed within the server.log?

          How your complete datasource definition look like?

          Maybe you try to use it as a module, see this doc https://developer.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a_JDBC_driver_as_a_module

          • 2. Re: Sybase datasource connection failure
            Manish Sharma Newbie

            Using JBoss EAP 6.4.0.GA to connect to Sybase 12.5.

            Connection Jar file -> jconn3.jar

             

            Note: As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar

                 I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.

            --------------------------------------------------------
            1. Created an empty temporary directory.
            2. Create a "META-INF" subdirectory.
            3. Create a "META-INF/services" subdirectory.
            4. Create a "META-INF/services/java.sql.Driver"


            Added text in java.sql.Driver as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1

             

            --------------------------------------------------------


            Using Winrar added the META-INF/services/java.sql.Driver into jconn3.jar file.

            Created a module.xml file in directory [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="jconn3.jar"/>
              </resources>
              <dependencies>
                <module name="javax.api"/>
              </dependencies>
            </module>
            In standalone.xml file added below text
            <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>

             

             

            ----------------------------------------------------------------------------------------------------------------

             

            On restarting the JBOSS in standalone mode it gave below text in logs


            16:27:59,429 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 27) JBAS014612: Operation ("add") failed - address: ([
                ("subsystem" => "datasources"),
                ("jdbc-driver" => "sybaseDriver")
            ]) - failure description: "JBAS010441: Failed to load module for driver [com.sybaseDS.sybaseDriver]"

             

             

            Many thanks in advance for any guidance to resolve above issue. Already spent 2 days but no luck.

             

            Never thought  Datasource set-up wil be so time consuming in JBOSS :-)

            • 3. Re: Sybase datasource connection failure
              Jay SenSharma Master

              You mentioned that you created directory as   [modules\com\sybaseDS\sybase\main]

                          So ideally your module name should be something like following:

               

              <?xml version="1.0" encoding="UTF-8"?>
              <module xmlns="urn:jboss:module:1.1" name="com.sybaseDS.sybase">    <!--   NOT:   com.sybaseDS.sybaseDriver  -->
                <resources>
                  <resource-root path="jconn3.jar"/>
                </resources>
                <dependencies>
                  <module name="javax.api"/>
                </dependencies>
              </module>

               

              Can you try the same to see if it works?

              • 4. Re: Sybase datasource connection failure
                Manish Sharma Newbie

                Now I get the below error

                With above change I got below error

                -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                JBAS014612: Operation ("add") failed - address: ([

                    ("subsystem" => "datasources"),

                    ("jdbc-driver" => "sybaseDriver")

                ]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1 not found

                ------------------------------------------------------------------------------------------------------------------------------------------------

                So I removed the major/minor version number from the java.sql.Driver file as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver

                Now i got below error

                 

                JBAS014612: Operation ("add") failed - address: ([

                    ("subsystem" => "datasources"),

                    ("jdbc-driver" => "sybaseDriver")

                ]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver not found


                As mentioned earlier -  As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar

                    I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.

                 

                How can I be sure about the value to be placed in file  java.sql.Driver file

                 

                Many thanks

                Manish

                • 5. Re: Sybase datasource connection failure
                  Manish Sharma Newbie

                  Now I get the below error

                  With above change I got below error

                  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                  JBAS014612: Operation ("add") failed - address: ([

                      ("subsystem" => "datasources"),

                      ("jdbc-driver" => "sybaseDriver")

                  ]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1 not found

                  ------------------------------------------------------------------------------------------------------------------------------------------------

                  So I removed the major/minor version number from the java.sql.Driver file as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver

                  Now i got below error

                   

                  JBAS014612: Operation ("add") failed - address: ([

                      ("subsystem" => "datasources"),

                      ("jdbc-driver" => "sybaseDriver")

                  ]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver not found


                  As mentioned earlier -  As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar

                      I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.

                   

                  How can I be sure about the value to be placed in file  java.sql.Driver file

                   

                  Many thanks

                  Manish

                  • 6. Re: Sybase datasource connection failure
                    Manish Sharma Newbie

                    Now I get the below error

                    With above change I got below error

                    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                    JBAS014612: Operation ("add") failed - address: ([

                        ("subsystem" => "datasources"),

                        ("jdbc-driver" => "sybaseDriver")

                    ]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver_3_1 not found

                    ------------------------------------------------------------------------------------------------------------------------------------------------

                    So I removed the major/minor version number from the java.sql.Driver file as jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver

                    Now i got below error

                     

                    JBAS014612: Operation ("add") failed - address: ([

                        ("subsystem" => "datasources"),

                        ("jdbc-driver" => "sybaseDriver")

                    ]): java.util.ServiceConfigurationError: java.sql.Driver: Provider jconn3.jarcom.sybase.jdbc3.jdbc.SybDriver not found


                    As mentioned earlier -  As jconn3.jar is not TYPE 4 Compliant took below steps to update Jar

                        I have given the major/minor version 3_1 blindly in java.sql.Driver file mentioned below, any expert advise will help a lot.

                     

                    How can I be sure about the value to be placed in file  java.sql.Driver file

                     

                    Many thanks

                    Manish

                    • 7. Re: Sybase datasource connection failure
                      Wolf-Dieter Fink Master

                      Did you change the datasource to use the module according to the wiki page  Installing_a_JDBC_driver_as_a_module section Defining the DataSource itself?

                       

                      If you have problems you might attach the server configuration and the module.xml