Invoking UTL_DBWS Fails with Error "ORA-29532: java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method: getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;)"

(Doc ID 795512.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Web Services - Version 10.1.3.1.0 and later
Information in this document applies to any platform.
***Checked for relevance on 24-Jan-2013***

Symptoms

After installation of Web Service Callout Utility 10.1.3.1 into Oracle Database 10.2.0.X, the
following error message was received when trying to call the web service from PL/SQL anonymous block

ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method:
getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;) Wrong
return type in function
ORA-06512: at "SYS.UTL_DBWS", line 404
ORA-06512: at "SYS.UTL_DBWS", line 401
ORA-06512: at "SRS.GET_JOKE", line 38

 

Steps to Reproduce

This example are based on steps from the following note.

Article-ID: <Note 412666.1>
Circulation: PUBLISHED (EXTERNAL)
Folder: ST.Middleware.WebServices
Topic: Invocation - TestPage, J2SE/J2EE Clients, UTL_DBWS, WSIF, etc
Title: Using UTL_DBWS to Make a Database Callout to a Document Style Web Service
  1. Load JAR file into a schema (one command at a time) for a 10.2.0.2 or later database. (MUST run both commands as they are).
    loadjava -u username/password -r -v -f -s -grant public -genmissing dbwsclientws.jar

    > />loadjava -u username/password -r -v -f -s -grant public -genmissing dbwsclientdb102.jar
  2. As SYS user execute the following in SQL*Plus.
    execute dbms_java.grant_permission('<schema>','SYS:java.util.PropertyPermission','http.proxySet','write');
    execute dbms_java.grant_permission('<schema>','SYS:java.util.PropertyPermission','http.proxyHost','write');
    execute dbms_java.grant_permission('<schema>','SYS:java.util.PropertyPermission','http.proxyPort','write');
    execute dbms_java.grant_permission('<schema>','SYS:java.lang.RuntimePermission','accessClassInPackage.sun.util.calendar','');
    execute dbms_java.grant_permission('<schema>','SYS:java.lang.RuntimePermission','getClassLoader','');
    execute dbms_java.grant_permission('<schema>','SYS:java.net.SocketPermission','*','connect,resolve');
    execute dbms_java.grant_permission('<schema>','SYS:java.util.PropertyPermission','*','read,write');
    execute dbms_java.grant_permission('<schema>','SYS:java.lang.RuntimePermission','setFactory','');
        
  3. Load the function get_joke (as indicated in <note 412666.1>) into the database.
  4. Call the web service.
    SELECT get_joke FROM dual;
  5. After running this command the ORA-29532 error will occur.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms