Anybody using schemaSpy successfully on SuSE 9.3 or above? it keeps giving me an error with java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at net.sourceforge.schemaspy.Main.main(Main.java:122) I've downloaded the mysql connector/J class from MySQL and installed it. I've tried defining $CLASSPATH to point to the install directory, and I've tried running schemaSpy with java -jar -cp path-to-connector/J-directory but it still gives the same error. Phil
Phil, On Saturday 03 December 2005 05:59, Phil Burness wrote:
Anybody using schemaSpy successfully on SuSE 9.3 or above?
I was unaware of this project, but I tracked it down (first thinking it my by an XML thing) but see that in fact "schema" refers to relational database schemas. Both could be useful in my work, actually. So I downloaded the binary JAR (I already have MySQL's Connector/J installed) and gave it a try.
it keeps giving me an error with java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at net.sourceforge.schemaspy.Main.main(Main.java:122)
I've downloaded the mysql connector/J class from MySQL and installed it. I've tried defining $CLASSPATH to point to the install directory, and I've tried running schemaSpy with java -jar -cp path-to-connector/J-directory but it still gives the same error.
I mostly just get diagnostics when I run it, not really knowing how to invoke it properly (fixed-width font and no line wrap best): % java -cp /home/JT/mysql/mysql-connector-java-3.1.11/mysql-connector-java-3.1.11-bin.jar \ -jar /acquisitions/schemaSpy_2.1.0.jar \ -t mysql -o . -u root -p '*********' -h localhost -s mysql -all Usage: java -jar /acquisitions/schemaSpy_2.1.0.jar [options] -t databaseType type of database - defaults to ora use -dbhelp for a list of built-in types -u user connect to the database with this user id -s schema defaults to the specified user -p password defaults to no password -o outputDirectory directory to place the generated output in -css styleSheet.css defaults to schemaSpy.css -cp pathToDrivers optional - looks for drivers here before looking in driverPath in [databaseType].properties -dbthreads max concurrent threads when accessing metadata defaults to -1 (no limit) use 1 if you get 'already closed' type errors -x columnNamesRegex exclude matching columns from analysis e.g.: -x "(book.isbn)|(borrower.address)" -nohtml defaults to generate html -noimplied defaults to generate implied relationships -all analyze all "user" schemas in the specified database -schemaSpec used with -all to specify "user" schemas overrides schemaSpec in .properties file see db2.properties for more details -help detailed help -dbhelp display databaseType-specific help Go to http://schemaspy.sourceforge.net for more details or the latest version. java -jar /acquisitions/schemaSpy_2.1.0.jar -help to display more detailed help For starters, why don't you state the specific invocation you used?
Phil
Randall Schulz
On Saturday 03 December 2005 16:06, Randall R Schulz wrote:
Phil,
On Saturday 03 December 2005 05:59, Phil Burness wrote:
Anybody using schemaSpy successfully on SuSE 9.3 or above?
I was unaware of this project, but I tracked it down (first thinking it my by an XML thing) but see that in fact "schema" refers to relational database schemas. Both could be useful in my work, actually.
So I downloaded the binary JAR (I already have MySQL's Connector/J installed) and gave it a try.
it keeps giving me an error with java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at net.sourceforge.schemaspy.Main.main(Main.java:122)
I've downloaded the mysql connector/J class from MySQL and installed it. I've tried defining $CLASSPATH to point to the install directory, and I've tried running schemaSpy with java -jar -cp path-to-connector/J-directory but it still gives the same error.
I mostly just get diagnostics when I run it, not really knowing how to invoke it properly (fixed-width font and no line wrap best):
% java -cp /home/JT/mysql/mysql-connector-java-3.1.11/mysql-connector-java-3.1.11-bin. jar \ -jar /acquisitions/schemaSpy_2.1.0.jar \ -t mysql -o . -u root -p '*********' -h localhost -s mysql -all Usage: java -jar /acquisitions/schemaSpy_2.1.0.jar [options] -t databaseType type of database - defaults to ora use -dbhelp for a list of built-in types -u user connect to the database with this user id -s schema defaults to the specified user -p password defaults to no password -o outputDirectory directory to place the generated output in -css styleSheet.css defaults to schemaSpy.css -cp pathToDrivers optional - looks for drivers here before looking in driverPath in [databaseType].properties -dbthreads max concurrent threads when accessing metadata defaults to -1 (no limit) use 1 if you get 'already closed' type errors -x columnNamesRegex exclude matching columns from analysis e.g.: -x "(book.isbn)|(borrower.address)" -nohtml defaults to generate html -noimplied defaults to generate implied relationships -all analyze all "user" schemas in the specified database -schemaSpec used with -all to specify "user" schemas overrides schemaSpec in .properties file see db2.properties for more details -help detailed help -dbhelp display databaseType-specific help
Go to http://schemaspy.sourceforge.net for more details or the latest version.
java -jar /acquisitions/schemaSpy_2.1.0.jar -help to display more detailed help
For starters, why don't you state the specific invocation you used?
Phil
Randall Schulz My specific invocation was :- java -cp /home/pburness/mysql-connector-java-3.0.17/mysql-connector-java-3.0.17-ga-bin.jar -jar schemaSpy_2.1.0.jar -t mysql -db tract -o library -u phil -p xxxx -host localhost -s mysql -all
I notice your using a different version of connector - I tried 3.1.12 and that didn't work either. Did you get the 3.1.11 from the mysql website? Phil
Phil, On Saturday 03 December 2005 08:28, Phil Burness wrote:
On Saturday 03 December 2005 16:06, Randall R Schulz wrote:
...
For starters, why don't you state the specific invocation you used?
Phil
Randall Schulz
My specific invocation was :- java -cp /home/pburness/mysql-connector-java-3.0.17/mysql-connector-java-3.0.1 7-ga-bin.jar -jar schemaSpy_2.1.0.jar -t mysql -db tract -o library -u phil -p xxxx -host localhost -s mysql -all
I notice your using a different version of connector - I tried 3.1.12 and that didn't work either. Did you get the 3.1.11 from the mysql website?
Yes. I guess 3.1.12 came out some time in the past few weeks, since the time I downloaded it. I have applications that require at least 3.1.11. It appears there are unstated requirements on the order of the various options. When I copied the sample invocation from the Web page and modified it for MySQL and my local setup, I got the same symptom you reported: -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Failed to load driver [com.mysql.jdbc.Driver] from classpath [] Use -t [databaseType] to specify what drivers to use or modify one of the .properties from the jar, put it on your file system and point to it with -t [databasePropertiesFile]. For many people it's easiest to use the -cp option to directly specify where the database drivers exist (usually in a .jar or .zip/.Z). java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at net.sourceforge.schemaspy.Main.main(Main.java:122) -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- I verified that the class being loaded does exist in my Connector/J JAR file: % jar tf .../mysql-connector-java-3.1.11-bin.jar |egrep Driver com/mysql/jdbc/Driver.class com/mysql/jdbc/NonRegisteringDriver.class com/mysql/jdbc/NonRegisteringReplicationDriver.class com/mysql/jdbc/ReplicationDriver.class org/gjt/mm/mysql/Driver.class I'm a bit puzzled by the "classpath []" in the diagnostic. I wonder how the program is discovering the class path and why it does not reflect the actual invocation. Waaait a minute. I see the confusion. The "-cp" is an argument to schemaSpy, not to the JVM (the author chose the same option, which I'd consider a bad choice, insofar as it confuses weak minds such as my own). Yup. Giving the -cp .../mysql-connector-java-3.1.11-bin.jar option allows it to load the driver. Now it seems to hang here: -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Using database properties: [/acquisitions/schemaSpy_2.1.0.jar]/net/sourceforge/schemaspy/dbTypes/mysql.properties Connected to MySQL - 4.1.13-Max-log Gathering schema details........ -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- At this point there's no CPU utilization and MySQL is not running any queries on behalf of schemaSpy (ascertained by logging in to MySQL on another shell and using the "show full processlist" command). SchemaSpy produced a skeleton directory structure in the output directory I specified: % find mylocal mylocal mylocal/tables mylocal/graphs mylocal/graphs/summary By the way, I extracted the MySQL configuration file from the schemaSpy JAR file: % jar xf \ schemaSpy_2.1.0.jar \ net/sourceforge/schemaspy/dbTypes/mysql.properties % mv net/sourceforge/schemaspy/dbTypes/mysql.properties . % egrep driverPath mysql.properties driverPath=c:/mysql/mysql-connector-java-3.1.8-bin.jar I think this is where the driver is loaded from if you don't override it with the -cp option. You can put a corrected "mysql.properties" file in the invocation directory if you don't want to include the -cp option. Since I just make cover scripts for such things, it's easier for me to include the -cp option there than it is to have a properties file. Good luck. Let me know if you can get farther than I did.
Phil
Randall Schulz
On Saturday 03 December 2005 17:23, Randall R Schulz wrote:
Phil,
On Saturday 03 December 2005 08:28, Phil Burness wrote:
On Saturday 03 December 2005 16:06, Randall R Schulz wrote:
...
For starters, why don't you state the specific invocation you used?
Phil
Randall Schulz
My specific invocation was :- java -cp /home/pburness/mysql-connector-java-3.0.17/mysql-connector-java-3.0.1 7-ga-bin.jar -jar schemaSpy_2.1.0.jar -t mysql -db tract -o library -u phil -p xxxx -host localhost -s mysql -all
I notice your using a different version of connector - I tried 3.1.12 and that didn't work either. Did you get the 3.1.11 from the mysql website?
Yes. I guess 3.1.12 came out some time in the past few weeks, since the time I downloaded it. I have applications that require at least 3.1.11.
It appears there are unstated requirements on the order of the various options. When I copied the sample invocation from the Web page and modified it for MySQL and my local setup, I got the same symptom you reported:
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Failed to load driver [com.mysql.jdbc.Driver] from classpath []
Use -t [databaseType] to specify what drivers to use or modify one of the .properties from the jar, put it on your file system and point to it with -t [databasePropertiesFile].
For many people it's easiest to use the -cp option to directly specify where the database drivers exist (usually in a .jar or .zip/.Z).
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at net.sourceforge.schemaspy.Main.main(Main.java:122) -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
I verified that the class being loaded does exist in my Connector/J JAR file:
% jar tf .../mysql-connector-java-3.1.11-bin.jar |egrep Driver com/mysql/jdbc/Driver.class com/mysql/jdbc/NonRegisteringDriver.class com/mysql/jdbc/NonRegisteringReplicationDriver.class com/mysql/jdbc/ReplicationDriver.class org/gjt/mm/mysql/Driver.class
I'm a bit puzzled by the "classpath []" in the diagnostic. I wonder how the program is discovering the class path and why it does not reflect the actual invocation.
Waaait a minute. I see the confusion. The "-cp" is an argument to schemaSpy, not to the JVM (the author chose the same option, which I'd consider a bad choice, insofar as it confuses weak minds such as my own).
Yup. Giving the -cp .../mysql-connector-java-3.1.11-bin.jar option allows it to load the driver. Now it seems to hang here:
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Using database properties:
[/acquisitions/schemaSpy_2.1.0.jar]/net/sourceforge/schemaspy/dbTypes/mysql .properties Connected to MySQL - 4.1.13-Max-log
Gathering schema details........ -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
At this point there's no CPU utilization and MySQL is not running any queries on behalf of schemaSpy (ascertained by logging in to MySQL on another shell and using the "show full processlist" command).
SchemaSpy produced a skeleton directory structure in the output directory I specified:
% find mylocal mylocal mylocal/tables mylocal/graphs mylocal/graphs/summary
By the way, I extracted the MySQL configuration file from the schemaSpy JAR file:
% jar xf \ schemaSpy_2.1.0.jar \ net/sourceforge/schemaspy/dbTypes/mysql.properties
% mv net/sourceforge/schemaspy/dbTypes/mysql.properties .
% egrep driverPath mysql.properties driverPath=c:/mysql/mysql-connector-java-3.1.8-bin.jar
I think this is where the driver is loaded from if you don't override it with the -cp option. You can put a corrected "mysql.properties" file in the invocation directory if you don't want to include the -cp option. Since I just make cover scripts for such things, it's easier for me to include the -cp option there than it is to have a properties file.
Good luck. Let me know if you can get farther than I did.
Randall - I haven't a chance! Interested to read through your notes but I'm not good with Java and don't know how to proceed.... Phil
On Saturday 03 December 2005 13:17, Phil Burness wrote:
On Saturday 03 December 2005 17:23, Randall R Schulz wrote:
Phil,
On Saturday 03 December 2005 08:28, Phil Burness wrote:
On Saturday 03 December 2005 16:06, Randall R Schulz wrote:
...
For starters, why don't you state the specific invocation you used?
Phil
Randall Schulz
My specific invocation was :- java -cp /home/pburness/mysql-connector-java-3.0.17/mysql-connector-java-3 .0.1 7-ga-bin.jar -jar schemaSpy_2.1.0.jar -t mysql -db tract -o library -u phil -p xxxx -host localhost -s mysql -all
I notice your using a different version of connector - I tried 3.1.12 and that didn't work either. Did you get the 3.1.11 from the mysql website?
Yes. I guess 3.1.12 came out some time in the past few weeks, since the time I downloaded it. I have applications that require at least 3.1.11.
It appears there are unstated requirements on the order of the various options. When I copied the sample invocation from the Web page and modified it for MySQL and my local setup, I got the same symptom you reported:
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Failed to load driver [com.mysql.jdbc.Driver] from classpath []
Use -t [databaseType] to specify what drivers to use or modify one of the .properties from the jar, put it on your file system and point to it with -t [databasePropertiesFile].
For many people it's easiest to use the -cp option to directly specify where the database drivers exist (usually in a .jar or .zip/.Z).
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at net.sourceforge.schemaspy.Main.main(Main.java:122) -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
I verified that the class being loaded does exist in my Connector/J JAR file:
% jar tf .../mysql-connector-java-3.1.11-bin.jar |egrep Driver com/mysql/jdbc/Driver.class com/mysql/jdbc/NonRegisteringDriver.class com/mysql/jdbc/NonRegisteringReplicationDriver.class com/mysql/jdbc/ReplicationDriver.class org/gjt/mm/mysql/Driver.class
I'm a bit puzzled by the "classpath []" in the diagnostic. I wonder how the program is discovering the class path and why it does not reflect the actual invocation.
Waaait a minute. I see the confusion. The "-cp" is an argument to schemaSpy, not to the JVM (the author chose the same option, which I'd consider a bad choice, insofar as it confuses weak minds such as my own).
Yup. Giving the -cp .../mysql-connector-java-3.1.11-bin.jar option allows it to load the driver. Now it seems to hang here:
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Using database properties:
[/acquisitions/schemaSpy_2.1.0.jar]/net/sourceforge/schemaspy/dbTyp es/mysql .properties Connected to MySQL - 4.1.13-Max-log
Gathering schema details........ -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
At this point there's no CPU utilization and MySQL is not running any queries on behalf of schemaSpy (ascertained by logging in to MySQL on another shell and using the "show full processlist" command).
SchemaSpy produced a skeleton directory structure in the output directory I specified:
% find mylocal mylocal mylocal/tables mylocal/graphs mylocal/graphs/summary
By the way, I extracted the MySQL configuration file from the schemaSpy JAR file:
% jar xf \ schemaSpy_2.1.0.jar \ net/sourceforge/schemaspy/dbTypes/mysql.properties
% mv net/sourceforge/schemaspy/dbTypes/mysql.properties .
% egrep driverPath mysql.properties driverPath=c:/mysql/mysql-connector-java-3.1.8-bin.jar
I think this is where the driver is loaded from if you don't override it with the -cp option. You can put a corrected "mysql.properties" file in the invocation directory if you don't want to include the -cp option. Since I just make cover scripts for such things, it's easier for me to include the -cp option there than it is to have a properties file.
Good luck. Let me know if you can get farther than I did.
Randall - I haven't a chance!
Interested to read through your notes but I'm not good with Java and don't know how to proceed....
Sorry. It's actually simple enough, if you cut to the chase instead of getting the blow-by-blow that I gave you. Try this: Create an "sspy" script (be sure to "chmod +x sspy"): -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- #!/bin/bash --norc classPath="/usr/share/java/mysql-connector-java.jar" export CLASSPATH="$classPath" exec \ java \ -jar /acquisitions/schemaSpy_2.1.0.jar \ -t mysql \ -cp "$classPath" \ "$@" -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- (For whatever funky reason, you need the Connector/J JAR both in the Java class path _and_ in the -cp argument to schemaSpy itself.) Be sure to correct the path names for your system. Based on my experience, I recommend you use 3.1.12 of Connector/J. The one you have should be OK or you can install the latest mysql-connector-java package from the Packman repository (mysql-connector-java-3.1.12-0.pm.0). If you want to see the pretty graphical database diagrams, install this RPM: <http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.6-1.fc4.i386.rpm> Now invoke it like this: % sspy -db tract -o library -u phil -p X -host localhost -s mysql -all That should do it. Again, good luck. If you still have problems, feel free to report back.
Phil
Randall Schulz
Hi, Is it worse to re-post with proper trimming than it is to leave just the under-trimmed message? On Saturday 03 December 2005 13:17, Phil Burness wrote:
...
Randall - I haven't a chance!
Interested to read through your notes but I'm not good with Java and don't know how to proceed....
Sorry. It's actually simple enough, if you cut to the chase instead of getting the blow-by-blow that I gave you. Try this: Create an "sspy" script (be sure to "chmod +x sspy"): -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- #!/bin/bash --norc classPath="/usr/share/java/mysql-connector-java.jar" export CLASSPATH="$classPath" exec \ java \ -jar /acquisitions/schemaSpy_2.1.0.jar \ -t mysql \ -cp "$classPath" \ "$@" -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- (For whatever funky reason, you need the Connector/J JAR both in the Java class path _and_ in the -cp argument to schemaSpy itself.) Be sure to correct the path names for your system. Based on my experience, I recommend you use 3.1.12 of Connector/J. The one you have should be OK or you can install the latest mysql-connector-java package from the Packman repository (mysql-connector-java-3.1.12-0.pm.0). If you want to see the pretty graphical database diagrams, install this RPM: <http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.6-1.fc4.i386.rpm> Now invoke it like this: % sspy -db tract -o library -u phil -p X -host localhost -s mysql -all That should do it. Again, good luck. If you still have problems, feel free to report back.
Phil
Randall Schulz
On Saturday 03 December 2005 21:50, Randall R Schulz wrote:
Hi,
Is it worse to re-post with proper trimming than it is to leave just the under-trimmed message?
On Saturday 03 December 2005 13:17, Phil Burness wrote:
...
Randall - I haven't a chance!
Interested to read through your notes but I'm not good with Java and don't know how to proceed....
Sorry. It's actually simple enough, if you cut to the chase instead of getting the blow-by-blow that I gave you.
Try this: Create an "sspy" script (be sure to "chmod +x sspy"):
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- #!/bin/bash --norc
classPath="/usr/share/java/mysql-connector-java.jar"
export CLASSPATH="$classPath"
exec \ java \ -jar /acquisitions/schemaSpy_2.1.0.jar \ -t mysql \ -cp "$classPath" \ "$@" -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
(For whatever funky reason, you need the Connector/J JAR both in the Java class path _and_ in the -cp argument to schemaSpy itself.)
Be sure to correct the path names for your system.
Based on my experience, I recommend you use 3.1.12 of Connector/J. The one you have should be OK or you can install the latest mysql-connector-java package from the Packman repository (mysql-connector-java-3.1.12-0.pm.0).
If you want to see the pretty graphical database diagrams, install this RPM: <http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.6-1.fc4.i386.rpm>
Now invoke it like this:
% sspy -db tract -o library -u phil -p X -host localhost -s mysql -all
That should do it.
Again, good luck. If you still have problems, feel free to report back.
Phil
Randall Schulz OK, I tried all that (edited the script to use my own locations) but it gave me some execution errors :-( So I did it the long way:-
classPath="/home/pburness/mysql-connector-java-3.1.12/mysql-connector-java-3.1.12.bin.jar" export CLASSPATH=$classPath // checkit echo $CLASSPATH /home/pburness/mysql-connector-java-3.1.12/mysql-connector-java-3.1.12.bin.jar // Run the app java -jar schemaSpy_2.1.0.jar -t mysql -cp "$classPath" -db tract -o library -u phil -p mypassword -host localhost -s mysql -all // Result Using database properties: [schemaSpy_2.1.0.jar]/net/sourceforge/schemaspy/dbTypes/mysql.properties Failed to load driver [com.mysql.jdbc.Driver] from classpath [] Use -t [databaseType] to specify what drivers to use or modify one of the .properties from the jar, put it on your file system and point to it with -t [databasePropertiesFile]. For many people it's easiest to use the -cp option to directly specify where the database drivers exist (usually in a .jar or .zip/.Z). java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:199) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at net.sourceforge.schemaspy.Main.main(Main.java:122) What I did notice however (I downloaded mysql-connector-java-3.1.12 again) and as I unzipped/untarred I got a zero block error. This also happened when I downloaded and unzipped/tarred the 3.0.7 version too. I'm going to try using the packman version later today. The package looks good and is great for what I need - if only I could get it working!!!! Phil
Phil, On Sunday 04 December 2005 01:52, Phil Burness wrote:
...
What I did notice however (I downloaded mysql-connector-java-3.1.12 again) and as I unzipped/untarred I got a zero block error. This also happened when I downloaded and unzipped/tarred the 3.0.7 version too.
I keep a copy of tar from SuSE 9.1 just for the times when this happens. It is free of the bug that causes that "zero block" error.
Phil
Randall Schulz
On Saturday 03 December 2005 21:50, Randall R Schulz wrote:
Hi,
Is it worse to re-post with proper trimming than it is to leave just the under-trimmed message?
On Saturday 03 December 2005 13:17, Phil Burness wrote:
...
Randall - I haven't a chance!
Interested to read through your notes but I'm not good with Java and don't know how to proceed....
Sorry. It's actually simple enough, if you cut to the chase instead of getting the blow-by-blow that I gave you.
Try this: Create an "sspy" script (be sure to "chmod +x sspy"):
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- #!/bin/bash --norc
classPath="/usr/share/java/mysql-connector-java.jar"
export CLASSPATH="$classPath"
exec \ java \ -jar /acquisitions/schemaSpy_2.1.0.jar \ -t mysql \ -cp "$classPath" \ "$@" -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
(For whatever funky reason, you need the Connector/J JAR both in the Java class path _and_ in the -cp argument to schemaSpy itself.)
Be sure to correct the path names for your system.
Based on my experience, I recommend you use 3.1.12 of Connector/J. The one you have should be OK or you can install the latest mysql-connector-java package from the Packman repository (mysql-connector-java-3.1.12-0.pm.0).
If you want to see the pretty graphical database diagrams, install this RPM: <http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.6-1.fc4.i386.rpm>
Now invoke it like this:
% sspy -db tract -o library -u phil -p X -host localhost -s mysql -all
That should do it.
Again, good luck. If you still have problems, feel free to report back.
Phil
Randall Schulz I feel this is never going to work for me..... I tried using apt to install the mysql-connector-java on packman and it gave me E: package not found...
I set sources.list to look at packman and issued the apt install --no-checksig mysql-connector-java-3.1.12.pm.0 I also tried apt install --no-checksig mysql-connector-java-3.1.12 Same error! I then thought what the heck and downloaded graphviz listed above and did a rpm -Uhv graphviz*.rpm it failed on libstdc++ dependencies :-( Sometimes life is harder than it needs to be....... Phil PS - Glad you like it though!
Phil, On Sunday 04 December 2005 03:35, Phil Burness wrote:
...
Randall Schulz
I feel this is never going to work for me..... I tried using apt to install the mysql-connector-java on packman and it gave me E: package not found...
I set sources.list to look at packman and issued the apt install --no-checksig mysql-connector-java-3.1.12.pm.0
I also tried apt install --no-checksig mysql-connector-java-3.1.12 Same error!
Where in all that did you tell it to use the Packman repository? I will _never_ understand why people don't stick to YaST. I can't help you with apt because I know nothing about it, not wanting to subject my system's package integrity to an unsupported package manager.
I then thought what the heck and downloaded graphviz listed above and did a rpm -Uhv graphviz*.rpm it failed on libstdc++ dependencies :-(
I guess that's because you're running 9.3. Try one of the other RPMs from the Graphviz download page until you find one whose dependencies are met. That's what I did. If you don't get this to work, then you'll only lose the graphic presentation, not the tabular one.
Sometimes life is harder than it needs to be.......
Sometimes?
Phil
Randall Schulz
* Randall R Schulz <rschulz@sonic.net> [12-04-05 10:51]:
On Sunday 04 December 2005 03:35, Phil Burness wrote:
I also tried apt install --no-checksig mysql-connector-java-3.1.12 Same error!
Where in all that did you tell it to use the Packman repository?
I will _never_ understand why people don't stick to YaST. I can't help you with apt because I know nothing about it, not wanting to subject my system's package integrity to an unsupported package manager.
probably wrong package name, ie: apt-get install mysql-connector-java -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
Phil, On Sunday 04 December 2005 03:35, Phil Burness wrote:
...
I feel this is never going to work for me..... I tried using apt to install the mysql-connector-java on packman and it gave me E: package not found...
I set sources.list to look at packman and issued the apt install --no-checksig mysql-connector-java-3.1.12.pm.0
I also tried apt install --no-checksig mysql-connector-java-3.1.12 Same error!
Just go to <http://packman.links2linux.org/?action=290>, download the package and install it manually.
... Phil
Randall Schulz
Phil, On Saturday 03 December 2005 08:28, Phil Burness wrote:
...
My specific invocation was :- java -cp /home/pburness/mysql-connector-java-3.0.17/mysql-connector-java-3.0.1 7-ga-bin.jar -jar schemaSpy_2.1.0.jar -t mysql -db tract -o library -u phil -p xxxx -host localhost -s mysql -all
I notice your using a different version of connector - I tried 3.1.12 and that didn't work either. Did you get the 3.1.11 from the mysql website?
Interestingly enough, I see that Packman has just released an RPM for Connector/J 3.1.12 (they had 3.1.11 previously). SuSE's release remains at 3.1.8. I think I'll install the Packman 3.1.12. I don't really expect it to change this symptom, but who knows. If it does, I'll let you know. (Offhand, I'd be less surprised if going back to 3.1.8, which the author apparently used for testing, fixed the hang I'm seeing.)
Phil
Randall Schulz
Hello again, Phil, On Saturday 03 December 2005 09:33, Randall R Schulz wrote:
Phil,
...
Interestingly enough, I see that Packman has just released an RPM for Connector/J 3.1.12 (they had 3.1.11 previously).
SuSE's release remains at 3.1.8.
I think I'll install the Packman 3.1.12. I don't really expect it to change this symptom, but who knows. If it does, I'll let you know. (Offhand, I'd be less surprised if going back to 3.1.8, which the author apparently used for testing, fixed the hang I'm seeing.)
Like I said earlier, a weak mind. Using the 3.1.12 from Packman did indeed solve the hanging problem and I now have a nice HTML-ified display of my schema. Thanks, Phil, for putting me onto this. I and my co-workers can certainly make use of this tool. Randall Schulz
Hi, Phil, On Saturday 03 December 2005 09:39, Randall R Schulz wrote:
...
Using the 3.1.12 from Packman did indeed solve the hanging problem and I now have a nice HTML-ified display of my schema.
Thanks, Phil, for putting me onto this. I and my co-workers can certainly make use of this tool.
So, I'm finding this useful already, as I'm just in the midst of my first Hibernate project and it helps me visualize the resulting database schema. Anyway, I noticed this diagnostic when I run schemaSpy: -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- Warning: Invalid version of dot detected (2.2). SchemaSpy requires dot version 2.2.1 or versions greater than 2.4. Generated pages will not contain a graphical view of table relationships. -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- So I went hunting for a newer version of the graphviz package (the home / source of the "dot" program). I could not find a SuSE-specific package, but it turns out the version from the Graphviz site (<http://www.graphviz.org/> / <http://www.graphviz.org/Download_linux.php>) that is compiled for FC4 installs and seems to work. There may be problems not disclosed by schemaSpy's use of dot, but since it's not something I use otherwise, it was worth the minor risk of installing it. The results are moderately cool. Go to a page for a table and select the "Implied relationships" check-box. I think there's either a problem with the DDL generated by the Hibernate tool or a problem with schemaSpy (or, most likely, with my Hibernate mapping file), 'cause the foreign key constraints in the resulting schema are supposed to be explicit. Randall Schulz
participants (3)
-
Patrick Shanahan
-
Phil Burness
-
Randall R Schulz