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.  [ 11 posts ] 
Author Message
 Post subject: hibernate tools hbm2doc graphviz
PostPosted: Tue Feb 13, 2007 4:36 pm 
Newbie

Joined: Mon May 22, 2006 1:00 pm
Posts: 13
From ant I have tried:

<hbm2doc destdir="./javadoc" dot.executable="c:/Graphviz/bin/dot.exe" />

and

<hbm2doc destdir="./javadoc">
<property name="dot.executable" value="c:/Graphviz/bin/dot.exe"/>
</hbm2doc>

In both cases I get something like:

Class org.hibernate.tool.ant.Hbm2DocExporterTask doesn't support the "dot.executable" attribute. I would like to generate:

http://www.hibernate.org/hib_docs/tools ... hgraph.jpg

as described in Hibernate Tools b9:

http://www.hibernate.org/hib_docs/tools ... beta9.html

Thanks, BenG.


Top
 Profile  
 
 Post subject: Re: hibernate tools hbm2doc graphviz
PostPosted: Tue Feb 13, 2007 5:08 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Quote:
<hbm2doc destdir="./javadoc" dot.executable="c:/Graphviz/bin/dot.exe" />


wrong.

Quote:
<hbm2doc destdir="./javadoc">
<property name="dot.executable" value="c:/Graphviz/bin/dot.exe"/>
</hbm2doc>


correct. but it won't give the following error:

Quote:
Class org.hibernate.tool.ant.Hbm2DocExporterTask doesn't support the "dot.executable" attribute. I would like to generate:

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 6:32 pm 
Newbie

Joined: Mon May 22, 2006 1:00 pm
Posts: 13
Indeed, the exception I get is:

Class org.apache.tools.ant.types.Environment$Variable doesn't support the "name" attribute.

Thanks, BenG.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 6:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
try:

<property key="....

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 7:49 pm 
Newbie

Joined: Mon May 22, 2006 1:00 pm
Posts: 13
Thanks Max, that did it.

Now at runtime I am seeing this exception. I am thinking this is related to our DB2 tables using fun chars like # and @ in the physical table and field names?

[hibernatetool] 15:30:53,179 DEBUG [org.hibernate.tool.hbm2x.DocExporter] Executing: "c:/Graphviz/bin/dot.exe" -Tpng "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.dot" -o "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.png"
[hibernatetool] Error: C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.dot:323: syntax error near line 323
[hibernatetool] context: UBLH -> >>> UTR# <<< [
[hibernatetool] 15:30:56,474 ERROR [org.hibernate.tool.hbm2x.DocExporter] Error 111 while executing: "c:/Graphviz/bin/dot.exe" -Tpng "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.dot" -o "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.png"


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 7:51 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes...we need to escape those "weird" characters out....


who uses # and @ in their table names anyhow ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 8:00 pm 
Newbie

Joined: Mon May 22, 2006 1:00 pm
Posts: 13
Quote:
who uses # and @ in their table names anyhow ? :)


You should see the neck ties we wear ...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 14, 2007 12:42 am 
Newbie

Joined: Mon May 22, 2006 1:00 pm
Posts: 13
I've tried escaping the table/field names containing # with \u0023 and \# but this doesn't work well. Do you think this is something we can mod in the hbm2doc codes? Perhaps I can help. Thanks, BenG.

[hibernatetool] 20:35:03,777 DEBUG [org.hibernate.tool.hbm2x.DocExporter] Executing: "c:/Graphviz/bin/dot.exe" -Tsvg "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.dot" -o "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.svg"
[hibernatetool] Error: C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.dot:323: syntax error near line 323
[hibernatetool] context: UBLH -> >>> UTR\ <<< u0023 [
[hibernatetool] 20:35:06,772 ERROR [org.hibernate.tool.hbm2x.DocExporter] Error 54 while executing: "c:/Graphviz/bin/dot.exe" -Tsvg "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.dot" -o "C:\home\bgroeneveld\workspacen\nextgen\orm\javadoc\tables\tablegraph.svg"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 14, 2007 3:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the fix needs to go into dot/tablegraph.dot.ftl where you can see we already replaces . with _

You would need to do similar things with # and @ (and find a unique mapping to it)

patch welcome ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: hibernate tools javadoc with Graphviz
PostPosted: Tue Apr 24, 2007 5:30 pm 
Newbie

Joined: Mon May 22, 2006 1:00 pm
Posts: 13
Max, we were able to remove our wacky # and @ chars with a sed script. Then gen'd javadoc with:

<hbm2doc destdir="./javadoc">
<property key="dot.executable" value="c:/Graphviz/bin/dot.exe" />
</hbm2doc>

What appear to hang actually completes after 100m 45s without errors, but the image produced is empty - debug ideas? Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 24, 2007 5:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
100 minutes ? daaamn.

have you tried using dot.exe directly on the generated .dot file and see if any kind of output can get out ?

_________________
Max
Don't forget to rate


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