2017-02-22 51 views
0

我運行下面的命令: schemacrawler.cmd -server = mysql的-database =預付-infolevel =最低-command =列表-loglevel = CONFIG -url =的jdbc:mysql的://127.0.0.1:3306 /預付-u =根-schemas =預付架構履帶 - 表名稱模式,不能爲空或空

而且我發現了以下錯誤:

Feb 22, 2017 5:11:48 PM us.fatehi.commandlineparser.CommandLineUtility logFullStackTrace 
SEVERE: Exception retrieving table information: Table name pattern can not be NULL or empty. 
schemacrawler.schemacrawler.SchemaCrawlerException: Exception retrieving table information: Table name pattern can not be NULL or empty. 
     at schemacrawler.crawl.SchemaCrawler.crawlTables(SchemaCrawler.java:739) 
     at schemacrawler.crawl.SchemaCrawler.crawl(SchemaCrawler.java:797) 
     at schemacrawler.tools.executable.BaseStagedExecutable.execute(BaseStagedExecutable.java:91) 
     at schemacrawler.tools.commandline.SchemaCrawlerCommandLine.execute(SchemaCrawlerCommandLine.java:129) 
     at schemacrawler.Main.main(Main.java:90) 
Caused by: java.sql.SQLException: Table name pattern can not be NULL or empty. 
     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:545) 
     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513) 
     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:505) 
     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:479) 
     at com.mysql.cj.jdbc.DatabaseMetaData.getTables(DatabaseMetaData.java:3836) 
     at schemacrawler.crawl.TableRetriever.retrieveTables(TableRetriever.java:114) 
     at schemacrawler.crawl.SchemaCrawler.lambda$crawlTables$26(SchemaCrawler.java:570) 
     at schemacrawler.crawl.SchemaCrawler$$Lambda$41/1559122513.call(Unknown Source) 
     at sf.util.StopWatch.time(StopWatch.java:156) 
     at schemacrawler.crawl.SchemaCrawler.crawlTables(SchemaCrawler.java:567) 
     ... 4 more 

==== ============= 請告知

+0

你應該包括更多的信息,包括你想完成什麼以及到目前爲止你嘗試過的。 – nloewen

回答

2

請確保使用正確的MySQL數據庫連接URL,請參閱Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J上的文檔。特別是,你需要設置nullNamePatternMatchesAll=true這樣的:

schemacrawler.cmd -server=mysql -database=prepaid -infolevel=minimum -command=list -loglevel=CONFIG -url=jdbc:mysql://127.0.0.1:3306/prepaid?nullNamePatternMatchesAll=true -u=root -schemas=prepaid

或者,更好,使用SchemaCrawler的內置爲MySQL,這樣,支持這是很容易:

schemacrawler.cmd -server=mysql -host=127.0.0.1 -database=prepaid -infolevel=minimum -command=list -loglevel=CONFIG -u=root -schemas=prepaid

Sualeh Fatehi,SchemaCrawler

+0

非常感謝,現在修好了。但元數據僅顯示主鍵和外鍵,而不顯示其餘表列。任何想法爲什麼? –

+0

有關詳細架構信息,請使用-infolevel = maximum -command = details'。 –

相關問題