0
Beantwoord

Getting error trying to use reverse engineering tool

Kent Graziano 9 jaar geleden bijgewerkt door Yomiyu Malifu 5 jaar geleden 11
I am using this command line on Windows 8:
java -cp .;reverse-engineering-1_6_9; com.vertabelo.reverse.Main -url jdbc:oracle:thin:@//localhost:1521/xe -user dv -password xx -o dv_demo

But get the error: Could not find or load main class com.vertabelo.reverse.Main
I am running in my \vertabelo directory. I downloaded the .jar file to that folder.

I am very bad at command line so have no idea how to fix this.
Beantwoord
You shouldn't have a semicolon at the end of the classpath (the -cp option) and you should refer to the downloaded jar file (reverse-engineering-1_6_9.jar instead of reverse-engineering-1_6_9).

You should also add the JDBC driver for Oracle to the classpath. You can download the driver from this site:
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html

So it should be
java -cp .;reverse-engineering-1_6_9.jar;path_to_jdbc_driver.jar com.vertabelo.reverse.Main -url jdbc:oracle:thin:@//localhost:1521/xe -user dv -password xx -o dv_demo


So I tried a few options:

java -cp .;reverse-engineering-1_6_9.jar; C:\Oracle\datamodeler4.1P\datamodeler\jdbc\lib\ojdbc6.jar com.vertabelo.reverse.Main -url jdbc:oracle:thin:@//localhost:1521/xe -user dv -password xx -o dv_demo

Error: Could not find or load main class

So I copied ojdbc6.jar to my Verabelo directory

java -cp .;reverse-engineering-1_6_9.jar; ojdbc6.jar com.vertabelo.reverse.Main -url jdbc:oracle:thin:@//localhost:1521/xe -user dv -password dv -o dv_demo

Same error: Could not find or load main class

Is there anyway to import DDL create scripts to Vertabelo, rather than from the database?
I'm pretty sure this error occured because of spaces in the argument for classpath:
.;reverse-engineering-1_6_9.jar; ojdbc6.jar

Please give it one more try without spaces, just like this:
java -cp .;reverse-engineering-1_6_9.jar;ojdbc6.jar com.vertabelo.reverse.Main -url "jdbc:oracle:thin:@//localhost:1521/xe" -user dv -password dv -o dv_demo

Is there anyway to import DDL create scripts to Vertabelo, rather than from the database?

Yes,you can do this when creating new model as well as for existing model.
If you want to create new model, you can click on "From SQL" tab and upload the file with your DDL:





For existing model, just click on "import from SQL" on the right-hand side of "Model details" page:



I hope this helps.
Thanks! Almost there - this time error was "unable to connect to database" (yes it is running on my local machine)

Thanks also for the tip on importing for SQL. I will give that a try!
this time error was "unable to connect to database"
This may be caused by several factors such as bad port number, firewall blocking the connection or invalid credentials.
Could you please paste here (or attach screenshot) the whole stacktrace?
Found the error when I read all the messages - password was expired!

Thanks.

I am experiencing the same problem as Kent above. Kindly assist.


java -cp .;reverse-engineering-1_6_12.jar;C:\Users\Nadia\Desktop\vertabelo\ojdbc6.jar com.vertabelo.reverse.Main -url jdbc:sqlserver://localhost:1433;DatabaseName=DWH_Fruitways_Farms -o ImportXML

What output do you see after running this command? Please copy&paste it here or attach a screenshot.

Hi! Im with the same problem than Kent but I have it on a Mac.

Command: java -cp .:reverse-engineering.jar:mysql-connector-java-5.1.28-bin.jar com.vertabelo.reverse.Main -url jdbc:mysql://mirrordb.konfio.mx:3306/mysql -user user -password pass -o wp.xml

The output of command is:

Error: no se ha podido inicializar la clase principal com.vertabelo.reverse.Main
Causado por: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

Any clue?

Hi,

Please use following command:


java --add-modules java.xml.bind -cp .:reverse-engineering.jar:mysql-connector-java-5.1.28-bin.jar com.vertabelo.reverse.Main -url jdbc:mysql://mirrordb.konfio.mx:3306/mysql -user user -password pass -o wp.xml

java -cp .;reverse-engineering-1_6_12.jar;sqljdbc4.jar com.vertabelo.reverse.Main -url jdbc:sqlserver://SERVERNAME\INSTANCENAME:1433;DatabaseName=AVNT -o wp


Error: Could not find or load main class com.vertabelo.reverse.Main


I keep getting this error, any ideas on how to solve it? I read some of the answers but I need a more info