如何使 Schemacrawler 与 Informix 11.70 数据库一起工作

How to make Schemacrawler work with Informix 11.70 database

我已经将 Informix jar 复制到 schemacrawler/lib

ifxjdbc.jar
ifxjdbcx.jar
ifxlang.jar
ifxlsupp.jar
ifxsqlj.jar
ifxtools.jar

我已将 ApiExample.java 中的 jdbc 连接更改为 Informix jdbc 连接字符串,以及用户名和密码

api.cmd 如下所示(此处未做任何更改)

@echo off
del /f /q *.class
javac -classpath ../../_schemacrawler/lib/*;. ApiExample.java
java -classpath ../../_schemacrawler/lib/*;. ApiExample

但是当我 运行 api.cmd 我得到以下错误

WARNING: Could not get a database driver for database connection URL jdbc:informix-sqli://someserver:1234/mydb:informixserver=test_shm
Exception in thread "main" java.lang.NullPointerException
at  schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.createConnectionProperties(BaseDatabaseConnectionOptions.java:292)
    at schemacrawler.schemacrawler.BaseDatabaseConnectionOptions.getConnection(BaseDatabaseConnectionOptions.java:119)
    at ApiExampleInformix.main(ApiExampleInformix.java:25)

为什么 ApiExample.class 找不到 Informix jar?

提前致谢

我查看了 Load IBM Informix JDBC Driver,发现您需要先执行此操作:

Class.forName("com.informix.jdbc.IfxDriver");

Sualeh Fatehi,SchemaCrawler