-->
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: resource: /auksjonsServer/Bruker.hbm.xml not found
PostPosted: Mon Feb 26, 2007 8:23 am 
Newbie

Joined: Mon Feb 26, 2007 8:13 am
Posts: 1
We have encountered a problem during the schema export of our auction project. We have tried with different combinations of directories for the mapping files and the config file but we seem to get this error every time.

Error:
Build.xml:21: Schema text failed: resource: /auksjonsServer/Bruker.hbm.xml not found


Build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="BookShop" default="schemaexport">
<property name="build.dir" value="bin" />
<property name="hibernate.home" value="C:\hibernate\hibernate-3.2" />
<property name="mysql.home" value="C:\jdbc\mysql-connector-java-5.0.4" />
<path id="hibernate-classpath">
<fileset dir="${hibernate.home}">
<include name="**\*.jar" />
</fileset>
<fileset dir="${mysql.home}">
<include name="*.jar" />
</fileset>
<pathelement path="${build.dir}" />
</path>
<!-- Defining Ant targets -->
<target name="schemaexport">
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="hibernate-classpath" />
<schemaexport config="auksjonsServer/hibernate.cfg.xml"
output="auksjonsSystem.sql" />
</target>
</project>


hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost/auksjonssystem</property>
<property name="connection.username">root</property>
<property name="connection.password">1234</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<mapping resource="auksjonsServer/Bruker.hbm.xml" />
<mapping resource="auksjonsServer/Bud.hbm.xml" />
<mapping resource="auksjonsServer/Sjekker.hbm.xml" />
<mapping resource="auksjonsServer/Ting.hbm.xml" />
<mapping resource="auksjonsServer/AuksjonsSystem.hbm.xml" />
</session-factory>
</hibernate-configuration>


Console:

Buildfile: F:\bachelor\workspace\AuksjonsSystemJava\Build.xml
schemaexport:
[schemaexport] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[schemaexport] log4j:WARN Please initialize the log4j system properly.

BUILD FAILED
F:\bachelor\workspace\AuksjonsSystemJava\Build.xml:21: Schema text failed: resource: /auksjonsServer/Bruker.hbm.xml not found


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 27, 2007 12:21 am 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Hi,

verify your file path of HBM in hibernate.cfg.xml:

_________________
Dharmendra Pandey


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.