All Forums Extensibility
emilwu 72 posts Joined 12/07
29 Apr 2010
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

js185064 9 posts Joined 03/09
03 May 2010

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-teradata-plug-in-for-eclipse

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

js185064 9 posts Joined 03/09
04 May 2010

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-for-eclipse

emilwu 72 posts Joined 12/07
04 May 2010

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.

emilwu 72 posts Joined 12/07
04 May 2010

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

alihammad 16 posts Joined 03/11
23 Apr 2014

Compilation on Java 1.5 worked for me as well. Thanks

You must sign in to leave a comment.