-->
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: java.net.MalformedURLException when use SchemaExport with -
PostPosted: Wed Dec 08, 2004 6:01 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:21 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  
 
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.