Error 14200

Severity

16

Message text

The specified java signature is invalid.

Explanation

SQLJ functions provide a layer on top of Java methods. They are used to invoke Java methods as SQL functions in Adaptive Server.

The SQLJ function specifies the datatypes of the function’s parameters, which are collectively known as the SQLJ function signature. You can also specify the datatypes of the underlying Java method’s parameters, collectively known as the Java method signature.

Error 14200 is raised when the SQLJ function explicitly specifies the Java method signature, but this signature does not map to the SQLJ function signature.

Consider the following Java routine that uses a Java integer:

public class Jobcode {
   public static String job2(Integer jc) {
      if (jc == null) return null;
      else if (jc.intValue() == 1) return "Admin";
      else if (jc.intValue() == 2) return "Sales";
      else if (jc.intValue() == 3) return "Clerk";
      else return "unknown job code";
   }
}

If the following SQLJ function is created to execute Java method Jobcode.job2, explicitly describing the Jobcode.job2 signature as ():

create function job_title(jc integer)
   returns varchar(20)
language java parameter style java
external name ’Jobcode.job2()’

This function definition raises the following error:

Server Message: Number 14200, Severity 16
Server ’rosterdb’, Procedure ’job_title’,
Line 4: The specified java signature is invalid.

This is because the SQLJ function signature integer does not map to the explicitly defined Java method signature ().

Action

Correct either the SQLJ function signature or the Java method signature so that they can be mapped to each other.

Versions in which this error is raised

Version 12.5 and later