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

    datasource sybase not starting

    bernard vercoutere Newbie

      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>