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.  [ 3 posts ] 
Author Message
 Post subject: Help with Hibernate Doclet Tool needed! [newbie]
PostPosted: Mon Oct 18, 2004 5:08 am 
Regular
Regular

Joined: Thu Aug 05, 2004 11:15 pm
Posts: 50
I am having some problems with the Hibernate Doclet tool. I only added some simple code to my build file but it is not exactly working. Here is the code I added to my build file:



<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask" classpathref="project.class.path"/>

<target name="generate" description="Generates Hibernate class descriptor files." depends="compile">
<!-- Define the hibernatedoclet task -->


<!-- Execut the hibernatedoclet task -->
<hibernatedoclet
destdir="${jaaaava.dir}"
excludedtags="@version,@author,@todo"
force="true"
mergedir="${jaaaava.dir}"
>

<fileset dir="${source.root}">
<include name="**/*.java"/>
</fileset>

<hibernate version="2.0"/>

</hibernatedoclet>
</target>




This is the output I get:

C:\hibernate-2.1\practice9>ant generate
Buildfile: build.xml

prepare:

compile:

generate:
[hibernatedoclet] INFO: Some classes refer to other classes that were not fou
nd among the sources or on the classpath.
[hibernatedoclet] (Perhaps the referred class doesn't exist? Hasn't bee
n generated yet?)
[hibernatedoclet] The referring classes do not import any fully qualifi
ed classes matching these classes.
[hibernatedoclet] However, since no packages are imported, xjavadoc has
assumed that the referred classes
[hibernatedoclet] belong to the same package as the referring class. Th
e classes are:
[hibernatedoclet] C:\hibernate-2.1\practice9\src\net\sf\hibernate\cache\ReadWrit
eCache.java --> SoftLock qualified to net.sf.hibernate.cache.SoftLock
[hibernatedoclet] C:\hibernate-2.1\practice9\src\net\sf\hibernate\collection\Sor
tedSet.java --> SetProxy qualified to net.sf.hibernate.collection.SetProxy

BUILD SUCCESSFUL
Total time: 51 seconds



What I wanted to do is create the mapping file from the class file. So I created a random folder in my src folder and put a java file for example Track.java in there, and I would like it to create the mapping file. I created a random folder in src called jaaaava which I believe the hibernate doclet tool would put the mapping files. However I get this weird output. It says I don't import package and it doesn't read the class files I want it to generate code for.

Can anyone help me with this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 18, 2004 9:54 am 
Newbie

Joined: Mon Sep 27, 2004 9:40 am
Posts: 11
Location: Ostrava, Czech Republic
Do you have mappings generated to all of your classes?

It looks like some of the mappings refers to a class without generated mapping...

HTH,
Pavel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 20, 2004 6:31 am 
Regular
Regular

Joined: Thu Aug 05, 2004 11:15 pm
Posts: 50
Unless I mistakenly misread Hibernate Doclet, doen't Hibernate Doclet create mapping files of type hbm.xml from java files? So wouldn't all the mapping files be generated from the java classes so I shouldn't get this error?

Also, the error message has refernces to classes that I didn't even make. They are like default classes that come with hibernate or something.

Also what does it mean by "no packages imported" ? How do I import a package because in my java classes I made they have package java; at the top.

Thx


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.