4 Replies Latest reply on Jul 30, 2015 5:41 PM by jaikiran

    datasource sybase not starting

    bvercoutere

      Hi !


      When starting JBoss with a sybase datasource, I had always the error :

       

         JBAS014775: new dépendancies missing/not complete fill :

         Dépendancies services jboss.jdbc-driver.sybase (missing) : [service jboss.data-source.java:jboss/datasources/SybaseDB, service jboss.driver-demander.java:jboss/datasources/SybaseDB]

       

      I'm using jboss-as-7.4.0.Final

       

      Thanks for tour help.

       

      File : module.xml

       

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

      <module

        xmlns="urn:jboss:module:1.0"

        name="com.sybase">

        <resources>

          <resource-root path="jconn3-6.0.jar" />

        </resources>

        <dependencies>

          <module name="javax.api"/>

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

        </dependencies>

      </module>

       

      File : persistence.xml

       


      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://java.sun.com/xml/ns/persistence"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
      version="2.0">

      <persistence-unit name="tpm-dao" transaction-type="JTA">
           <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <jta-data-source>java:jboss/datasources/SybaseDB</jta-data-source>

      ....
        <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
        <validation-mode>CALLBACK</validation-mode>

           <properties>
             <property name="hibernate.ejb.cfgfile" value="hibernate/tpm-dao.cfg.xml" />
           </properties>   
      </persistence-unit>
      </persistence>

       

      File : standalone.xml

       

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

                  <datasources>

              <datasource jndi-name="java:jboss/datasources/SybaseDB" pool-name="SybaseDB" enabled="true" use-java-context="true" jta="true">

              <connection-url>jdbc:sybase:Tds:localhost:6501/Dtpm?useUnicode=true&amp;cacheResultSetMetadata=true</connection-url>

                          <driver>sybase</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>

                          <driver-class>

                              com.sybase.jdbc3.jdbc.SybDriver

                          </driver-class>                                     

              <security>

                 <user-name>tpm</user-name>

                 <password>tpmpwd</password>

              </security>

              <validation>

                 <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseValidConnectionChecker"></valid-connection-checker>

                 <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseExceptionSorter"></exception-sorter>

              </validation>      

             </datasource>

                      <drivers>

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

                 <datasource-class>com.sybase.jdbc3.jdbc.SybDataSource</datasource-class>

                 <xa-datasource-class>com.sybase.jdbc3.jdbc.SybXADataSource</xa-datasource-class>

              </driver>

                      </drivers>

                  </datasources>

              </subsystem>

       

      File : jboss-deployment-structure.xml


      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">

        <deployment>
          <dependencies>
             <module name="com.sybase"/>
          </dependencies>
        </deployment> 
      </jboss-deployment-structure>

       

        • 1. Re: datasource sybase not starting
          jaikiran

          Where exactly is the module.xml of the Sybase driver placed and what are the contents of that folder?

          • 2. Re: datasource sybase not starting
            bvercoutere

            Hi,

             

            Bekow, the content of file : module.xml

             

             

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

            <module

              xmlns="urn:jboss:module:1.0"

              name="com.sybase">

              <resources>

                <resource-root path="jconn3-6.0.jar" />

              </resources>

              <dependencies>

                <module name="javax.api"/>

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

              </dependencies>

            </module>

             


            Répertoire de C:\bvercoutere\s243790\workspaceKepler-M-TPM-Tools\tpm-merchant-rs-parent\tpm-merchant-rs-jboss\jboss\modules\com\sybase\main

            18/07/2015  13:24    <REP>          .
            18/07/2015  13:24    <REP>          ..
            18/07/2015  13:24           465,869 jconn3-6.0.jar
            18/07/2015  13:28               290 module.xml
                           2 fichier(s)          466,159 octets
                           2 Rép(s)  61,315,284,992 octets libres

             

            Thanks for your help.

            • 3. Re: datasource sybase not starting
              bvercoutere

              Hi,

               

              On WINDOWS, I try with jconn4, it was OK.now.

               

              But on UNIX, I have the same problem.

              • 4. Re: datasource sybase not starting
                jaikiran

                Do you mean the jconn4 version that was working on Windows doesn't work on *nix? By the way, for the other issue, that you originally ran into, are you sure jconn-3-6.0.jar is a JDBC 4 compliant driver jar?