Skip to Main Content

SQL & PL/SQL

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!

Uncompression data error when attempting to use UTL_COMPRESS.LZ_UNCOMPRESS to get to the XML text 'p

user543335Dec 11 2014 — edited Dec 16 2014

Hi, really would appreciate any pointers anyone may have with what I'm trying to do here .... the gist of the issue I'm having is as follows:

* Trying to get to the zipped/compressed contents of a BLOB column directly in PL/SQL

* The uncompressed data is XML ... below is a pretty-pinked example of this ..

<?xml version="1.0"?>

<!DOCTYPE TaskConfiguration>

<TaskConfiguration>

\<MapKeySet>

    \<MapKey Type="C">

        \<Key>NameSpace\</Key>

        \<Value>B\_O\_BrokerChks\</Value>

    \</MapKey>

\</MapKeySet>

</TaskConfiguration>

* I learnt about the info in the all_directories table from these pages & used + a hacked ver of WRITEBLOBTOFILE proc (also from here) to get this data to a zip file. That worked fine and I can open resultant file with 7-zip or Explorer (how I got the above sample)

* I've tried a few tweaks to functions supplied here to try and get to the data directly in pl/sql (ideally I'd like to be able to get it into an XMLTYPE datatype & query that). However that's where I'm battling

* I keep getting the same error as I do with this 1-liner

 SELECT UTL\_COMPRESS.LZ\_UNCOMPRESS( XML ) FROM FooBooBazVendorTab where REFERENCE\_ID = 19834

ORA-29294: A data error occurred during compression or uncompression.

ORA-06512: at "SYS.UTL_SYS_COMPRESS", line 56

ORA-06512: at "SYS.UTL_SYS_COMPRESS", line 226

ORA-06512: at "SYS.UTL_COMPRESS", line 89

29294. 00000 - "A data error occurred during compression or uncompression."

*Cause: An error occurred while compressing or uncompressing input source.

*Action: Verify that source data is a valid compressed or uncompressed data set.

* @desc info for the XML BLOB col is as follows

pastedImage_1.png

* I've also read a 'UTL_COMPRESS.LZ_UNCOMPRESS cannot handle gzip file with FCOMMENT' thread here and tried the potential workaround there that tries to manipulate the blob contents to remove the FCOMMENT ... but to no avail. Must say that I'm not certain that this is actually my problem.

* The info on the Zip file that I can glean from 7-Zip is as follows ...

pastedImage_2.png

* Any ideas please? (Could it be that Oracle's uncompress may have a problem handling the XML data itself ... with my thinking about the FCOMMENT being a bit of a furphy?)

* Not sure if hexview of the zip file may help, but just in case ==>

pastedImage_3.png

I'd be very grateful for any help you may be able to give me with this.

Rgds Neil

This post has been answered by BluShadow on Dec 11 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2015
Added on Dec 11 2014
8 comments
4,514 views