Home » SQL & PL/SQL » SQL & PL/SQL » UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist (Oracle DB, 10g R2, Windows Server 2008R2)
UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654565] Sat, 06 August 2016 00:18 Go to next message
mdsirajoddin
Messages: 20
Registered: July 2011
Location: Hyderabad
Junior Member

Hi Experts,

I have below mentioned code for a web service call. This code I copied from oracle-base.com(Tim Hall's site) for testing purpose. I executed it in sys and gave execute privilages to scott on both utl_http, utl_dbws.
create or replace FUNCTION updatePOStatus (vendor IN VARCHAR,
             ponum IN VARCHAR,
     poinum IN NUMBER,
     status IN VARCHAR)
RETURN VARCHAR2
AS
l_service  UTL_DBWS.service;
l_call  UTL_DBWS.call;
 
 
l_wsdl_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_service_qname UTL_DBWS.qname;
l_port_qname UTL_DBWS.qname;
l_operation_qname UTL_DBWS.qname;
 
 
l_xmltype_in SYS.XMLTYPE;
l_xmltype_out SYS.XMLTYPE;
l_result LONG;
BEGIN
l_wsdl_url :='http://10.9.142.73/Service1.svc?singleWsdl';
l_namespace := 'http://10.9.142.73/';
 
 
l_service_qname := UTL_DBWS.to_qname(l_namespace, 'Service1');
l_port_qname := UTL_DBWS.to_qname(l_namespace, 'BasicHttpBinding_IService1');
l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'UpdatePOStatus');
 
 
l_service := UTL_DBWS.create_service(
   wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
   service_name  => l_service_qname);
 
 
l_call := UTL_DBWS.create_call(
  service_handle => l_service,
  port_name => l_port_qname,
  operation_name => l_operation_qname);
 
 
l_xmltype_in := SYS.XMLTYPE('<?xml version="10.0" encoding="utf-8"?>
  <UpdatePOStatus xmlns="' || l_namespace || '">
   <Poinum' || poinum || ' </Poinum>
   <Ponum' || poinum || ' </Ponum>
   <Status' || poinum || ' </Status>
   <Vendor' || poinum || ' </Vendor>
  </UpdatePOStatus>');
l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
      request => l_xmltype_in);
UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);
 
 
l_result := l_xmltype_out.extract('//return/test()').getstringval();
RETURN l_result;
END;

code with line numbers:

SQL> create or replace FUNCTION sys.updatePOStatus (vendor IN VARCHAR,
  2               ponum IN VARCHAR,
  3       poinum IN NUMBER,
  4       status IN VARCHAR)
  5   RETURN VARCHAR2
  6  AS
  7   l_service  UTL_DBWS.service;
  8   l_call  UTL_DBWS.call;
  9 
10   l_wsdl_url VARCHAR2(32767);
11   l_namespace VARCHAR2(32767);
12   l_service_qname UTL_DBWS.qname;
13   l_port_qname UTL_DBWS.qname;
14   l_operation_qname UTL_DBWS.qname;
15 
16   l_xmltype_in SYS.XMLTYPE;
17   l_xmltype_out SYS.XMLTYPE;
18   l_result LONG;
19   BEGIN
20   l_wsdl_url :='http://10.9.142.73/Service1.svc?singleWsdl';
21   l_namespace := 'http://10.9.142.73/';
22 
23   l_service_qname := UTL_DBWS.to_qname(l_namespace, 'Service1');
24   l_port_qname := UTL_DBWS.to_qname(l_namespace, 'BasicHttpBinding_IService1');
25   l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'UpdatePOStatus');
26 
27   l_service := UTL_DBWS.create_service(
28     wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
29     service_name  => l_service_qname);
30 
31   l_call := UTL_DBWS.create_call(
32    service_handle => l_service,
33    port_name => l_port_qname,
34    operation_name => l_operation_qname);
35 
36   l_xmltype_in := SYS.XMLTYPE('<?xml version="10.0" encoding="utf-8"?>
37    <UpdatePOStatus xmlns="' || l_namespace || '">
38     <Poinum' || poinum || ' </Poinum>
39     <Ponum' || poinum || ' </Ponum>
40     <Status' || poinum || ' </Status>
41     <Vendor' || poinum || ' </Vendor>
42    </UpdatePOStatus>');
43   l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
44        request => l_xmltype_in);
45   UTL_DBWS.release_call (call_handle => l_call);
46   UTL_DBWS.release_service (service_handle => l_service);
47 
48   l_result := l_xmltype_out.extract('//return/test()').getstringval();
49   RETURN l_result;
50  END;

query from Scott is:

select updatePOStatus('10143','10037448','2','Started') from dual;

Errors:

Now when I execute through sql plus error is as below:
ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist
ORA-06512: at "SYS.UTL_DBWS", line 159
ORA-06512: at "SYS.UTL_DBWS", line 156
ORA-06512: at "SCOTT.UPDATEPOSTATUS", line 27


and the same executed from sql developer the error is as below:
ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist
ORA-06512: at "SYS.UTL_DBWS", line 159
ORA-06512: at "SYS.UTL_DBWS", line 156
ORA-06512: at "SCOTT.UPDATEPOSTATUS", line 27
29540. 00000 - "class %s does not exist"
*Cause: Java method execution failed to find a class with the indicated name.
*Action: Correct the name or add the missing Java class.

I checked all the methods in utl_dbws package there are no mistakes in function names as per above Cause in Error.

Help me out in sorting out this.

Thanks & Regards,

Sirajuddin
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654566 is a reply to message #654565] Sat, 06 August 2016 00:37 Go to previous messageGo to next message
Michel Cadot
Messages: 67880
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

https://community.oracle.com/thread/436099?start=0&tstart=0
http://steveracanovic.blogspot.fr/2008/03/database-web-services-call-out-class.html

Quote:
Logout of sqlplus and run:

loadjava -u / -r -v -f -s -grant public -genmissing dbwsclientws.jar dbwsclientdb102.jar

Where user/password are the details of the database user using the database web service callout.

Further details can be found here:

http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
http://www.oracle.com/technology/tech/java/oc4j/1003/how_to/how-to-ws-db-javacallout.html
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654574 is a reply to message #654566] Sat, 06 August 2016 05:41 Go to previous messageGo to next message
mdsirajoddin
Messages: 20
Registered: July 2011
Location: Hyderabad
Junior Member

Hi Michel,

I tried as requested and got failed in executing:

C:\>loadjava -u / -r -v -f -s -grant public -genmissing dbwsclientws.jar dbwsclientdb102.jar
arguments: '-u' '/' '-r' '-v' '-f' '-s' '-grant' 'public' '-genmissing' 'dbwsclientws.jar' 'dbwsclientdb102.jar'
Error while processing dbwsclientws.jar
    Exception java.io.FileNotFoundException: dbwsclientws.jar (The system cannot find the file specified)
Error while processing dbwsclientdb102.jar
    Exception java.io.FileNotFoundException: dbwsclientdb102.jar (The system cannot find the file specified)
Error while opening file: dbwsclientws.jar
    Exception java.io.FileNotFoundException: dbwsclientws.jar (The system cannot find the file specified)
creating :  dbwsclientws.jar
Error while opening file: dbwsclientdb102.jar
    Exception java.io.FileNotFoundException: dbwsclientdb102.jar (The system cannot find the file specified)
creating :  dbwsclientdb102.jar
SQL Error while connecting with oci8 driver to default database: ORA-01017: invalid username/password; logon denied

exiting  : could not open connection

C:\>


Kindly let me know where the issue is..

Thanks & Regards,

Sirajuddin

Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654575 is a reply to message #654574] Sat, 06 August 2016 05:46 Go to previous messageGo to next message
Michel Cadot
Messages: 67880
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Is the jar files in C;\?
I doubt.

Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654581 is a reply to message #654574] Sat, 06 August 2016 06:30 Go to previous messageGo to next message
mdsirajoddin
Messages: 20
Registered: July 2011
Location: Hyderabad
Junior Member

Hi Michel,

got a small doubt, is the webservices feature applicable to Standard Edition. cause I have SE not the EE installed in my Server.

Thanks & Regards,
Sirajuddin

Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654587 is a reply to message #654581] Sat, 06 August 2016 07:43 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
mdsirajoddin wrote on Sat, 06 August 2016 04:30
Hi Michel,

got a small doubt, is the webservices feature applicable to Standard Edition. cause I have SE not the EE installed in my Server.

Thanks & Regards,
Sirajuddin

post results from SQL below

select view_name from dba_views where view_name like '%JAVA%';
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654592 is a reply to message #654587] Sat, 06 August 2016 09:06 Go to previous messageGo to next message
mdsirajoddin
Messages: 20
Registered: July 2011
Location: Hyderabad
Junior Member

Hi Blackswan,

V_$JAVA_LIBRARY_CACHE_MEMORY
V_$JAVA_POOL_ADVICE
GV_$JAVA_LIBRARY_CACHE_MEMORY
GV_$JAVA_POOL_ADVICE
GV_$JAVAPOOL
V_$JAVAPOOL
KU$_JAVA_OBJNUM_VIEW
KU$_JAVA_SOURCE_VIEW
KU$_JAVA_CLASS_VIEW
KU$_JAVA_RESOURCE_VIEW
UTL_RECOMP_INVALID_JAVA_SYN
DBA_HIST_JAVA_POOL_ADVICE
JAVASNM
DBA_JAVA_POLICY
USER_JAVA_POLICY
USER_JAVA_CLASSES
ALL_JAVA_CLASSES
DBA_JAVA_CLASSES
USER_JAVA_LAYOUTS
ALL_JAVA_LAYOUTS
DBA_JAVA_LAYOUTS
USER_JAVA_IMPLEMENTS
ALL_JAVA_IMPLEMENTS
DBA_JAVA_IMPLEMENTS
USER_JAVA_INNERS
ALL_JAVA_INNERS
DBA_JAVA_INNERS
USER_JAVA_FIELDS
ALL_JAVA_FIELDS
DBA_JAVA_FIELDS
USER_JAVA_METHODS
ALL_JAVA_METHODS
DBA_JAVA_METHODS
USER_JAVA_ARGUMENTS
ALL_JAVA_ARGUMENTS
DBA_JAVA_ARGUMENTS
USER_JAVA_THROWS
ALL_JAVA_THROWS
DBA_JAVA_THROWS
USER_JAVA_DERIVATIONS
ALL_JAVA_DERIVATIONS
DBA_JAVA_DERIVATIONS
USER_JAVA_RESOLVERS
ALL_JAVA_RESOLVERS
DBA_JAVA_RESOLVERS
USER_JAVA_NCOMPS
ALL_JAVA_NCOMPS
DBA_JAVA_NCOMPS
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654594 is a reply to message #654592] Sat, 06 August 2016 09:56 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
so explain why you think you can't loadjava
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654595 is a reply to message #654594] Sat, 06 August 2016 09:59 Go to previous messageGo to next message
mdsirajoddin
Messages: 20
Registered: July 2011
Location: Hyderabad
Junior Member

Hi Blackswan,

kindly find here when I did the same..

C:\>loadjava -u / -r -v -f -s -grant public -genmissing dbwsclientws.jar dbwsclientdb102.jar
arguments: '-u' '/' '-r' '-v' '-f' '-s' '-grant' 'public' '-genmissing' 'dbwsclientws.jar' 'dbwsclientdb102.jar'
Error while processing dbwsclientws.jar
    Exception java.io.FileNotFoundException: dbwsclientws.jar (The system cannot find the file specified)
Error while processing dbwsclientdb102.jar
    Exception java.io.FileNotFoundException: dbwsclientdb102.jar (The system cannot find the file specified)
Error while opening file: dbwsclientws.jar
    Exception java.io.FileNotFoundException: dbwsclientws.jar (The system cannot find the file specified)
creating :  dbwsclientws.jar
Error while opening file: dbwsclientdb102.jar
    Exception java.io.FileNotFoundException: dbwsclientdb102.jar (The system cannot find the file specified)
creating :  dbwsclientdb102.jar
SQL Error while connecting with oci8 driver to default database: ORA-01017: invalid username/password; logon denied

exiting  : could not open connection

C:\>
this happends when I try loading it..
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654596 is a reply to message #654595] Sat, 06 August 2016 10:03 Go to previous messageGo to next message
Michel Cadot
Messages: 67880
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

As I said, with other words, you can't load something you have not.
Can't you read the error messages?

In addition, have you any / account?

Did you read the links I gave?
Did you read about the syntax of "loadjava"?
What does "-u" mean?
Maybe a simple "loadjava -h" would help?

Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654597 is a reply to message #654596] Sat, 06 August 2016 10:14 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>this happends when I try loading it..
Problem Exists Between Keyboard And Chair
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654598 is a reply to message #654597] Sat, 06 August 2016 10:22 Go to previous messageGo to next message
mdsirajoddin
Messages: 20
Registered: July 2011
Location: Hyderabad
Junior Member

Hi Blackswan,

Thanks for your suggestion, I will correct myself. As I am new to things I came here. thanks for help / suggestion..
Re: UTL_DBWS error: ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist [message #654599 is a reply to message #654598] Sat, 06 August 2016 10:38 Go to previous message
Michel Cadot
Messages: 67880
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Sat, 06 August 2016 17:03

As I said, with other words, you can't load something you have not.
Can't you read the error messages?

In addition, have you any / account?

Did you read the links I gave?
Did you read about the syntax of "loadjava"?
What does "-u" mean?
Maybe a simple "loadjava -h" would help?
Previous Topic: Sum from part of coloumn
Next Topic: SQL connectivity test
Goto Forum:
  


Current Time: Sun Jun 13 15:25:07 CDT 2021