-->
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: Newbe... Recource Not found...
PostPosted: Fri Feb 25, 2005 8:37 am 
Newbie

Joined: Tue Feb 22, 2005 9:34 am
Posts: 4
Hi All,
I am trying to schemaexport thru ant build, I have all the mapping files in
org/hibernate/auction/model dir. When i run the build script, it fails at this error.
I have tried placing the mapping files with the configuration file . But still it happens.
PLease lemme know what is the correct order of placing the configuration, mapping and build files.

BUILD FAILED: C:\caveatempt\caveatemptor\build.xml:123: Schema text failed: Resource: org/hibernate/auction/model/User.hbm not found


Thanks
Jan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 25, 2005 9:39 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
Make sure that your mapping files are on your classpath.

If the file is org/hibernate/auction/model/User.hbm

the it needs to be in the org/hibernate/auction/model directory in your classpath i.e.
Code:
root-of-classpath
  |
   -- org
        |
        ---hibernate
            |
            ---auction
                |
                ---model
                    |
                    --- User.hbm


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 25, 2005 10:21 am 
Newbie

Joined: Tue Feb 22, 2005 9:34 am
Posts: 4
WEll i have the mapping files in the required dir, still it throws the same error.
I have all the mapping files at
C:\caveatempt\caveatemptor\src\java\org\hibernate\auction\model

where src\java is the root dir.
My Dir structure

src\java
...org.hibernate.auction.model
user.hbm
Hibernate.cfg.xml


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 25, 2005 10:29 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
Put them in your classes directory

So if you are compiling your java classes to a directory bin,

then you should have a directory:

[projectroot]/bin/org/hibernate/auction/model

Just be careful that you don't delete them when building again.

I prefer to put them in a meta directory and then put this directory on my classpath.


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.