0

Hi I am new to dbFit and while trying to use dbFit for Netezza giving error Cannot load Netezza database driver org.netezza.Driver.

Code and error details are as below:

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

Can any one please help me on this? Thanks in advance.

Dham
  • 11
  • 4

2 Answers2

1

It would seem that the Netezza JDBC driver is not in the classpath for this application. You need to place the nzjdbc.jar file in the lib subdirectory of your application, or in some other location that is also in the classpath.

ScottMcG
  • 3,867
  • 2
  • 12
  • 21
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.