0

嗨,我是 dbFit 的新手,在尝试将 dbFit 用于 Netezza 时出现错误无法加载 Netezza 数据库驱动程序 org.netezza.Driver。

代码和错误详情如下:

Code:
!path lib/*.jar

!| dbfit.NetezzaTest |

!| Connect | ip | user| password | dbfit |

!|Query| select 'test' as TABLE|

|x|

|test|

Giving the error:

java.lang.Error: Cannot load Netezza database driver org.netezza.Driver. Is the JDBC driver on the classpath?
    at dbfit.api.DbEnvironmentFactory$EnvironmentDescriptor.checkDriver(DbEnvironmentFactory.java:45)
    at dbfit.api.DbEnvironmentFactory$EnvironmentDescriptor.createEnvironmentInstance(DbEnvironmentFactory.java:60)
    at dbfit.api.DbEnvironmentFactory.createEnvironmentInstance(DbEnvironmentFactory.java:102)
    at dbfit.api.DbEnvironmentFactory.newEnvironmentInstance(DbEnvironmentFactory.java:106)
    at dbfit.NetezzaTest.(NetezzaTest.java:7)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at fit.FixtureClass.newInstance(FixtureClass.java:24)
    at fit.FixtureLoader.instantiateFixture(FixtureLoader.java:62)
    at fit.FixtureLoader.instantiateFirstValidFixtureClass(FixtureLoader.java:84)
    at fit.FixtureLoader.disgraceThenLoad(FixtureLoader.java:44)
    at fit.Fixture.loadFixture(Fixture.java:141)
    at fit.Fixture.getLinkedFixtureWithArgs(Fixture.java:133)
    at fit.Fixture.doTables(Fixture.java:78)
    at fit.FitServer.process(FitServer.java:81)
    at fit.FitServer.run(FitServer.java:56)
    at fit.FitServer.main(FitServer.java:41)
Caused by: java.lang.ClassNotFoundException: org.netezza.Driver
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at dbfit.api.DbEnvironmentFactory$EnvironmentDescriptor.checkDriver(DbEnvironmentFactory.java:43)
    ... 19 more

有人可以帮我吗?提前致谢。

4

2 回答 2

1

Netezza JDBC 驱动程序似乎不在此应用程序的类路径中。您需要将 nzjdbc.jar 文件放在应用程序的 lib 子目录中,或者放在类路径中的其他位置。

于 2015-05-14T19:19:53.560 回答
0

You'll have to add the nzjdbc.jar to the lib subdirectory yourself. As this is not open source it cannot be included in the dbfit distribution.

于 2015-05-22T10:03:34.830 回答