Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Exclamation Unanswered: URGENT


    I am using PostgreSQL 7.2 on windows 2000. I am working on a java application and I am encrypting an object and saving it to my database.
    Here is exacltly what I am doing:

    1. I encrypt an array using a SealedObject
    2. Then I encode this SealedObject with BASE64 Encoder
    3. The BASE64 Encoder converts my SealedObject to a large String and I save it to the db. I store it as "bytea"
    4. I then retrieve this String from the db when I want it and I Decode it using BASE64 Decoder
    5. I now have a SealedObject that I can unseal and be left with my original Array

    My problem is that when I retrieve my String from the Database and try to Decode it I get the following exception:
    at$BlockDataInputStream.rea dUTFSpan(
    at$BlockDataInputStream.rea dUTFBody(

    If I don't put the String into the database and decode it it works fine. So it looks as if somethingis happening to my String when I retrieve it from my database.

    Could Postgres being storing my String in some way that I am losing some of the data?

    I'd appreciate and help with this,



  2. #2
    Join Date
    Feb 2004

    Re: URGENT

    I have looked at this further and found that the the String that I isert into the database is different from the one that I retrieve. The first line of characters is the same but after that they are different.

    Does anyone have any idea why this String would change after being stored in Postgres?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts