Forum Stats

  • 3,876,074 Users
  • 2,267,056 Discussions
  • 7,912,419 Comments

Discussions

loadjava in Oracle DB

Hi there!

Need you expertise.

Oracle JVM Version - 1.6.0_211

Oracle Client DB  - 12.1.0.2 v

I've loaded a custom jar into Oracle DB at remote server using DBMS_JAVA.loadjava API, so that I can  execute java thru plsql stored procedure. I am not able to compile the java source using APPS schema. It is giving me the compilation error with msg - [Error] ORA-29534 (0: 0): ORA-29534: referenced object APPS.com/aspose/cells/Workbook could not be resolved

Here is the code...

CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "xx_java_file"

   AS

import com.aspose.cells.Workbook;

import com.aspose.cells.FileFormatType;

class xx_java_file {

     public static String doOperation() throws Exception{

                 Workbook wb = new  Workbook("/apps/orarpt/utl/input_excel.xls");                     //        /apps/orarpt/utl/ is a DB utl directory.

                 wb.save("/apps/orarpt/utl/"+output_excel.xlsb,FileFormatType.XLSB);

                 return "Success";

        }

}

Further compile too didn't help.

alter java class "com/aspose/cells/Worksheet"  resolve

Upon further check...USER_ERROR..some of JAR classes are in INVALID status.

pastedImage_2.png

Can you help me in knowing what is missing & how to resolve the issue.

Br,

-Rajesh