Giter Club home page Giter Club logo

Comments (26)

rajadain avatar rajadain commented on May 26, 2024 20

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.

sergebug avatar sergebug commented on May 26, 2024 16

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.

npetzall avatar npetzall commented on May 26, 2024 8

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.

purcell-nec avatar purcell-nec commented on May 26, 2024 2

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.

sbroberg avatar sbroberg commented on May 26, 2024 1

Success! As others point out above, -renderer :quartz does the trick. It also works for the original schemaspy.

from schemaspy.

nbibler avatar nbibler commented on May 26, 2024 1

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.

rcheuk avatar rcheuk commented on May 26, 2024 1

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.

rafalkasa avatar rafalkasa commented on May 26, 2024

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.

http://stackoverflow.com/questions/41837485/graphviz-error-now-breaking-schemaspy-db-generation/42018558#42018558

I will verify what is the issue of this bug and try to fix as soon as possible.

from schemaspy.

javaseeds avatar javaseeds commented on May 26, 2024

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.

sbroberg avatar sbroberg commented on May 26, 2024

@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.

javaseeds avatar javaseeds commented on May 26, 2024

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.

sbroberg avatar sbroberg commented on May 26, 2024

Unfortunately, that's not really a practical workaround for us right now - I can't be installing Docker on our build slaves.

from schemaspy.

goravbhootra avatar goravbhootra commented on May 26, 2024

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.

janblom avatar janblom commented on May 26, 2024

The advice of sergebug did it for me as well, on High Sierra. Thanks!

from schemaspy.

immo-huneke-zuhlke avatar immo-huneke-zuhlke commented on May 26, 2024

brew reinstall graphviz --with-librsvg --with-pango worked for me.

from schemaspy.

amarouane avatar amarouane commented on May 26, 2024

neither brew reinstall graphviz --with-librsvg --with-pango or brew install graphviz --with-librsvg --with-pango fixed the problem.

from schemaspy.

npetzall avatar npetzall commented on May 26, 2024

@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.

nbibler avatar nbibler commented on May 26, 2024

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.

npetzall avatar npetzall commented on May 26, 2024

@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.

npetzall avatar npetzall commented on May 26, 2024

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.

user0624 avatar user0624 commented on May 26, 2024

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.

npetzall avatar npetzall commented on May 26, 2024

@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.

rcheuk avatar rcheuk commented on May 26, 2024

from schemaspy.

user0624 avatar user0624 commented on May 26, 2024

@rcheuk can you share the steps that you use for installing graphviz using macports

from schemaspy.

user0624 avatar user0624 commented on May 26, 2024

@npetzall

Its working with Schemaspy-6.1.0-SNAPSHOT and -vizjs option.

Thanks.

from schemaspy.

rohitn avatar rohitn commented on May 26, 2024

brew reinstall graphviz worked for me. I also tried graphviz from Macports and it worked too.

@user0624 To install graphviz using macports:

  1. Install Macports from https://www.macports.org/install.php
  2. Install Graphviz: sudo /opt/local/bin/port install graphviz
  3. Modify PATH to pickup dot from Macports: PATH=/opt/local/bin:$PATH

from schemaspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.