Closed odlarhg closed 6 years ago
Hi,
I think (just at a glance) that host might be incorrect, also I think the leading dot in -s
is incorrect should just be dbo
unless it's actually .dbo
.
It seems like you want to connect to an instance. I believe there is a mssql-jtds-instance database type (-t)
Also need to factor in if you are using windows or sql authentication on the server.
@odlarhg Hi, I hope i didn't sound to harsh, I was battling my 1yr kid while writing.
I think the main thing is the databaseType used. You want to use -t mssql-jtds-instance
.
So command should be something like this, replace with correct password:
java -jar schemaspy.jar -dp c:\Applications\SchemaSpy\drivers\jtds-1.2.2.jar -t mssql-jtds-instance -host DESKTOP-5EAQMEV -instance SQLEXPRESS -db ACCESORED -s dbo -u sa -p xxxxx -o C:\Applications\Schemaspy\Outdir
@odlarhg Please re-open or join us on gitter if you still have problems.
Hi, I'm new to Schemaspy and I'm trying to execute it. I think that I have done everything that the documentation indicates in order to execute Schemaspy, but I always get the same error message.
Could you help me?
(Windows 10, SQL Server Express 2012 - Local Server installed on my laptop)
C:\Applications\Schemaspy>java -jar schemaspy.jar -dp c:\Applications\SchemaSpy\drivers\jtds-1.2.2.jar -t mssql-jtds -host DESKTOP-5EAQMEV\SQLEXPRESS -db ACCESORED -s .dbo -u sa -p xxxxx -o C:\Applications\Schemaspy\Outdir
/ | | | __ _ / | _ _ \ / | ' \ / \ ' ` \ / _` _ | ' | | | | ) | (| | | | / | | | | | (_| |) | |) | || | |____/ \|| ||_|| || ||_,_|__/| ./ \, | |_| |___/
SchemaSpy generates an HTML representation of a database schema's relationships.
INFO - Starting Main v6.0.0-rc2 on DESKTOP-5EAQMEV with PID 14824 (C:\Applications\Schemaspy\schemaspy.jar started by odlar in C:\Applications\Schemaspy) INFO - No active profile set, falling back to default profiles: default WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/C:/Applications/Schemaspy/schemaspy.jar!/BOOT-INF/lib/spring-core-4.3.11.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 - Configuration file not found INFO - Starting schema analysis INFO - Using database properties: INFO - [schemaspy.jar]/org/schemaspy/types/mssql-jtds.properties
Failed to connect to database URL [jdbc:jtds:sqlserver://DESKTOP-5EAQMEV/SQLEXPRESS/ACCESORED]
java.sql.SQLException: Network error IOException: Connection refused: connect at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:385)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
at org.schemaspy.DbDriverLoader.getConnection(DbDriverLoader.java:69)
at org.schemaspy.service.SqlService.connect(SqlService.java:65)
at org.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:181)
at org.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:88)
at org.schemaspy.Main.runAnalyzer(Main.java:79)
at org.schemaspy.Main.run(Main.java:72)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:732)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:716)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:703)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
at org.schemaspy.Main.main(Main.java:55)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.net.ConnectException: Connection refused: connect
at java.base/java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.base/java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.base/java.net.PlainSocketImpl.connect(Unknown Source)
at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
at java.base/java.net.Socket.connect(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:304)
at net.sourceforge.jtds.jdbc.SharedSocket.(SharedSocket.java:255)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:310)
... 23 more
WARN - Connection Failure
org.schemaspy.model.ConnectionFailure: java.sql.SQLException: Network error IOException: Connection refused: connect
at org.schemaspy.DbDriverLoader.getConnection(DbDriverLoader.java:95)
at org.schemaspy.service.SqlService.connect(SqlService.java:65)
at org.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:181)
at org.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:88)
at org.schemaspy.Main.runAnalyzer(Main.java:79)
at org.schemaspy.Main.run(Main.java:72)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:732)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:716)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:703)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
at org.schemaspy.Main.main(Main.java:55)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.sql.SQLException: Network error IOException: Connection refused: connect
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:385)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:182)
at org.schemaspy.DbDriverLoader.getConnection(DbDriverLoader.java:69)
... 20 common frames omitted
Caused by: java.net.ConnectException: Connection refused: connect
at java.base/java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.base/java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.base/java.net.PlainSocketImpl.connect(Unknown Source)
at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
at java.base/java.net.Socket.connect(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:304)
at net.sourceforge.jtds.jdbc.SharedSocket.(SharedSocket.java:255)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:310)
... 23 common frames omitted
INFO - Started Main in 2.714 seconds (JVM running for 3.326)