Comments (26)
I was able to get this to work by using -renderer :quartz
on Mac OS El Capitan with graphviz version 2.40.1 (20161225.0304)
from schemaspy.
Installing graphviz 2.40.1 with optional dependencies also fixed the issue for me. Even the old Schemaspy GUI works.
brew install graphviz --with-librsvg --with-pango
from schemaspy.
For anyone reading this -renderer :quartz
is broken on High Sierra using 6.x since it contains images.
https://gitlab.com/graphviz/graphviz/issues/1320
So just install brew install graphviz --with-pango
and don't use -renderer :quartz
On my mac I also hade issues with gd
so might need to force cairo -renderer :cairo
from schemaspy.
brew install graphviz --with-librsvg --with-pango
FWIW, even brew install graphviz --with-pango
is sufficient to work around this specific issue. (Tested on MacOS 10.3.3, with Graphviz 2.40.1 and Schemaspy 6.0.0rc2.)
from schemaspy.
Success! As others point out above, -renderer :quartz does the trick. It also works for the original schemaspy.
from schemaspy.
Sorry.. I should have explained that. I believe that the removal of these options do not make this any easier. For me, on MacOS 10.14.3 with Graphviz 2.40.1 installed via Homebrew, I am unable to successfully run the commands. I attempted to install librsvg
and pango
via Homebrew (which seems to be what the depends
does in the graphviz formula) but I didn't have any success with the output. I still received the dot errors.
$ java -version
java version "1.8.0_181"
$ dot -V
dot - graphviz version 2.40.1 (20161225.0304)
$ java -jar schemaSpy_5.0.0.jar -t pgsql -db dbname -host localhost -dp postgresql-42.2.5.jar -noschema -u user -o .
In my case, I am able to manually generate images from the dot files generated by schemaspy (even after the errors are reported). This successfully runs, for example:
dot -Tpng ./diagrams/summary/relationships.real.compact.dot -o ./diagrams/summary/relationships.real.compact.png
from schemaspy.
Trying out schemaspy for the first time and having trouble getting it to run. Using latest version of homebrew, that does not install the librsvg
and pango
dependencies (tried installing separately, but not sure how to add it to the config file). Dot doesn't work for me.
java -version
java version "1.8.0_121"
dot -V
dot - graphviz version 2.40.1 (20161225.0304)
I'm unable to use dot to generate the images though, so there might be still some dependency missing in my graphviz installation.
Update: To add to this, I'm using OSX, Mojave.
I ultimately switched to the macports installation of graphviz and this worked fine.
from schemaspy.
Hi @sbroberg
I try to find out what exactly happen and reproduce this issue on me environment. The same issue had other user of the SchemaSpy and try to find help trough stackoverflow community.
I will verify what is the issue of this bug and try to fix as soon as possible.
from schemaspy.
Thanks for looking into this - just so you know, it fails on "SchemaSpy Classic" (v5.0.0) as well, so I'm pretty sure it's a problem with dot/graphviz that was updated a month and a half or so.
If anyone needs a quick workaround, the stackoverflow link above has a work around that is successful.
from schemaspy.
@javaseeds : What is the fix in the stackoverflow question that addresses this? The only thing I could see was specfying the location of the dot executable, but finding the right executable doesn't seem to be the problem right now, since the only version of dot on my machine exhibits the problem.
Is the solution to install an earlier version of dot/graphviz? If so, can you point me in the right direction on how to do so? I'm not well-versed in how homebrew manages installs of multiple versions, or being able to install previous versions.
from schemaspy.
It's not a fix, but a workaround - it's an edit in the original post, apologies for not being more clear about that. I've added the workaround here as well:
[Edit] I didn't find a solution to why SchemaSpy/Graphviz stopped working (or wtf "code 139" meant), but I did use a workaround.
- Install Docker
- Get mnuessler/schemaspy or similar from hub.docker.com
- open a volume to your host - it will be used in the docker command
- run the command below
docker run -it --rm -v /docs/data:/data mnuessler/schemaspy -hq
-t mysql -host localhost -u root -p root -db things -o /data/things
where -v is the volume you opened on your host and -o /data/...
is where the output will show up after the run
from schemaspy.
Unfortunately, that's not really a practical workaround for us right now - I can't be installing Docker on our build slaves.
from schemaspy.
I had installed graphviz ver 2.40.1 using brew and faced similar issues. I uninstalled it, downloaded ver 2.36.0 pkg from http://www.graphviz.org/Download_macos.php and installed. everything is working fine.
OS X 10.12.3 Sierra
from schemaspy.
The advice of sergebug did it for me as well, on High Sierra. Thanks!
from schemaspy.
brew reinstall graphviz --with-librsvg --with-pango
worked for me.
from schemaspy.
neither brew reinstall graphviz --with-librsvg --with-pango
or brew install graphviz --with-librsvg --with-pango
fixed the problem.
from schemaspy.
@amarouane create a new issue with error you receiving and version of Mac osx. Please note that you need to specify a different render as noted in faq I think.
from schemaspy.
As of Homebrew/homebrew-core#31510, the librsvg and pango options are removed from the graphviz
homebrew formula (see Homebrew/homebrew-core@700270c984, committed on 2019-01-22).
from schemaspy.
@nbibler does this just mean it works without the option(easier) or is there now a more commands to run(harder). Sadly I'm no longer on osx.
from schemaspy.
This probably has to do with how schemaspy selects renderer. I'll have a look when I get the time. I think you should get the full commandline used for dot execution in the error.
You might get some warnings but by my experience they are just warnings.
from schemaspy.
I am having exact same issue.
I am using macOS High Sierra version 10.13.6
$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
$ dot -V
dot - graphviz version 2.40.1 (20161225.0304)
I initially tried installing graphviz using brew install graphviz command but was getting error in schemaSpy execution.
So tried installing using, brew reinstall graphviz --with-librsvg --with-pango command as few people suggested in the thread. but it gave following error. It seems they removed this option.
Error: invalid option: --with-librsvg
parrt/dtreeviz#33 talks about invalid option: --with-librsvg issue.
So tried below option,
brew uninstall graphviz
brew reinstall pango librsvg # even if already there, please reinstall
cd /tmp
wget https://graphviz.gitlab.io/pub/graphviz/stable/SOURCES/graphviz.tar.gz
tar xvfz graphviz.tar.gz
cd graphviz-2.40.1/
rm -rf /usr/local/lib/graphviz # in case old stuff is there
make sure to run ./configure after reinstalling pango, librsvg
./configure --includedir=/usr/local/include/graphviz --with-pangocairo=yes
make -j 8 # 8 threads
make install
But still getting following error during the execution on schemaspy.jar
dot -Tpng:gd /Users/xyz/Downloads/output/diagrams/CATLG_PUB_CNTRTS.1degree.dot -o/Users/xyz/Downloads/output/diagrams/CATLG_PUB_CNTRTS.1degree.png -Tcmapx: Error: fontconfig: Didn't find expected font family. Perhaps URW Type 1 fonts need installing?
dot -Tpng:gd /Users/xyz/Downloads/output/diagrams/CATLG_PUB_CNTRTS.1degree.dot -o/Users/xyz/Downloads/output/diagrams/CATLG_PUB_CNTRTS.1degree.png -Tcmapx: in label of node CNTRT
ERROR - There was an error writing a dot file
Please help.
from schemaspy.
@user0624 sadly I'm not on OSX, but there are alternatives.
1, Use the docker image
2, If using Schemaspy-6.1.0-SNAPSHOT you have the option to use viz.js instead of graphviz executable by adding -vizjs
as a command-line argument.
from schemaspy.
from schemaspy.
@rcheuk can you share the steps that you use for installing graphviz using macports
from schemaspy.
Its working with Schemaspy-6.1.0-SNAPSHOT and -vizjs option.
Thanks.
from schemaspy.
brew reinstall graphviz
worked for me. I also tried graphviz from Macports and it worked too.
@user0624 To install graphviz using macports:
- Install Macports from https://www.macports.org/install.php
- Install Graphviz:
sudo /opt/local/bin/port install graphviz
- Modify
PATH
to pickupdot
from Macports:PATH=/opt/local/bin:$PATH
from schemaspy.
Related Issues (20)
- SchemaSpy automatically detects only Foreign Keys that reference a Primary Key HOT 7
- marcelstoer:chore/jar-noteAre there any objections to this PR marked as "important"? HOT 1
- Docker: arm image HOT 1
- Moving GUI components
- GUI does not respond to re-sizing HOT 1
- No relationships image created HOT 6
- Too much information in error.
- Sign snapshots
- Cant get line breaks in Table Comments to work. HOT 6
- I am unable to get comments
- Oracle database - null password given HOT 5
- Driver Error HOT 7
- Failed to parse [schema].meta.xml HOT 5
- Terminating null reference error when generating HTML for Constraints MSSQL HOT 1
- SchemaSpy ERD (relationship tab) is not showing lines between tables HOT 4
- Relationship between Unique Keys and Foreign Key HOT 8
- ERROR - Bad config Schema (-s/-schemas) was not provided and unable to deduce schema, ... HOT 2
- Trying to set trustServerCertificate true in schemaspy.connprops Property in config file does not work HOT 2
- Getting an Exception when running against Oracle database in charset ISO-8859-15 HOT 1
- Feature request: "Comment" as title in relationships.html
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schemaspy.