telosys-tools-bricks / telosys-cli

Telosys CLI - Command Line Interface
https://www.telosys.org/
GNU Lesser General Public License v3.0
166 stars 23 forks source link

No tables found with ndbm #18

Closed marcoXbresciani closed 4 years ago

marcoXbresciani commented 5 years ago

Having hopefully configured everything properly, it seems that ndbm cannot find any table in my DB.

telosys#>ndbm
WARNING :
  You're about to create a new model from a database
  This operation can take a lot of time (especially for Oracle databases)
  The model file 'RCS Monitoring.dbrep' already exists.
  The existing file will be overridden !
Do you really want to launch the model creation ?  [y/n] ? y

Generating the new model...
[INFO] Creating new db-model from database 1
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
 Getting database metadata
 Getting tables metadata
 0 table(s) found
 End of metadata processing : 0 table(s) processed.
[INFO] Saving model in file C:\Users\mbresciani\Desktop\telosys-cli-3.1.0-002\TelosysTools\TestDB.dbrep
[INFO] Repository saved.
New model created.

The cdb command works properly.

telosys#>cdb
Checking database...
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
OK, connection test is successful.

Am I missing something in the configuration?

    <db id = "1"
      name = "TestDB" 
      driver = "com.mysql.jdbc.Driver" 
      url = "jdbc:mysql://localhost:3306/TestDB" 
      typeName = "MYSQL"
      dialect = "org.hibernate.dialect.MySQLDialect"
      isolationLevel = "TRANSACTION_REPEATABLE_READ" 
      poolSize = "3" >
    <property name="user" value="root" />
    <property name="password" value="password" />
    <metadata catalog="" schema=""
        table-name-pattern="%"
        table-types="TABLE VIEW"
        table-name-exclude=""
        table-name-include="" />
    </db>
l-gu commented 4 years ago

There's a message that seems to indicate that you are not using the correct driver "Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver'. " Try to use "com.mysql.cj.jdbc.Driver" ( https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-api-changes.html )

To verify that Telosys retrieves the JDBC metadata, use the command "cdb -t" (it shows the tables) "cdb -c" (it shows the columns)