0

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 を見つけられないのはなぜですか?

前もって感謝します

4

1 に答える 1

0

Load IBM Informix JDBC Driverを調べたところ、最初にこれを行う必要があることがわかりました。

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

Sualeh Fatehi、SchemaCrawler

于 2015-02-14T03:09:35.240 に答える