Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Load XML file using loadjava results in LONG RAW sys.IDL_UB1$.PIECE column with "garbage"

MarcioRMFeb 8 2023

Hello all

I'm working in an application upgrade from 9.2.0.4.0 to 19.3.0.0.0 Oracle version and this application have some JAVA CLASSES / JAVA SOURCES and one (only one) JAVA RESOURCE that is making me losing my sleeping nights.

This JAVA RESOURCE is a XML file loaded into the database using loadjava command below:

loadjava -user user/pwd@host:port:service -t -resolve -verbose -force -schema schema segments_outbound.xml

If I do exactly the same command in an Oracle 9i the contents in column PIECE in table sys.IDL_UB1$ are "clear", I got this information using the following query (using PL/SQL Developer from Allround Automations):

select o.owner#, o.NAME, O.TYPE#, i.PIECE
  from sys.obj$ o, sys.IDL_UB1$ i
 where o.obj# = i.obj#
   and name like '%outbound%';

And the PIECE column contents from Oracle 9 are:

If I do exactly the same in the Oracle 19c I got the results below:

These specials characters/trash in the first line are causing errors when the application java classes tries to load this XML data to use as configuration for the process, I have tryed a lot of another ways in Java to load this contents without success and I really apreciatte any clues about this situation.

Any other information that could be missing just ask me, thanks in advance.

This post has been answered by MarcioRM on Feb 21 2023
Jump to Answer
Comments
Post Details
Added on Feb 8 2023
1 comment
513 views