-->
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.  [ 4 posts ] 
Author Message
 Post subject: using SchemaExport command with -output parameter resulting
PostPosted: Wed Dec 08, 2004 5:42 am 
Newbie

Joined: Tue Nov 30, 2004 4:18 am
Posts: 6
Location: colombo
Hi all,
I tried to run the SchemaExport utility to generate the SQL schema. When I run that using
C:> java net.sf.hibernate.tool.hbm2ddl.SchemaExport Player.hbm.xml Team.hbm.xml

It generated the schema in the data base successfully. However I wanted to get the schema genarete SQL statements to a file. Therefor I tried to use the command with -output option as follows;
C:> java net.sf.hibernate.tool.hbm2ddl.SchemaExport -output="C:\hibernate-2.1\hibernate_introMyschema.sql" Player.hbm.xml Team.hbm.xml

However now I'm getting the followin runtime error. Where have I gone wrong? Thanks in advance.

/ Nalaka


ERROR STACK

SEVERE: Could not configure datastore from file: -output=C:\hibernate-2.1\hibernate_introMyschema.sql
java.net.MalformedURLException: -output=C:\hibernate-2.1\hibernate_introMyschema.sql (The filename, directory name, or volume la
at org.dom4j.io.SAXReader.read(SAXReader.java:221)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
Dec 8, 2004 3:31:48 PM net.sf.hibernate.tool.hbm2ddl.SchemaExport main
SEVERE: Error creating schema
net.sf.hibernate.MappingException: java.net.MalformedURLException: -output=C:\hibernate-2.1\hibernate_introMyschema.sql (The fil
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:176)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
Caused by: java.net.MalformedURLException: -output=C:\hibernate-2.1\hibernate_introMyschema.sql (The filename, directory name, o
at org.dom4j.io.SAXReader.read(SAXReader.java:221)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
... 1 more
net.sf.hibernate.MappingException: java.net.MalformedURLException: -output=C:\hibernate-2.1\hibernate_introMyschema.sql (The fil
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:176)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:289)
Caused by: java.net.MalformedURLException: -output=C:\hibernate-2.1\hibernate_introMyschema.sql (The filename, directory name, o
at org.dom4j.io.SAXReader.read(SAXReader.java:221)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
... 1 more


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 08, 2004 6:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
remove the =

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 08, 2004 6:22 am 
Newbie

Joined: Tue Nov 30, 2004 4:18 am
Posts: 6
Location: colombo
I managed to resolve the issue myself by typing --output rather than -output

i.e it resolved when typed as follows;

> java net.sf.hibernate.tool.hbm2ddl.SchemaExport --output=C:\hibernate-2.1\hibernate_introMy\schema.sql Player.hbm.xml Team.hbm.xml

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 08, 2004 6:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
arh yes - the double -- :)

too tired today

_________________
Max
Don't forget to rate


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