2 Replies Latest reply: May 6, 2011 3:04 PM by 586942 RSS

    Cannot access java classes imported with loadjava

      I am using Oracle 11.2 64-bit on Linux. I followed the tutorial from http://www.orafaq.com/forum/t/88387/2/ in order to test how to access Excel documents from Oracle Database.

      I created user java_test and granted dba right.

      Then I loaded jar file into the database.

      loadjava -v -r -u java_test/pass@sid  -r jxl.jar  -d -g Public

      The classes from jar file loaed to chema test_java any without errors.

      After that I created createReport, which uses the procedures from the loaded jar jxl.jar

      create or replace and compile java source named createReport as

      import jxl.Workbook;
      import jxl.write.Label;
      import jxl.write.WritableSheet;
      import jxl.write.WritableWorkbook;
      import java.io.File;

      +public class createReport {+
      private static String filePath;
      +(the full code is in the link above)+

      However the procedure compiles with error:

      Error: cannot access jxl.Workbook
      Line: 4
      Text: import jxl.Workbook;

      What can be wrong?

        • 1. Re: Cannot access java classes imported with loadjava
          On Database it is working fine. I have no access problems


          Edited by: groxy on Jun 15, 2010 5:05 AM
          • 2. Re: Cannot access java classes imported with loadjava
            For those that run into this post in the archives -

            I just ran into this today trying to upgrade our jexcelapi. The problem is that the official builds of jexcelapi from 2.6.11 and onwards are compiled with a Java version higher than Oracle 11 (both .1 and .2) can support.

            Do a dropjava on the "bad" build that you loadjava'd, then go here:


            join the yahoo group, and download


            from the Files section. loadjava that and Bob's your uncle. Enjoy.