Closed philCryoport closed 6 years ago
A note on "dot" not being found:
SEVERE: Cannot run program "dot": CreateProcess error=2, The system cannot find the file specified
java.io.IOException: Cannot run program "dot": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at schemacrawler.utility.ProcessExecutor.call(ProcessExecutor.java:80)
at schemacrawler.tools.integration.graph.GraphProcessExecutor.canGenerate(GraphProcessExecutor.java:134)
at schemacrawler.tools.integration.graph.GraphExecutable.generateGraph(GraphExecutable.java:183)
at schemacrawler.tools.integration.graph.GraphExecutable.executeOn(GraphExecutable.java:138)
at schemacrawler.tools.executable.SchemaCrawlerExecutable.executeOn(SchemaCrawlerExecutable.java:123)
at schemacrawler.tools.executable.BaseStagedExecutable.execute(BaseStagedExecutable.java:98)
at schemacrawler.tools.commandline.SchemaCrawlerCommandLine.execute(SchemaCrawlerCommandLine.java:131)
at schemacrawler.Main.main(Main.java:90)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 9 more
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
I checked and the GraphViz\bin directory was not on the path. So I added it, confirmed it was working:
dot -version
dot - graphviz version 2.38.0 (20140413.2041)
libdir = "C:\Program Files (x86)\Graphviz2.38\bin"
Activated plugin library: gvplugin_dot_layout.dll
Using layout: dot:dot_layout
Activated plugin library: gvplugin_core.dll
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
C:\Program Files (x86)\Graphviz2.38\bin\config6
was successfully loaded.
render : cairo dot fig gd gdiplus map pic pov ps svg tk vml vrml xdot
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : bmp canon cmap cmapx cmapx_np dot emf emfplus eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg metafile pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp xdot xdot1.2 xdot1.4
loadimage : (lib) bmp eps gd gd2 gif jpe jpeg jpg png ps svg
and ran schemacrawler.cmd again. It still cannot find dot
. Help?
The SLF4J warning is spurious, and not related to dot not being found. Did you open a new ConEmu window after adding the Graphviz bin directory to the path? If this is still not working, you can try the following workaround:
schemacrawler.cmd -server=mysql -database=foo_db -host=barbaz.rds.amazonaws.com -port=3306 -user=theuser -infolevel=standard -command=schema -portablenames -title "Blah" -Gdpi=300 -outputformat=scdot
dot -T pdf <DOT path and filename>
Phil, did that work for you?
Hi @sualeh ,
I actually like your suggestion of outputformat=scdot
and then using dot
to convert to PDF 😀
That works like a champ! Thanks.
I am glad you have a workaround, and thanks for closing the issue. However, I am curious if you ever got SchemaCrawler to call dot
. I am unable to reproduce the issue.
Ran ...-outputformat=png -outputfile=graph.png -Gdpi=300 -loglevel=WARNING
. Didn't get an error about not able to find dot
. Instead graph.png
ended up being 0KB and the following error appeared at the end (note WARNING:
has nothing after it):
Apr 24, 2018 3:02:42 PM schemacrawler.tools.integration.graph.GraphProcessExecutor call
WARNING:
Environment
Specify the
version of SchemaCrawler that you are using schemacrawler-14.20.04-distribution
version of Java that you are using java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
operating system and version that you are using Windows 10 Version 1709 (OS Build 16299.371) 64-bit
relational datavase and version that you are using MySQL 5.7.21 (AWS RDS)
JDBC driver and version that you are using 04/19/2018 02:04 PM 825,389 mssql-jdbc-6.2.2.jre8.jar 04/19/2018 02:04 PM 2,001,778 mysql-connector-java-6.0.6.jar (came with SchemaCrawler release)
Other relevant libraries: 03/16/2017 09:36 AM 41,203 slf4j-api-1.7.25-jar.jar (came with SchemaCrawler release) 01/14/2018 11:09 AM 993,917 graphviz-java-0.2.3-jar.jar 01/14/2018 11:09 AM 661,033 graphviz-java-0.2.3-source.jar (downloaded the GraphViz native Java libraries using the SchemaCrawler download tool.)
Issue
Please explain the issue briefly
schemacrawler.cmd -server=mysql -database=foo_db -host=barbaz.rds.amazonaws.com -port=3306 -user=theuser -infolevel=standard -command=schema -portablenames -title "Blah" -Gdpi=300 -outputformat=png -outputfile=graph.png -loglevel=ALL
schemacrawler.cmd file:
@java -classpath "%~dp0/lib/*";"%~dp0/config";. -Xmx8G -Xms8G schemacrawler.Main %*
-loglevel=ALL
on the command-line argument derby.log ends up with 0KB.I've attached a sanitized screen capture -- at least for the 1000 lines ConEmu goes back. You'll see an IOException for program "dot" that it cannot find the file. However, a PNG file is created showing the tables as UML blocks...but it seems to be missing some of the foreign-key relationships. This IOException does not appear when the same command is run without the
-loglevel=ALL
command.