Unable to Load Netezza JDBC Driver

I have configured netezza db in spring. I added the dependent nzjdbc.jar to the classpath

Spring config:

<bean id="QA_CAM_BASE_jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">

      

    <!-- Initialization for data source -->

<bean id="QA_CAM_BASE_dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="${com.ec.database.driver}"/>
    <property name="url" value="${com.ec.database.url}"/>
    <property name="username" value="${com.ec.database.user}"/>
    <property name="password" value="${com.ec.database.pass}"/>

      

pom xml config 

<dependency>
    <groupId>org.netezza</groupId>
    <artifactId>netezza</artifactId>
    <version>1.0</version>
    <scope>system</scope>
    <systemPath>${basedir}/src/main/resources/lib/nzjdbc.jar</systemPath>
</dependency>

<resource> 
    <directory>${basedir}/src/main/resources/lib</directory> 
    <targetPath>WEB-INF/lib</targetPath> 
</resource> 
</webResources>

      

+3


source to share


1 answer


Put nzjdbc.jar

in your local maven repository

mvn install:install-file -Dfile=netezza.jar -DgroupId=org.netezza -DartifactId=netezza -Dversion=1.0 -Dpackaging=jar

      

(execute this in the directory where netezza.jar



And then use it as a regular dependency:

<dependency>
    <groupId>org.netezza</groupId>
    <artifactId>netezza</artifactId>
    <version>1.0</version>
</dependency>

      

@See Third Party JAR Installation Guide

+2


source







All Articles