1

I want to visualise my data base and tried using SchemaSpy, but I can't connect to the data base. It's a mysql data base, running on my computer, accessible under localhost and I called SchemaSpy with the following command:

java -jar schemaspy-6.0.0.jar -t mysql -dp postgresql-42.2.7.jar -db <name> -host <host> -p <port> -s <name> -u <user> -p <password> -o ./output/

I downloaded postgresql-42.2.7.jar as a driver and set the respective parameter in the call. I also tried not setting a driver at all, but it didn't change the output.

I get the following error message after trying to run SchemaSpy:

SchemaSpy generates an HTML representation of a database schema's relationships.
SchemaSpy comes with ABSOLUTELY NO WARRANTY.
SchemaSpy is free software and can be redistributed under the conditions of LGPL version 3 or later.
http://www.gnu.org/licenses/

INFO  - Starting Main v6.0.0 on ####### with PID 10774 (/path/to/file started by ##### in /path/to/file)
INFO  - The following profiles are active: default
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/path/to/file/schemaspy-6.0.0.jar!/BOOT-INF/lib/spring-core-4.3.13.RELEASE.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO  - Found configuration file: schemaspy.properties
INFO  - Started Main in 1.397 seconds (JVM running for 1.944)
INFO  - Starting schema analysis
WARN  - Connection Failure

I also tried setting the --illegal-access=warn parameter, but no changes.

Does anyone know what problem might be?

Thanks a lot!

codeCre8or
  • 11
  • 1
  • Possible duplicate of [SchemaSpy PostgreSQL - WARN - Connection Failure](https://stackoverflow.com/questions/51726374/schemaspy-postgresql-warn-connection-failure) – user3788685 Sep 14 '19 at 14:22
  • 4
    Why do you specify `-t mysql` if you are using Postgres? You should use `-t postgresql` –  Nov 04 '19 at 16:09

1 Answers1

2

The -t argument setup specific connection properties, like which JDBC driver to use and what the connection string should look like.

The combination of -t mysql and PostgreSQL JDBC driver won't work.

Depending on the version of PostgreSQL either use -t pgsql for versions before 11 and -t pgsql11 for version 11 or newer.

The illegal reflection is a warning that was introduced in Java 9, and it has been solved in later spring versions and isn't presented in later versions of SchemaSpy or when running with Java 8.