1 Reply Latest reply: Dec 1, 2012 12:20 PM by PeterValencic RSS

    Oracle Enteprise 11g, java procedure, fail with ENUM and @anotation tags...

      I have a problem with java sources on database (java stored procedures)..
      My sources uses anotation and Enumerator...

      When i try to load java sources to my db with loadjava I get some errors like:

      loading : source INSURANCE2.org/mozilla/universalchardet/Constants
      Error while determining classes contained in org/mozilla/universalchardet/prober/Big5Prober.java
      Exception oracle.aurora.sqljdecl.ParseException: Lexical error at line 75, column 5. Encountered: "@" (64), after : ""
      creating : INSURANCE2.org/mozilla/universalchardet/prober/Big5Prober.java
      Error while determining classes contained in org/mozilla/universalchardet/prober/CharsetProber.java
      Exception oracle.aurora.sqljdecl.ParseException: Encountered "{" at line 63, column 5.
      Was expecting one of:
      "=" ...
      "[" ...
      ";" ...
      "," ...
      "(" ...

      here is some sample of my source compiled with JDK 1.5.0_00
      public abstract class CharsetProber
          // constants
          public static final float   SHORTCUT_THRESHOLD = 0.95f;
          public static final int     ASCII_A = 0x61; // 'a'
          public static final int     ASCII_Z = 0x7A; // 'z'
          public static final int     ASCII_A_CAPITAL = 0x41; // 'A'
          public static final int     ASCII_Z_CAPITAL = 0x5A; // 'Z'
          public static final int     ASCII_LT = 0x3C; // '<'
          public static final int     ASCII_GT = 0x3E; // '>'
          public static final int     ASCII_SP = 0x20; // ' '
          // inner types
          public enum ProbingState
          // methods
          public CharsetProber()
          public abstract String getCharSetName();
          public abstract ProbingState handleData(final byte[] buf, int offset, int length);
          public abstract ProbingState getState();
          public abstract void reset();
          public abstract float getConfidence();
          public abstract void setOption();
      On my database I think (correct me if not) I have java 1.5.0_10
        select f_vrni_parameter('java.version') from dual
      CREATE OR REPLACE function INSURANCE2.f_vrni_parameter(p_vhodni in varchar2) return varchar2 as language java name  'java.lang.System.getProperty(java.lang.String) return java.lang.String';
      What I'am doing wrong or what is the right way to upload java source or classes on db? (i will try to upload compiler classes with jdk 1.5.0)

      thank you