Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-20633

Cannot write some EXIF metadata with PostgreSQL

    XMLWordPrintable

    Details

      Description

      1. for faster reproduction please use the attached studio project
      2. create a document of type HisomaFile
      3. attach the file available picture here:
      4. https://jira.nuxeo.com/secure/attachment/57671/Ce%CC%81lende%CC%81ris_t_1.jpg
      5. this gives the following trace:
        Caused by: org.nuxeo.ecm.core.api.NuxeoException: Could not insert: INSERT INTO "image_metadata" ("id", "color_space", "user_comment", "image_description", "date_time_original", "focal_length", "white_balance", "copyright", "fnumber", "pixel_xdimension", "equipment", "orientation", "exposure_time", "xresolution", "iso_speed_ratings", "icc_profile", "yresolution", "pixel_ydimension", "focallength") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
        	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:576)
        	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:478)
        	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:447)
        Caused by: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
                at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
                at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
                ... 153 more
        
      6. the issue is specific to PgSQL and does not happen with embedded H2 or OracleDB

      The problem is that 0x00 characters are embedded in the comment field, and writing a text field with 0x00 characters is forbidden on PostgreSQL.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h