-->
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: [schemareport] mapping files not found
PostPosted: Fri Nov 26, 2004 5:56 am 
Hibernate version: 2.1.6

Hi All,

I've a little problem using schemareport with ANT :

Error : csc.foo.bean.Employee.hbm.xml not found

Ant Code :
Code:
  <path id="project.classpath">
    <fileset dir="${project.lib}">
      <include name="*.jar"/>
    </fileset>
    <fileset dir="${tomcat.home}/common/lib">
      <include name="servlet*.jar"/>
    </fileset>
    <pathelement path="${build.dir}"/>
  </path>

   <target name="hibernate.schema.export" description="Generates Hibernate schema" >
    <taskdef name="schemaexport"
               classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
               classpathref="project.classpath" >
    </taskdef>

    <schemaexport output="schema-export.sql"
               config="${build.dir}/hibernate.cfg.xml" >
         <fileset dir="${build.dir}">
            <include name="**/*.hbm.xml"/>
         </fileset>
    </schemaexport>
   </target>


hibernate.cfg.xml
Code:
<!DOCTYPE hibernate-configuration PUBLIC
   "-//Hibernate/Hibernate Configuration DTD//EN"
   "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
   <session-factory>
      <property name="connection.datasource">java:comp/env/jdbc/fostisweb</property>
      <property name="show_sql">false</property>
      <property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>

      <mapping resource="csc.fostis.bean.Employee.hbm.xml"/>
   </session-factory>
</hibernate-configuration>


Directories structure:
src -> sources dir
exploded/WEB-INF/classes -> build dir (hibernate.cfg.xml is also there)

The mapping file Employee.hbm.xml is with the class file Employee.class in package csc.fostis.bean

Can someone help me ?

If you need other info, please ask me.

Thank you very much
NiGhMa


Top
  
 
 Post subject:
PostPosted: Fri Nov 26, 2004 7:11 am 
I think I've found

In my hibernate.cfg.xml I've replaced <mapping resource="csc.fostis.bean.Employee.hbm.xml"/> by <mapping resource="csc/fostis/bean/Employee.hbm.xml"/> and now that works.


Top
  
 
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.