-->
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.  [ 6 posts ] 
Author Message
 Post subject: How to use SchemaExportTask without connected to internet
PostPosted: Sat Jun 04, 2005 1:02 pm 
Newbie

Joined: Sat Jun 04, 2005 12:53 pm
Posts: 6
My Problem is when my computer is not connected to internet, i cannot use schemaexport to db. Is that any way to use it without internet connection. Thanks.[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 05, 2005 2:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
It works fine on my computer without connection.

Are you sure you are using the right hibernate jar with the right dtd ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 09, 2005 1:25 am 
Newbie

Joined: Sat Jun 04, 2005 12:53 pm
Posts: 6
Please tell me what's wrong with my setting. I Still cannot export schema without internet.

I'm using ant task to do schema export, here is my code :

<target name="schemaexport" depends="init">

<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="schema.lib.path"/>
<schemaexport
config="${build.java.dir}/hibernate.cfg.xml"
output="${build.dir}/schema-export.sql">

</schemaexport>
</target>


and hibernate.cfg.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<!-- Generated file - Do not edit! -->

<hibernate-configuration>

<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory>

<!-- properties -->
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="connection.username">root</property>
<property name="connection.password">root123</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/moe</property>

<!-- mapping files -->
<mapping resource="edu/fpd/model/user/common/ContactInfo.hbm.xml"/>
<mapping resource="edu/fpd/model/user/common/Role.hbm.xml"/>
<mapping resource="edu/fpd/model/user/common/Privilege.hbm.xml"/>
<mapping resource="edu/fpd/model/user/common/Group.hbm.xml"/>
<mapping resource="edu/fpd/model/user/common/User.hbm.xml"/>
<mapping resource="edu/fpd/model/news/common/News.hbm.xml"/>
<mapping resource="edu/fpd/model/news/common/Attachment.hbm.xml"/>
<mapping resource="edu/fpd/model/user/common/Resource.hbm.xml"/>
</session-factory>

</hibernate-configuration>

I'm using lib :
hibernate3.jar
hibernate2.jar


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 09, 2005 1:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
look at your DTD reference! Why does it say hibernate 2 when you are using hibernate 3 ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 09, 2005 1:36 am 
Newbie

Joined: Sat Jun 04, 2005 12:53 pm
Posts: 6
You are right. I change the version to 3.0 and it works.
Thank u very much.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2005 11:56 am 
Newbie

Joined: Sat Jun 04, 2005 12:53 pm
Posts: 6
pharaoh_59 wrote:
You are right. I change the version to 3.0 and it works.
Thank u very much..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.