EJB programming & troubleshooting: Call to packed Java stored procedure in Oracle 8i
- Posted by: VIJAY KHANNA
- Posted on: February 03 2003 05:46 EST
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
CREATE OR REPLACE PACKAGE BODY po_mgr AS
PROCEDURE sendMessage AS LANGUAGE JAVA
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.
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:
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 ????