openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fay Wang (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1726) Clean up OpenJPA test case failures for PostgreSQL
Date Mon, 19 Jul 2010 22:59:49 GMT


Fay Wang commented on OPENJPA-1726:

The following four OpenJPA test cases fail with the same error:


Caused by: <openjpa-2.1.0-SNAPSHOT-rexported fatal general error> org.apache.openjpa.persistence.PersistenceException:
ERROR: invalid byte sequence for encoding "UTF8": 0x00. Hint: This error can also happen if
the byte sequence does not match the encoding expected by the server, which is controlled
by "client_encoding".

This error is caused by the two auto-generated uuid values (uuidstring and uuidT4string) In
the entity, org.apache.openjpa.persistence.generationtype.GeneratedValues:  

    private String uuidstring;

    private String uuidT4string;

These two fields are populated in a way that org.apache.openjpa.lib.util.UUIDGenerator first
randomly generates byte[] and then converts it to a String using charset "ISO-8859-1". The
resulting string may contain 0x00, causing invalid byte sequence for encoding "UTF8": 0x00.
The failures are not deterministic as the UUID values are randomly generated. One way to fix
this problem is to exclude Postgres from running these four test cases. Any comments are welcome.

> Clean up OpenJPA test case failures for PostgreSQL
> --------------------------------------------------
>                 Key: OPENJPA-1726
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>            Priority: Minor
>         Attachments: OPENJPA-1726-2.patch, OPENJPA-1726.patch

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message