-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hbm2ddl generate an empty ddl file
PostPosted: Mon Jul 16, 2007 11:18 am 
Newbie

Joined: Thu Nov 30, 2006 12:21 pm
Posts: 14
Hello,
I try to use Hibernate Tools with jpa configuration in my project to get the sql code , everything work good and the ant task run ok but the ddl file generated was empty

Hibernate version:3.2.0

this is my ant build file :


Code:
<?xml version="1.0"?>
<project name="decheterie" default="hbm2ddl" basedir=".">
   <property name="lib" value="./../target/decheterie-0.0.1/WEB-INF/lib" />
   <path id="toolslib">
       <path location="${lib}/hibernate-tools-3.2.0.beta8.jar" />
       <path location="${lib}/hibernate-3.2.0.cr4.jar" />
       <path location="${lib}/freemarker-2.3.8.jar" />
       <path location="${lib}/jtds-1.2.jar" />
      <path location="${lib}/commons-logging-1.1.jar" />
      <path location="${lib}/dom4j-1.6.1.jar" />
   </path>
   <path id="jpatoolslib">
      <path refid="toolslib"/>
      <path location="${lib}/hibernate-annotations-3.2.1.ga.jar" />
       <path location="${lib}/persistence-api-1.0.jar" />
       <path location="${lib}/hibernate-entitymanager-3.2.1.ga.jar" />
       <path location="${lib}/jboss-archive-browsing-5.0.0alpha-200607201-119.jar" />
       <path location="${lib}/javassist-3.3.ga.jar" />
   </path>
   <!--
   <taskdef name="hibernatetool"
         classname="org.hibernate.tool.ant.HibernateToolTask"
         classpathref="jpatoolslib" />
   -->
   <target name="hbm2ddl" description="export the schema DDL to file" >
      <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" >
         <classpath refid="jpatoolslib" />
      </taskdef>
      <hibernatetool destdir="./../target">
          <jpaconfiguration persistenceunit="dd-web"/>
           <classpath>
              <path location="./../target/decheterie-0.0.1/WEB-INF/classes" />
          </classpath>
          <hbm2ddl export="false" outputfilename="tt.sql" format="true"/>
      </hibernatetool>
   </target>
   
</project>


this is my persistence.xml :
Code:
<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_1_0.xsd"
    version="1.0">
    <persistence-unit name="dd-web" transaction-type="RESOURCE_LOCAL">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <class>com.webtiss.sita.de.model.Operateur</class>
      <properties>
         <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
         <property name="hibernate.hbm2ddl.auto" value="create"/>
         
        <property name="hibernate.connection.url"
          value="jdbc:jtds:sqlserver://localhost:1433/waste;tds=8.0;lastupdatecount=true"/>
        <property name="hibernate.connection.username"
          value="sita1"/>
       <property name="hibernate.connection.password"
          value="8fdKJl3$nlNv3049jsKK"/>
      
      </properties>
   </persistence-unit>
</persistence>



is there any ideas ?


Top
 Profile  
 
 Post subject: Re: hbm2ddl generate an empty ddl file
PostPosted: Wed Aug 11, 2010 7:36 am 
Newbie

Joined: Wed Aug 11, 2010 7:30 am
Posts: 2
Did you resolve this issue? I am using almost exactly the same configuration and receive an empty ddl / sql script.

Regards,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.