Call to packed Java stored procedure in Oracle 8i

Discussions

EJB programming & troubleshooting: Call to packed Java stored procedure in Oracle 8i

  1. Call to packed Java stored procedure in Oracle 8i (2 messages)

    Hii,

    I am building a component which uses project packages besides those included within core JDK(util,sql..etc).By using LoadJava Oracle tool, I loaded the Jar file into Oracle.Also created the package& package body for the class to be used (po_mgr).

    CREATE OR REPLACE PACKAGE po_mgr AS
      PROCEDURE sendMessage();
    END po_mgr;

    CREATE OR REPLACE PACKAGE BODY po_mgr AS
      PROCEDURE sendMessage AS LANGUAGE JAVA
    END po_mgr;

    Java Package : package com.mypack1.mypack2.mypack3;
    The class, MyClass contains one method sendMessage();
    We can call the method referencing the package created for it like
    SQL> SET SERVEROUTPUT ON
    SQL> CALL dbms_java.set_output(2000);
    ...
    SQL> CALL po_mgr.sendMessage();

    I am not able to invoke the mehtod I created.Contrary to this If i just follow the same procedure and simply do not use package..the method gets invoked correctly.

    Any suggestions...!

    Thankx
  2. I believe you are talking about Java Stored Procedure in Oracle. If that's the case, you would need to write a PL/SQL Stored procedure wrapper for each Java static method and access it via this wrapper. Consult documentation at:
    http://otn.oracle.com
  3. I have a issue with ref to the above discussion. I have created a JMS client which refrences weblogic classes. And loaded that client on the oracle. I have also created the procle wrapper procedure for the same. But when i execute it gives me Class not found exception. Do i need to load the weblogic.jar into oracle ????