Closed eeshugerman closed 5 years ago
Hey there.
I think this might a typo on command-line: dp
instead of cp
. Can you please check?
java -jar /opt/{{ schemaspy_filename }} \
-cp /opt/{{ force_driver_filename }} \
-debug \
-t force \
-u {{ salesforceusername }} -p {{ salesforcepasswordandtoken }} \
-o {{ output_path }} \
-db {{ db }} \
-cat % -s force \
-connprops {{ connprops }}
Hello! I'm afraid that does not fix the issue; I get the same error. I am using -dp
because that is what the readme says to use for v6.0.0 and also what java -jar /opt/schemaspy-6.0.0.jar --help
documents.
Ok, let me check again. I'm not very familiar with this as well.
Add: https://raw.githubusercontent.com/claimvantage/force-metadata-jdbc-driver/master/force.properties
As force.properties
in your workdir
Hey @eeshugerman, just tried the suggestion from @npetzall and it worked like a charm. Ended with 3 filles (schemaspy 6 + force jar + force.properties).
Thanks! That seemed to do the trick, but now I'm hitting a new error:
INFO - Started Main in 1.561 seconds (JVM running for 2.059)
DEBUG - Debug enabled
INFO - Configuration file not found
INFO - Starting schema analysis
DEBUG - Resolving dbType: force ->
force.properties
DEBUG - Unable to find driverClass 'com.claimvantage.force.jdbc.ForceMetaDataDriver'
WARN - Connection Failure
org.schemaspy.model.ConnectionFailure: Failed to connect to database URL [jdbc:claimvantage:force] Failed to create any of 'com.claimvantage.force.jdbc.ForceMetaDataDriver' driver from driverPath '/opt/force-metadata-jdbc-driver-2.3.jar' with sibling jars no.
Resulting in classpath:
file:/opt/force-metadata-jdbc-driver-2.3.jar
at org.schemaspy.DbDriverLoader.getConnection(DbDriverLoader.java:101)
at org.schemaspy.DbDriverLoader.getConnection(DbDriverLoader.java:75)
at org.schemaspy.service.SqlService.connect(SqlService.java:68)
at org.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:186)
at org.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:107)
at org.schemaspy.cli.SchemaSpyRunner.runAnalyzer(SchemaSpyRunner.java:97)
at org.schemaspy.cli.SchemaSpyRunner.run(SchemaSpyRunner.java:86)
at org.schemaspy.Main.main(Main.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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: org.schemaspy.model.ConnectionFailure: Failed to create any of 'com.claimvantage.force.jdbc.ForceMetaDataDriver' driver from driverPath '/opt/force-metadata-jdbc-driver-2.3.jar' with sibling jars no.
Resulting in classpath:
file:/opt/force-metadata-jdbc-driver-2.3.jar
at org.schemaspy.DbDriverLoader.getDriver(DbDriverLoader.java:147)
at org.schemaspy.DbDriverLoader.getConnection(DbDriverLoader.java:93)
... 15 common frames omitted
There is more debug output I could provide if that would be helpful. I could also open a new issue for this if you would prefer.
@eeshugerman Could you verify the size of /opt/force-metadata-jdbc-driver-2.3.jar
?
Also if there is more output that would be great.
@eeshugerman I think the problem is with force-metadata-jdbc-driver-2.3.jar I downloaded it, which is a bit tricky, so it should be added as a release, under releases here on github. You need to click the file, get the download button while you have the option to "view raw".
Schemaspy doesn't validate that the file is a proper jar-file since anything can be added to the classpath. So a corrupt or improper jar will still be listed as a valid classpath entry.
I replaced my jar with a text-file with the content "404" and got the same error as you.
That's it! There was an issue with the way I was trying to downloading the "jar" programmatically... I was actually downloading the html at https://github.com/claimvantage/force-metadata-jdbc-driver/blob/master/dist/force-metadata-jdbc-driver-2.3.jar. :man_facepalming: My bad.
Thanks for your help!
+1 for a github release
@npetzall & @eeshugerman: thanks for the feedback and I'm glad the problem is solved. I've created a new issue (feature request) to track the release: #6.
Hi, I'm trying to upgrade to SchemaSpy v6.0.0 and came across your fork of this driver. Sweet! However I'm running into the same error as with v2.2:
In greater detail:
I'm very much a Java noob so sorry if this is something dumb!