-->
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: SchemaExport doesnt work without classes??
PostPosted: Tue Jun 22, 2004 9:54 am 
Newbie

Joined: Wed Jun 09, 2004 5:29 pm
Posts: 15
I've been trying to get the SchemaExport to work, but running the commandline tool is simply impossible for me... It complains about a missing Apache\Files ... Whatever that is.

However, i downloaded the Workshop example to take a look at the Ant way of doing it. And from what it looks like, i have to generate the Test.java class before i can make a SchemaExportTask with the Test.hbm.xml?? This makes no sence, where is the idea of making both of the files, one of them should be sufficient?

I tried to use the Employer example listed on:
http://www.hibernate.org/hib_docs/reference/en/html/example-mappings.html

But it just says the same:

Quote:
D:\PROGRA~1\APACHE~1\RUNWAY~1.0\src>ant topdown.hbm2ddl
Buildfile: build.xml

topdown.hbm2ddl:
[copy] Copying 1 file to D:\PROGRA~1\APACHE~1\RUNWAY~1.0\src\webapp\WEB-INF
\classes
[schemaexport] log4j:WARN No appenders could be found for logger (net.sf.hiberna
te.cfg.Environment).
[schemaexport] log4j:WARN Please initialize the log4j system properly.

BUILD FAILED
D:\PROGRA~1\APACHE~1\RUNWAY~1.0\src\build.xml:114: Schema text failed: persisten
t class not found: Employer

Total time: 2 seconds
D:\PROGRA~1\APACHE~1\RUNWAY~1.0\src>



Any help on this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2004 9:56 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
SchemaExport needs the persistent classes to do its magic.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2004 10:19 am 
Newbie

Joined: Wed Jun 09, 2004 5:29 pm
Posts: 15
Really?

What about the workshop...:

http://www.hibernate.org/hib_docs/online/workshop_toolset/presentation/html/img4.html

It clearly looks like you can just make the XML, generate the schema and then the POJO's...?

And if this cannot be done, is the bottomup approach the most common?

Thanks
/Martin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2004 11:02 am 
Newbie

Joined: Wed Jun 09, 2004 5:29 pm
Posts: 15
I think i figured it out myself. The order of how things are done is wrong in the workshop.

Change step 2<->3...


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.