2Big2BeSmall
2Big2BeSmall

Reputation: 1378

Failed connection to Netezza with Java JDBC squirrel-sql driver

I was trying to build a simple java application which will create a connection to netezza server with Java JDBC

I failed to find the jar of org.netezza.Driver on google and on maven repository and also on http://www.java2s.com/

So i tried to use squirrel-sql

This is my pom file:

    <dependency>
        <groupId>net.sf.squirrel-sql.plugins</groupId>
        <artifactId>netezza</artifactId>
        <version>3.5.0</version>
    </dependency> 

And this is my code

public static void main(String[] args) throws Exception {
    Class.forName("net.sourceforge.squirrel_sql.plugins.netezza.NetezzaPlugin");
        System.out.println("Start");
        Connection ct = DriverManager.getConnection("jdbc:netezza://anyname-this-is.server.uk.ibm.com:5480/BACC_PRD_IDM_ACS", "cgclem", "@23634snkln");
        System.out.println("Connected");
}

The error attached here:

    Start
Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:netezza://*********************************
    at java.sql.DriverManager.getConnection(DriverManager.java:689)
    at java.sql.DriverManager.getConnection(DriverManager.java:247)
    at com.xxxx.yyy.zzz.ppp.DatabaseProvider.main(DatabaseProvider.java:368)

Upvotes: 0

Views: 2119

Answers (1)

phl
phl

Reputation: 342

Netezza being a commercial product, the JDBC driver (contained in nzjdbc.jar) is supposedly not available on the internet. If your company uses a Netezza appliance, then you ought to be able to get that driver either from someone inside your company, or from IBM given you provide some evidence that your company is indeed using an appliance.

Once you get a hand on nzjdbc.jar, you will have to install it manually to your Maven repository for the same reasons. You can follow the instructions given on this other SO post : https://stackoverflow.com/a/31531394/5751783

Upvotes: 2

Related Questions