-->
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: Ant build.xml problem in generating hbm files
PostPosted: Thu Feb 16, 2006 3:40 am 
Newbie

Joined: Wed Jul 21, 2004 7:44 am
Posts: 7
Hibernate version: 3.0

Ant build file:

<project name="test" default="postCompile" basedir=".">
<description>
This ant file is used to generate all the hibernate mapping files required
for testing
</description>
<!-- set global properties for this build -->

<property name="src" location="src" />
<property name="class" location="classes" />
<property name="output" location="${class}" />
<property name="library" location="lib" />

<property name="hibernateMappedClasses" location="${src}/test/beans" />

<target name="init">
<tstamp>
<format property="TODAY" pattern="d-MM-yy" />
</tstamp>

</target>

<target name="postCompile" depends="generateHibernateMappings, updateBuildNumber" />

<target name="updateBuildNumber" depends="init">
<propertyfile file="Configuration.properties">
<entry key="test.version" value="1" type="int" operation="+" />
</propertyfile>
</target>

<target name="generateHibernateMappings" depends="init">
<path id="xdoclet2.task.classpath">
<fileset dir="${library}">
<include name="*.jar" />
</fileset>
</path>

<taskdef name="xdoclet2" classname="org.xdoclet.ant.XDocletTask" classpathref="xdoclet2.task.classpath" />
</target>

<target name="remove" depends="generateHibernateMappings">
<delete>
<fileset dir="${output}">
<include name="**/*.hbm.xml" />
</fileset>
</delete>
</target>

<target name="hibernate" depends="remove">
<xdoclet2>
<!-- defines the file handled by xdoclet2 -->
<fileset dir="${hibernateMappedClasses}">
<include name="**/*.java" />
</fileset>


<component classname="org.xdoclet.plugin.hibernate.HibernateConfigPlugin" destdir="${src}" jdbcdriver="com.mysql.jdbc.Driver" jdbcurl="jdbc:mysql://localhost:3306/crm" jdbcusername="mysql" jdbcpassword="mysql" dialect="org.hibernate.dialect.MySQLDialect" showsql="false" transactionfactory="org.hibernate.transaction.JDBCTransactionFactory" cacheprovider="org.hibernate.cache.HashtableCacheProvider" hbm2ddlauto="update">
</component>


<!-- defines the processing of a plugin -->
<component classname="org.xdoclet.plugin.hibernate.HibernateMappingPlugin" destdir="${output}" version="3.0">
</component>

</xdoclet2>
</target>

</project>


Full stack trace of any exception that occurs:
BUILD FAILED
E:\Home\ComponentFactory\Components\Extractor\Solution\Implementation\JExtractor\CaliberRMExtraction\build.xml:49: java.lang.RuntimeException: Couldn't generate content



If I comment <component> portion which is bold for generating hibernate.cfg.xml file it works fine without any problem. I'm using Eclipse 3.1 in generating hibernate files. The whole thing used to work yesterday and today it's not working. I was using MyEclipse evaluation copy and it got expired couple of days back, is there anything got to do with MyEclipse. Please let me know about this.

Thanks one and all,
Sandesh


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 17, 2006 1:38 am 
Beginner
Beginner

Joined: Mon Oct 24, 2005 2:45 am
Posts: 23
sandesh,
Since you are laready using eclipse 3.1
Better try hibernate tools

http://www.hibernate.org/hib_docs/tools ... gle/#d0e28

for configuration xml file.

there are some more tools already given in www.hibernate.org web site for mapping files and POJO class generation.


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.