Hi Jeremy,
its working now, I restarted the nifi service ,moved the JAR file into the
lib folder and unpacked the TDgsss.jar which had an xml file. so one of
them worked :)

Thanks. This was just testing connecting to Teradata now i have to work out
loading millions of rows in seconds in Teradata ;)

Anuj

On Mon, May 23, 2016 at 7:21 PM, Anuj Handa <[email protected]> wrote:

> Hi Jeremy,
>
> I figured out that maven was looking for Jar files and not able to find
> them so i had install the JAR files. there were few typos and names
> incorrect which were causing problems. I was finally able to create the
> Uber JAR but still getting class not found errors in NIFI.
>
> Here's the copy of the JAR file opened in winrar and both JDBC and TDGSS
> are in it com/teradata.
>
>
> [image: Inline image 1]
>
> [image: Inline image 2]
> my updated POM File
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.anuj</groupId>
>   <artifactId>teradata-uber</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0-SNAPSHOT</version>
>   <name>teradata-uber</name>
>   <url>http://maven.apache.org</url>
>
>
>     <dependencies>
>         <dependency>
>             <groupId>com.anuj.teradata</groupId>
>             <artifactId>tdgssconfig</artifactId>
>             <version>15.00.00.33</version>
>         </dependency>
>         <dependency>
>             <groupId>com.anuj.teradata</groupId>
>             <artifactId>terajdbc4</artifactId>
>             <version>15.00.00.33</version>
>         </dependency>
>
>     </dependencies>
>   <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-shade-plugin</artifactId>
>                 <version>2.4.3</version>
>                 <configuration>
>
> <createDependencyReducedPom>true</createDependencyReducedPom>
>                     <filters>
>                         <filter>
>                             <artifact>*:*</artifact>
>                             <excludes>
>                                 <exclude>META-INF/*.SF</exclude>
>                                 <exclude>META-INF/*.DSA</exclude>
>                                 <exclude>META-INF/*.RSA</exclude>
>                             </excludes>
>                         </filter>
>                     </filters>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <phase>package</phase>
>                         <goals>
>                             <goal>shade</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </build>
> </project>
>
>
> Anuj
>
> On Mon, May 23, 2016 at 8:29 AM, Jeremy Dyer <[email protected]> wrote:
>
>> Anuj - Your close. Maven relies on "repositories' to find 3rd party jars
>> that are needed as part of an application. Since the Teradata jars do not
>> exist in your local repository you will need to install them there. You can
>> do that by running these 2 commands and then attempting the "mvn clean
>> install package" again. Note you need to place the "path" with the actual
>> location of the jar on your local machine.
>>
>> mvn install:install-file -Dfile=<path-to-file>
>> -DgroupId=com.anuj.teradata -DartifactId=tdgsconfig
>> -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar
>> mvn install:install-file -Dfile=<path-to-file>
>> -DgroupId=com.anuj.teradata -DartifactId= terajdbc4 -Dversion=1.0.0-SNAPSHOT
>> -Dpackaging=jar
>>
>>
>> On Sat, May 21, 2016 at 11:03 PM, Anuj Handa <[email protected]> wrote:
>>
>>> hi Jeremy,
>>>
>>> I have no idea on how to use maven but i gave it a try and i am getting
>>> the error
>>>
>>> [ERROR] Failed to execute goal on project teradata-uber: Could not
>>> resolve dependencies for project com.anuj:teradata-uber:jar:1.0-SNAPSHOT:
>>> The following artifacts could not be resolved:
>>> com.anuj.teradata:tdgsconfig:jar
>>>
>>> i am not sure what location the teradata jar files should be and i tried
>>> multiple locations.
>>> MVN command
>>> c:\apache-maven-3.3.9\teradata-uber> mvn archetype:generate
>>> -DgroupId=com.anuj -DartifactId=teradata-uber
>>> -DarchetypeArtifactId=maven-archetype-quickstart
>>>  -DinteractiveMode=false
>>>
>>> my pom file
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <project xmlns="http://maven.apache.org/POM/4.0.0";
>>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>>>     <modelVersion>4.0.0</modelVersion>
>>>
>>>     <groupId>com.anuj</groupId>
>>>     <artifactId>teradata-uber</artifactId>
>>>     <version>1.0-SNAPSHOT</version>
>>>
>>>     <dependencies>
>>>
>>>         <dependency>
>>>             <groupId>com.anuj.teradata</groupId>
>>>             <artifactId>tdgsconfig</artifactId>
>>>             <version>1.0.0-SNAPSHOT</version>
>>>         </dependency>
>>>         <dependency>
>>>             <groupId>com.anuj.teradata</groupId>
>>>             <artifactId>terajdbc4</artifactId>
>>>             <version>1.0.0-SNAPSHOT</version>
>>>         </dependency>
>>>
>>>     </dependencies>
>>>
>>>     <build>
>>>         <plugins>
>>>             <plugin>
>>>                 <groupId>org.apache.maven.plugins</groupId>
>>>                 <artifactId>maven-shade-plugin</artifactId>
>>>                 <version>2.4.3</version>
>>>                 <configuration>
>>>
>>> <createDependencyReducedPom>true</createDependencyReducedPom>
>>>                     <filters>
>>>                         <filter>
>>>                             <artifact>*:*</artifact>
>>>                             <excludes>
>>>                                 <exclude>META-INF/*.SF</exclude>
>>>                                 <exclude>META-INF/*.DSA</exclude>
>>>                                 <exclude>META-INF/*.RSA</exclude>
>>>                             </excludes>
>>>                         </filter>
>>>                     </filters>
>>>                 </configuration>
>>>                 <executions>
>>>                     <execution>
>>>                         <phase>package</phase>
>>>                         <goals>
>>>                             <goal>shade</goal>
>>>                         </goals>
>>>                     </execution>
>>>                 </executions>
>>>             </plugin>
>>>         </plugins>
>>>     </build>
>>>
>>> </project>
>>>
>>> On Thu, May 19, 2016 at 10:40 PM, Jeremy Dyer <[email protected]> wrote:
>>>
>>>> Anuj - I would recommend using the Maven shade plugin to create and
>>>> Uber jar containing both tdfssconfig.jar and terajdbc4.jar. I used this
>>>> method a couple of days ago successfully after I was encountering the same
>>>> issue you were having. I wish I could just share the Uber jar with you but
>>>> due to Teradata's license model I am unable to do that. Here is the Maven
>>>> pom.xml that I used to create the Uber jar however. You will need to change
>>>> the groupId, artifactId, and version to match what you actually have
>>>> installed in your local Maven repository.
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <project xmlns="http://maven.apache.org/POM/4.0.0";
>>>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
>>>> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>>>>     <modelVersion>4.0.0</modelVersion>
>>>>
>>>>     <groupId>com.jeremydyer</groupId>
>>>>     <artifactId>teradata-uber</artifactId>
>>>>     <version>1.0-SNAPSHOT</version>
>>>>
>>>>     <dependencies>
>>>>
>>>>         <dependency>
>>>>             <groupId>com.jeremydyer.teradata</groupId>
>>>>             <artifactId>tdgsconfig</artifactId>
>>>>             <version>1.0.0-SNAPSHOT</version>
>>>>         </dependency>
>>>>         <dependency>
>>>>             <groupId>com.jeremydyer.teradata</groupId>
>>>>             <artifactId>terajdbc4</artifactId>
>>>>             <version>1.0.0-SNAPSHOT</version>
>>>>         </dependency>
>>>>
>>>>     </dependencies>
>>>>
>>>>     <build>
>>>>         <plugins>
>>>>             <plugin>
>>>>                 <groupId>org.apache.maven.plugins</groupId>
>>>>                 <artifactId>maven-shade-plugin</artifactId>
>>>>                 <version>2.4.3</version>
>>>>                 <configuration>
>>>>                     
>>>> <createDependencyReducedPom>true</createDependencyReducedPom>
>>>>                     <filters>
>>>>                         <filter>
>>>>                             <artifact>*:*</artifact>
>>>>                             <excludes>
>>>>                                 <exclude>META-INF/*.SF</exclude>
>>>>                                 <exclude>META-INF/*.DSA</exclude>
>>>>                                 <exclude>META-INF/*.RSA</exclude>
>>>>                             </excludes>
>>>>                         </filter>
>>>>                     </filters>
>>>>                 </configuration>
>>>>                 <executions>
>>>>                     <execution>
>>>>                         <phase>package</phase>
>>>>                         <goals>
>>>>                             <goal>shade</goal>
>>>>                         </goals>
>>>>                     </execution>
>>>>                 </executions>
>>>>             </plugin>
>>>>         </plugins>
>>>>     </build>
>>>>
>>>> </project>
>>>>
>>>>
>>>> On Thu, May 19, 2016 at 9:05 PM, Anuj Handa <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi  folks,
>>>>>
>>>>> I am using putsql on nifi-0.6.1 to connect to teradata and getting the
>>>>> below error
>>>>>
>>>>> 2016-05-19 20:06:33,230 ERROR [Timer-Driven Process Thread-4]
>>>>> o.apache.nifi.processors.standard.PutSQL
>>>>> java.lang.NoClassDefFoundError: Could not initialize class
>>>>> com.teradata.tdgss.jtdgss.TdgssManager
>>>>>
>>>>> The Teradata JDBC driver comes with two files, tdgssconfig.jar and
>>>>> terajdbc4.jar and i have specified the terajdbc4.jar in the
>>>>> DBCPConnectionPool
>>>>>
>>>>> reading about the error it seems like there's a dependent
>>>>> (tdgssconfig.jar) JAR file which its not able to find. both files were
>>>>> copied in the nifi Lib directory but that didn't help
>>>>>
>>>>> Because of this dependent driver can we use this method to connect to
>>>>> Teradata ?
>>>>>
>>>>> Anuj
>>>>>
>>>>
>>>>
>>>
>>
>

Reply via email to