title: Create or replace and resolve Java source, I am not able to create a function using java source
body: <p>Oracle environment.</p>
  
  <p>The following Java source has been correctly compiled:</p>
  
  <pre><code>CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED hr.roman
     AS package Package.NumeriRomani;
  
  class Numero{
      String r="";
      int a=0;
  
      Numero(int n){
          a=n;
              if(n==0){
                  r="NULL";
                  return;}
              while(n&gt;=1000){
                      r+="M";
                      n-=1000;}
              if(n&gt;=900){
                      r+="CM";
                      n-=900;}
              while(n&gt;=500){
                      r+="D";
                      n-=500;}
              if(n&gt;=400){
                      r+="CD";
                      n-=400;}
              while(n&gt;=100){
                      r+="C";
                      n-=100;}
              if(n&gt;=90){
                      r+="XC";
                      n-=90;}
              while(n&gt;=50){
                      r+="L";
                      n-=50;}
              if(n&gt;=40){
                      r+="XL";
                      n-=40;}
              while(n&gt;=10){
                      r+="X";
                      n-=10;}
              if(n&gt;=9){
                      r+="IX";
                      n-=9;}
              if(n&gt;=5){
                      r+="V";
                      n-=5;}
              if(n==4){
                      r+="IV";
                      n-=4;}
              while(n&gt;=1){
                      r+="I";
                      n--;}
      }//Numero(int)
      Numero(String k){
          int vCor,vNext;
          r=k;
          for(int i=0;;i++){
              vCor=valore(k.charAt(i));
              if(i==k.length()-1){
                  a+=vCor;
                  break;}
              vNext=valore(k.charAt(i+1));
              if(vCor&gt;=vNext)
                  a+=vCor;
              else
                  a-=vCor;
          }
      }
  
      static public int valore(char c){
          switch(c){
            case 'I': return 1;
              case 'V': return 5;
              case 'X': return 10;
              case 'L': return 50;
              case 'C': return 100;
              case 'D': return 500;
              case 'M': return 1000;
              default: return 0;
          }
      }
  
      public int getArabo(){
          return a;
      }
      public String getRomano(){
          return r;
      }
      }
  /
  </code></pre>
  
  <p>I would like to create a function for getArabo and a function for getRoman, but I always receive errors.</p>
  
  <p>I have tried with:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION hr.converti (alfa IN varchar2)
     RETURN VARCHAR2
  AS
     LANGUAGE JAVA
     NAME 'ROMAN.getArabo(java.lang.String) return java.lang.String';
  /
  </code></pre>
  
  <p>but I receive the error:</p>
  
  <pre><code>select hr.converti('XII') from dual;
  </code></pre>
  
  <p>ORA-29540: ROMAN class does not exist</p>
  
  <p>How could I fix this?</p>