-->
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.  [ 5 posts ] 
Author Message
 Post subject: hbm2doc on Mac OS X: escaping of dot executable command
PostPosted: Thu Mar 08, 2007 4:53 pm 
Newbie

Joined: Thu Mar 08, 2007 4:29 pm
Posts: 1
Location: Hamburg, Germany
Hi,

I am trying to get the GraphViz representation for my Hibernate mappings work with HibernateTools-3.2.0.beta9a on Mac OS X.

Inside the hibernate.cfg.xml I located (dot is accessible from the bash shell just fine):

<property name="dot.executable">/usr/local/bin/dot</property>

This is how I added the schema documentation in my ant task:

<hibernatetool destdir="hibernate-html">
<configuration configurationfile="hibernate.cfg.xml" />
<hbm2doc/>
</hibernatetool>

The result is:

[hibernatetool] An exception occurred while running exporter #2:hbm2doc (Generates html schema documentation)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.HibernateException: Problem while generating DOT graph for Configuration
[hibernatetool] java.io.IOException: "/usr/local/bin/dot": not found

BUILD FAILED
/Users/niko/perforce/MobileDIS/main/projects/DIS-Core/build.xml:347: org.hibernate.HibernateException: Problem while generating DOT graph for Configuration
at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:223)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.hibernate.HibernateException: Problem while generating DOT graph for Configuration
at org.hibernate.tool.hbm2x.DocExporter.generateDot(DocExporter.java:201)
at org.hibernate.tool.hbm2x.DocExporter.doStart(DocExporter.java:151)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:183)
... 12 more
Caused by: java.io.IOException: "/usr/local/bin/dot": not found
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:52)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:429)
at java.lang.Runtime.exec(Runtime.java:326)
at org.hibernate.tool.hbm2x.DocExporter.dotToFile(DocExporter.java:242)
at org.hibernate.tool.hbm2x.DocExporter.generateDot(DocExporter.java:189)
... 16 more

From what I saw in the sources (DocExporter#dotToFile) it seems the dot command is escaped on Mac OS X, but the quotes will not work. To fake a Linux system (where the escape not happens), I specified ANT_OPTS=-Dos.name=Linux which is a bit tricky but seems to work.

Any chances to fix this issue in the next tools release?

Thanks for the nice GraphViz integration anyway,
Niko


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 11:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
put in jira and best of all submit a patch and test it since I don't have an easy way to test on mac.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 3:34 pm 
Newbie

Joined: Mon Dec 17, 2007 6:41 pm
Posts: 4
Was there any resolution to this issue? I am seeing the same issue using hibernate3-maven-plugin on Mac OSX 10.5.5.

Thanks,
Brendan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 24, 2008 4:14 pm 
Newbie

Joined: Mon Dec 17, 2007 6:41 pm
Posts: 4
Running like this seems to work:

mvn -Dos.name=Linux install

similar to ant approach. Is this going to get fixed?

Thanks,
Brendan


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 27, 2008 3:12 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i dont recall any jira or patch for it yet .... feel free to help 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.  [ 5 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.