title: Error -4304 when calling a Java stored procedure in DB2
body: <p>Here's a sample Java class that I wrote</p>
  
  <pre><code>public class Sleeper  {
  
      public static void Sleep(int seconds){
  
          try {
              Thread.sleep(seconds * 1000);
          } catch (InterruptedException e) {
              e.printStackTrace();
          } 
      }
  }
  </code></pre>
  
  <p>and I wish to call this as a stored procedure this way :</p>
  
  <pre><code>DROP PROCEDURE DEM.SLEEPUTIL@
  
  -- echo "ETAPE 2 DE 3 &gt; Suppression puis instllation du JAR";
  CALL SQLJ.REMOVE_JAR('DEM.SLEEPER_JAR')@
  CALL SQLJ.REFRESH_CLASSES()@
  CALL SQLJ.INSTALL_JAR("file:///Sleeper.jar",'DEM.SLEEPER_JAR',0)@
  CALL SQLJ.REFRESH_CLASSES()@
  
  -- echo "ETAPE 2 DE 3 &gt; CREATION DE LA PROCEDURE ";
  CREATE PROCEDURE DEM.SLEEPUTIL (IN NUM INTEGER) 
    COMMIT ON RETURN NO 
    SPECIFIC SLEEPUTIL 
    DYNAMIC RESULT SETS 0 
    DETERMINISTIC 
    LANGUAGE JAVA 
    PARAMETER STYLE JAVA 
    NO DBINFO 
    FENCED 
    THREADSAFE 
    NO SQL 
    PROGRAM TYPE SUB
    EXTERNAL NAME 'DEM.SLEEPER_JAR:com.desj.visa.db.procedures.Sleeper!Sleep'
  </code></pre>
  
  <p>And I'm repeatedly getting this error:</p>
  
  <pre><code>14:54:00  [CALL - 0 row(s), 0.032 secs]  [Error Code: -4304, SQL State: 42724]  DB2 SQL Error: SQLCODE=-4304, SQLSTATE=42724, SQLERRMC=DEM.SLEEPUTIL;SLEEPUTIL;/db2/db2d095/sqllib/function/jar/DEM/SLEEPER_J, DRIVER=4.3.85
  CALL DEM.SLEEPUTIL(3);
  ... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.032/0.000 sec [0 successful, 0 warnings, 1 errors]
  </code></pre>
  
  <p>What is wrong with this?</p>