ORA-29534: referenced object cannot be resolved (Loadjava) error

7.6k Views Asked by At

I apologize if this has been answered before but Ii'm stuck with this problem.

Here it goes: I have a Java program the creates an Excel workbook and writes data to it, the Java program works fine, I'm trying to import the program into Oracle using the LOADJAVA utility with the resolve option but I keep getting this error:

ORA-29534: referenced object HR.org/apache/poi/hssf/usermodel/HSSFWorkbook could not be resolved 
The following operations failed

I previously loaded all necessary jar files using the LOADJAVA utility including poi-3.8-20120326, poi-ooxml-3.8-beta5 ,poi-ooxml-schemas-3.8-20120326,xmlbeans-2.3.0 ,dom4j-1.6.1.

Has anyone encountered this, can you tell me how to resolve this? I appreciate your assistance.

3

There are 3 best solutions below

0
On

I had the same problem. The solution for me was to take out the -synonym argument in the laodjava command;

it was erroring "...referenced object could not be resolved" when i ran the load command as /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/loadjava -verbose -synonym -resolve -user sys/pwd -grant public -fileout log_sys_public.txt org.apache.pdfbox.jar

No more errors when /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/loadjava -verbose -genmissing -resolve -user sys/pwd -grant public -fileout log_sys_public.txt org.apache.pdfbox.jar

I have added the -genmissing argument because I was attempting to find the problem, but i don't thing it has an impact.

Hope this will help others as well

0
On

The "could not be resolved" means the class in question won't compile. Mostly likely because one of those other jars itself couldn't be resolved. Did you check the LOADJAVA output for those jars too? You might have other ORA-29534 errors and perhaps one or more ORA-29521 errors: that one's helpful because it will point to some dependent class which you haven't loaded.

Alternatively you could try the -genmissing argument when you call LOADJAVA. Find out more.

0
On

I did run the same LOADJAVA command twice and it worked on the second time without errors!