All Forums Tools
26 Apr 2016
Problem during acceesing the function created on the top of the JAR file installed on the database

Hi Tom,

We are in process of creating a Java user defined Function and in order to achieve that  we have deployed the JAR File in the database and

 creating a function/procedure on the top of it  using the below two approaches :


Approach 1) Using the Teradata JUDF wizard Plug -ins in the eclipse  as per below steps:


     a) Installed the teradata plug-ins in eclipse as per the below instructions:



     b)  Created the Teradata Project and imported the Java libraries ,java source code as per the steps in Teradata JUDF Wizard.

          Setting up the Input and Output parameters of the function, as per the instructions :


  creating-a-simple-java-user-defined-function-using- the-teradata-plug-in-for-eclipse


     c) Deployed the JAR file and Generated SQL for the Function in the database 



JAR File gets deployed and function gets created in database but while executing the function resulting in to error:

[3604] Cannot place a NULL into NOT NULL field 


Note :Things to consider that the Java source is existing in production and working fine with no issues and returns results while running through 

the ECLIPSE ( Run --> Run Configurations (mentioning the Arguments)and by clicking on the Run , output gets displayed with no issues.





Approach 2)  Deploying using the Teradata External stored procedures -




placed the jar file at this path and invloking the bteq session:

C:\Program Files (x86)\Java\jdk1.8.0_73\bin>bteq

Teradata BTEQ for WIN32. PID: 4736
Copyright 1984-2015, Teradata Corporation. ALL RIGHTS RESERVED.
Enter your logon or BTEQ command:


CALL SQLJ.INSTALL_JAR(‘CJ!jar1.jar’, ‘jar1’, 0);


JAR files gets successfully deployed but problem comes during creating a External procedure on the top of it 



DATABASE syslib;






EXTERNAL NAME 'jar1:test.Main.class.myjxsp1';    --> test is the name of the package in the Java manifest file  and main is the class .

*** Failure 7980 A JAVA method in the specified Jar which matches that in t
he EXTERNAL NAME clause was not found/etc/opt/teradata/tdconfig/jarlib/tdbs_1
                Statement# 1, Info =0
*** Total elapsed time was 2 seconds.
Looks like its referring to the different path . can you suggest on how to resolve this?

tomnolan 594 posts Joined 01/08
27 Apr 2016

It's hard to diagnose your problem without seeing all the pieces, including the Java source code for the Java stored procedure.
My initial reaction is that this line looks incorrect: EXTERNAL NAME 'jar1:test.Main.class.myjxsp1';
I would not expect to see .class in that literal, because the syntax is 'JarName:PackageName.ClassName.MethodName' (and note that PackageName can contain dots itself).
You might want to try removing the .class to like this: EXTERNAL NAME 'jar1:test.Main.myjxsp1';

You must sign in to leave a comment.