0 Replies Latest reply on Mar 24, 2010 8:52 PM by sharath karnati

    Configuring 'persistence.xml' file for Sybase database.

    sharath karnati Newbie

      Hi All,

        I'm new to Seam framework and trying my first example with below link


        This example is working fine but I'd like to change persistence to sybase rather than jboss DefaultDS.

        Please find modified 'persistence.xml' file as below

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://java.sun.com/xml/ns/persistence" 
                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
         <persistence-unit name="userDatabase">
            <!-- <jta-data-source>java:/MyApp</jta-data-source> -->
                       <property name="hibernate.dialect" value="org.hibernate.dialect.SybaseDialect"/>
               <property name="hibernate.connection.driver_class" value="com.sybase.jdbc3.jdbc.SybDriver"/>
               <property name="hibernate.connection.username" value="test"/>
               <property name="hibernate.connection.password" value="temp123"/>
               <property name="hibernate.connection.url" value="jdbc:sybase:Tds:testDB.org:2222/trial"/>
               <property name="hibernate.hbm2ddl.auto" value="update"/>

        After making this change and deploying register example on Tomcat 6.o throwing below error message

      * CONTEXTS IN ERROR: Name -> Error
      <UNKNOWN> -> ** UNRESOLVED Demands 'persistence.units:jar=jboss-seam-registratio
      n.jar,unitName=userDatabase **
      persistence.units:jar=jboss-seam-registration.jar,unitName=userDatabase -> java.
      lang.RuntimeException: Specification violation [EJB3 JPA] - You have not
       defined a jta-data-source for a JTA enabled persistence context named: userData

        As per this error it is expecting 'jta-data-source', I don't know what to provide for this parameter.

        Can anyone please let me know, how to resolve this error. I'm deploying application on Tomcat 6.0 and I don't have any datasource configuration on this server...

        Thanks in advance.