3 Replies Latest reply on Feb 18, 2003 11:48 PM by Michael Ward

    Data corrupted when entitybean update data (oracle 9.2driver

    Colin Li Newbie

      When we tried to update data(String -->VARCHAR2) by using entity beans through oracle9.2.0.1 driver connected oracle8i database, we met data corrupt problem. E.g.:
      We tried to update a string to a new string: 1111111, we got:@1111 ( HEX: 0C 17 40 31 31 31 31 ). I wrote a small standalone application to test it outside jboss and it worked fine. Oracle 8i driver works ok either. I also found jboss(3.0.4) used UTF-8 characters and guess oracle9.2.0.1 driver might use UTF-16 characters.(I don't kown. Just a guess...). If so, is it a cause of the problem? Anyway to switch JBOSS to UTF-16 characters? Any ideas are really appreciated!

        • 1. Re: Data corrupted when entitybean update data (oracle 9.2dr
          Colin Li Newbie

          Opps: missing the first char in the corrupted data string.
          ( Textpad can't display it. )

          actually, it's:

          111111 ----- >@1111

          I also find it's allways the first three characters in a string are corrupted. Updating DATE type data through jboss by using oracle driver is ok.



          • 2. Re: Data corrupted when entitybean update data (oracle 9.2dr
            Colin Li Newbie

            Curious. The first char still can't be pasted in the post.
            It just can't be displayed. it is 0C in hex.

            • 3. Re: Data corrupted when entitybean update data (oracle 9.2dr
              Michael Ward Newbie

              were you able to find a resolution to your issue? We have experienced a similiar problem. This problem appears to be an Oracle bug, not a JBoss issue. We have a quick fix, but I'm not to happy with it.

              We have been able to recreate the issue simply by the order of the parameters in a SQL UPDATE statement. For example if the last parameter is of type TIMESTAMP, the column value preceeding the TIMESTAMP will be corrupted. Example:


              So in order to resolve the issue, reorder the SQL statement (TIMESTAMP not last parameter). In the case of a CMP entity bean, change the order <cmp-field> nodes in the jbosscmp-jdbc.xml file.

              - We have been able to recreate this issue with any driver after Oracle 9.0.1
              - the example provided is a brief example, I can post a detailed example if requested.

              Does anyone have any more details or a solution to this problem?