Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR - Bad config Schema (-s/-schemas) was not provided and unable to deduce schema, ... #1439

Open
pang-thebasement opened this issue Apr 18, 2024 · 2 comments

Comments

@pang-thebasement
Copy link

SchemaSpy seems to be able to connect to the database, but it seems to be requiring also the database schema, which is not required in the documentation I have found

Expected Behavior

SchemaSpy does not create the output for my database with the standard command:
java -jar ~/software/schemaspy/schemaspy-6.2.4.jar -t mariadb -dp ~/software/schemaspy/mariadb-java-client-3.3.3.jar -o docs/schemaspy -u root -host localhost -db myproject -p my_password

I have also tried with an extra argument -s ddl_folder and with -s ddl_folder.sql_file_defining_a_table.sql

Current Behavior

java -jar ~/software/schemaspy/schemaspy-6.2.4.jar -t mariadb -dp ~/software/schemaspy/mariadb-java-client-3.3.3.jar -o docs/schemaspy -u root -host localhost -db myproject -p my_password

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.2.4 on avant with PID 72260 (/home/myuser/software/schemaspy/schemaspy-6.2.4.jar started by myuser in /home/myuser/mycompany/myproject)
INFO - The following profiles are active: default
INFO - Started Main in 1.54 seconds (JVM running for 2.091)
INFO - Starting schema analysis
ERROR - Bad config
Schema (-s/-schemas) was not provided and unable to deduce schema, schema is sometimes referred to as user/owner/database
INFO - StackTraces have been omitted, use -debug when executing SchemaSpy to see them

Possible Solution

Can you provide an example of an schema, communicate the required format (a single sql file?)?
Can you explain when is a schema needed? Why is access to the database not enoug?

Context

  • Database type (e.g. MySQL): mariadb
  • Database driver version (is you use a special one): https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector/
  • Your DDL (sample how to reproduce the issue): :-/
  • Full command including arguments how you run SchemaSpy: java -jar ~/software/schemaspy/schemaspy-6.2.4.jar -t mariadb -dp ~/software/schemaspy/mariadb-java-client-3.3.3.jar -o docs/schemaspy -u root -host localhost -db myproject -p my_password

Your Environment

  • Version used:
  • Operating System and version: ubuntu 24.04
  • Java version: java --version
    openjdk 21.0.3-ea 2024-04-16
    OpenJDK Runtime Environment (build 21.0.3-ea+7-Ubuntu-1build1)
    OpenJDK 64-Bit Server VM (build 21.0.3-ea+7-Ubuntu-1build1, mixed mode, sharing)
@npetzall
Copy link
Member

Schema (-s/-schemas) was not provided and unable to deduce schema, schema is sometimes referred to as user/owner/databas

Use same argument as -db or option -all

TL;DR
For mariadb which is based on MySQL they have mixed thing up a bit.

But in the case of SchemaSpy it -s should be the name of a schema in the database. This concept doesn't really exist in MySQL and as such in mariadb.

Deduction of schema I based on the driver so that is implementation specific outside of SchemaSpy.

But for MySQL schema is closely related to database if I remember correctly so try with same argument as -db

@pang-thebasement
Copy link
Author

pang-thebasement commented Apr 19, 2024

Great! That worked! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants