always got failure 7980 when try to create Java External store procedure.

Extensibility
Enthusiast

always got failure 7980 when try to create Java External store procedure.

Teradata release: 13.00.00.00
Version 13.00.00.00
(Express version)

Tried both eclipse and manual process. both throw such here. Here are the steps that I did..

public class jxsp1{
public static void myproc(int[] parm){
parms[0] +=1;
}
}

javac jxsp1.java
jar -cf jar1.jar jxsp1.class

bteq

DATABASE DB1;
CALL SQLJ.INSTALL_JAR('CJ!jar1.jar','jar1','0');

*** procedure has been executed
*** warning: 5241 check output for possible warning encountered in installaing or replacing a jar
*** total elapsed time was 1 second
Check output for possible warnings.
-------------------------------------------------------------------------------
0 Wed April 28 14:40:20 PDT 2010 META-INF/
71 Wed April 28 14:40:20 PDT 2010 META-INF/MANIFEST.MF
251 Wed April 28 14:40:20 PDT 2010 jxsp1.class

BETQ -Enter your DBC/SQL request or BTEQ command:
CREATE PROCEDURE DB1.myjxsp1
(INOUT R INTEGER)
LANGUAGE JAVA NO SQL
PARAMAETER STYLE JAVA
EXTERNAL NAME 'jar1:jxsp1.myproc';

**** Failure 7980 A JAVA method in the specified Jar which matches that the EXTERNNAL NAME clause was not found /etc/opt/teradata/tdconfig/jarlib/tdbs_1018/jarlib_1018_1979_1.jar
5 REPLIES
Teradata Employee

Re: always got failure 7980 when try to create Java External store procedure.

Have you tried using Teradata Plug-in for Eclipse? I have created the following working example with Teradata IDE:

package jxsp;

import java.sql.DriverManager;
import java.sql.SQLException;

public class Jxsp1 {

public static void myProc(int[] param) {
param[0] +=1;

}

}

CALL SQLJ.INSTALL_JAR('cj!Jxsp1JarFile.jar', 'Jxsp1JarId', 0);

REPLACE PROCEDURE "guest"."myProc" (
INOUT "param" INTEGER)
LANGUAGE JAVA
NO SQL
PARAMETER STYLE JAVA
EXTERNAL NAME 'Jxsp1JarId:jxsp.Jxsp1.myProc(int[])';

The following articles will show you how to create a Java Stored procedure with the Teradata Plug-in for Eclipse:

http://developer.teradata.com/tools/articles/getting-started-with-teradata-plug-in-for-eclipse

http://developer.teradata.com/tools/articles/creating-a-simple-java-stored-procedure-using-the-terad...

http://developer.teradata.com/tools/articles/automating-a-build-for-java-stored-procedures-using-the...

Teradata Employee

Re: always got failure 7980 when try to create Java External store procedure.

If you are still having problems, make sure you have compiled your Java code with JDK 1.5. The Teradata project in Teradata Plug-in for Eclipse will take care of this for you. (See article below)

http://developer.teradata.com/tools/articles/create-a-teradata-project-using-the-teradata-plug-in-fo...

Enthusiast

Re: always got failure 7980 when try to create Java External store procedure.

I will try JDK1.5// that's what I suspected the other day, however the VMWARE version of TD13, comes with JDK1.6 in the VM.. I will move the compile part out of vmware and try it on a client host. thanks for the tip. Will keep the result posted.
Enthusiast

Re: always got failure 7980 when try to create Java External store procedure.

switch to jdk1.5 compliant when using javac and eclipse works perfect, thanks for the tip
Enthusiast

Re: always got failure 7980 when try to create Java External store procedure.

Compilation on Java 1.5 worked for me as well. Thanks