Skip to main content
Solved

Error at AttributeDecompressor


javier_
Contributor
Forum|alt.badge.img+9

Hi, I have compress a text with AttributeCompressor and stored it in an XML file. The text should be a password, so I don't want to store it as plain text. Then, I read the XML file and try to decompress the password with AttrributeDecompressor. But I only get this:

12023-12-15 14:31:40|   0.6|  0.0|ERROR |@CompressAttributes: The 'Compressed-table.Compressed.password' attribute could not be decompressed

By the moment, I'm only compressing, not enconding. But I cannot make it work.

I'm using FME Desktop 2022. I'm attaching both workbenches, (compress and decompress), the xml written by the first and readed by the second, and the logs of my execution.

Thank you for your help.

Best regards.

Best answer by saraatsafe

saraatsafe wrote:

Hi @rscsevilla​, I've filed this as an issue and included your .zip for our developers to take a closer look (internal reference: FMEENGINE-81347). I'll post any updates here. Please let me know if you have any other questions about this!

Hi @rscsevilla​, I have an update on this issue: this doesn't seem to be a bug. 

Your input value gets compressed into a binary blob via the AttributeCompressor, and when this is written to XML, it's converted to a hexadecimal string value. When the XML value is read back in, it becomes a UTF-16 encoded string value which does not match the value of the binary blob and therefore causes the AttributeDecompressor to fail. 

 

Normally, you can get around this by converting the hexadecimal string back to a binary blob using a BinaryDecoder, however there seems to be a bug with with the BinaryDecoder which has been filed (internal reference: FMEENGINE-81399). 

 

You can instead use an AttributeEncoder as a workaround for the bug, followed by the BinaryDecoder. Please see the attached workspace for reference. 

I hope this helps and please let me know if you have any other questions! 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

saraatsafe
Safer
Forum|alt.badge.img+11
  • Safer
  • December 15, 2023

Hi @rscsevilla​, I've filed this as an issue and included your .zip for our developers to take a closer look (internal reference: FMEENGINE-81347). I'll post any updates here. Please let me know if you have any other questions about this!


saraatsafe
Safer
Forum|alt.badge.img+11
  • Safer
  • Best Answer
  • January 2, 2024
saraatsafe wrote:

Hi @rscsevilla​, I've filed this as an issue and included your .zip for our developers to take a closer look (internal reference: FMEENGINE-81347). I'll post any updates here. Please let me know if you have any other questions about this!

Hi @rscsevilla​, I have an update on this issue: this doesn't seem to be a bug. 

Your input value gets compressed into a binary blob via the AttributeCompressor, and when this is written to XML, it's converted to a hexadecimal string value. When the XML value is read back in, it becomes a UTF-16 encoded string value which does not match the value of the binary blob and therefore causes the AttributeDecompressor to fail. 

 

Normally, you can get around this by converting the hexadecimal string back to a binary blob using a BinaryDecoder, however there seems to be a bug with with the BinaryDecoder which has been filed (internal reference: FMEENGINE-81399). 

 

You can instead use an AttributeEncoder as a workaround for the bug, followed by the BinaryDecoder. Please see the attached workspace for reference. 

I hope this helps and please let me know if you have any other questions! 


javier_
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • January 5, 2024

Ok, thank you. Now it's clear for me how it works. Thank you very much for your help.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings