[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1092?page=c...
]
Ted Bergeron commented on HBX-1092:
-----------------------------------
This has been a reported problem for nearly 3 years now:
https://forum.hibernate.org/viewtopic.php?f=6&t=971908
The solution is very simple, Windows is the oddball, not Linux, Mac, Solaris and every
other flavor of Unix out there. Change the escape method logic to IS_WINDOWS and only add
the escape characters for that case.
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: 2 minutes
Remaining Estimate: 2 minutes
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira