title: PLS-00103 error when comping Oracle stored function
body: <p>Given the following Java which is loaded into the database using loadjava:</p>
  
  <pre><code>package grassie.example;
  
  public class Example {
  
      public static String test(){
          return "Hello World!";
      }
  }
  </code></pre>
  
  <p>And given the following Oracle Stored Function:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION TEST_FUNCTION RETURN VARCHAR2
  AS LANGUAGE JAVA
  NAME 'grassie.example.Example.test() RETURN java.lang.String';
  </code></pre>
  
  <p>Why does the function not compile with the following error?:</p>
  
  <p><code>Error(3,1): PLS-00311: the declaration of "grassie.example.Example.test() RETURN java.lang.String" is incomplete or malformed</code></p>
  
  <p>Oracle client is 9.2.0.8.0, database is 9.2.0.8.0. Using SQL Developer 2.1.0.63</p>
  
  <p>edit: Ammended my question based on answers below.</p>
  
  <p>To further clarify, I created this simple test class and function because I am having problems with more complicated Java and stored functions, which accept and return various parameter types.</p>