[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1092) hbm2doc with graphing fails on MacOSX

Bob Obringer (JIRA) noreply at atlassian.com
Thu Dec 23 16:35:05 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39424#action_39424 ] 

Bob Obringer commented on HBX-1092:
-----------------------------------

Same issue.  Strange seeing Windows be a better supported platform then OSX for this sort of tool.

I'm attempting to run hibernate tools inside of Eclipse... and it teased me with the dropdown to set "Executable To Run Graphvitz" option in the properties for Schema Documentation Export.

> hbm2doc with graphing fails on MacOSX
> -------------------------------------
>
>                 Key: HBX-1092
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1092
>             Project: Hibernate Tools
>          Issue Type: Bug
>          Components: hbm2doc
>    Affects Versions: 3.2.0.GA, 3.2.2
>            Reporter: Avram Cherry
>   Original Estimate: 2m
>  Remaining Estimate: 2m
>
> In the method org.hibernate.tool.hbm2x.DocExporter.dotToFile, the portions of the command passed to Runtime.exec() are being passed to an escape(String) method that optionally adds quotes to the executable file path and the path to the input file, but only if the OS is not linux.  MacOSX is not linux, but adding quotes causes exec() to fail.
> The solution is to change the following statement:
> String exeCmd = escape(dotExeFileName) + " -T" + getFormatForFile(outFileName) + " " + escape(dotFileName) + " -o " + escape(outFileName);
> to:
> String[] exeCmd = new String[] {dotExeFileName, " -T", getFormatForFile(outFileName), dotFileName, " -o ", outFileName};
> If you pass the command and arguments as separate strings within an array to Runtime.exec() you do not need to quote filenames, regardless of platform.
> A (potentially very harmful) workaround is to pass -Dos.name=Linux to the VM.
> Please note that I've checked both the 3.2 branch and trunk and both contain the same problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list