Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-29532: Java call terminated by uncaught Java exception

John-MKOct 29 2012 — edited Oct 31 2012
Hi Folks,

In order to use Oracle Webservices, I loaded JAVA CLASSES in the db through loadjava command into SYS schema and grant all the related permissions to one of the user. I created one example function and when I do SELECT, I get the following error:

I am very poor in PL/SQL stuff, what this error suggest to you.

Thanks a lot in advance.
SQL> Select GETDATAFROMWEBSERVICE from Dual;
Select GETDATAFROMWEBSERVICE from Dual
        *
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.IllegalAccessException: java.lang.NoClassDefFoundError: !!!ERROR!!! generated by genmissing
ORA-06512: at "SYS.UTL_DBWS", line 144
ORA-06512: at "DBWS.GETDATAFROMWEBSERVICE", line 16
Though this page is in German, but in case if you want to locate for example line 16, please refer it.
http://www.theserverside.de/oracle-webservices-im-praktischen-einsatz/

    CREATE OR REPLACE FUNCTION GETDATAFROMWEBSERVICE RETURN VARCHAR2 IS
      v_service             UTL_DBWS.SERVICE;
      v_call                UTL_DBWS.CALL;
      v_service_qname       UTL_DBWS.QNAME;
      v_port_qname          UTL_DBWS.QNAME;
      v_operation_qname     UTL_DBWS.QNAME;
      v_string_type_qname   UTL_DBWS.QNAME;
      v_decimal_type_qname  UTL_DBWS.QNAME;
      v_ret                 ANYDATA;
      v_retx_string         VARCHAR2(100);
      v_retx_len            NUMBER;
      v_params              UTL_DBWS.ANYDATA_LIST;
    BEGIN
      -- Service-Instanz erzeugen...
      v_service_qname := UTL_DBWS.TO_QNAME('http://www.webserviceX.NET', 'GlobalWeather');
      v_service       := UTL_DBWS.CREATE_SERVICE(v_service_qname);
     
      -- Call-Instanz erzeugen...
      v_port_qname      := UTL_DBWS.TO_QNAME('http://www.webserviceX.NET', 'GlobalWeatherSoap');
      v_operation_qname := UTL_DBWS.TO_QNAME('http://www.webserviceX.NET', 'GetWeather');
      v_call := UTL_DBWS.CREATE_CALL(v_service, v_port_qname, v_operation_qname);
     
      -- Eigenschaften festlegen...
      UTL_DBWS.SET_TARGET_ENDPOINT_ADDRESS(v_call,
               'http://www.webservicex.net/globalweather.asmx');
      UTL_DBWS.SET_PROPERTY(v_call, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
     
      -- Parameter hinzufuegen...
      v_string_type_qname := UTL_DBWS.TO_QNAME('http://www.w3.org/2001/XMLSchema', 'string');
      UTL_DBWS.ADD_PARAMETER(v_call, 'param0', v_string_type_qname, 'ParameterMode.IN');
      UTL_DBWS.ADD_PARAMETER(v_call, 'param1', v_string_type_qname, 'ParameterMode.IN');
     
      -- Return-Typ festlegen...
      v_decimal_type_qname := UTL_DBWS.TO_QNAME('http://www.w3.org/2001/XMLSchema', 'string');
      UTL_DBWS.SET_RETURN_TYPE(v_call, v_decimal_type_qname);
     
      -- Web-Service starten...
      v_params(0) := ANYDATA.CONVERTVARCHAR('Hamburg');
      v_params(1) := ANYDATA.CONVERTVARCHAR('Germany');
      v_ret := UTL_DBWS.INVOKE(v_call, v_params); 
      DBMS_OUTPUT.PUT_LINE('Result: ' || v_ret.accessvarchar2 );
      UTL_DBWS.RELEASE_SERVICE(v_service);
      RETURN v_ret.accessvarchar2;
    END;
    /
Best Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2012
Added on Oct 29 2012
6 comments
15,028 views