openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benno Huber (JIRA)" <>
Subject [jira] [Created] (OPENJPA-2362) Conversion of data type CHAR and CHAR_OBJ to XML not valid for character values < 0x20
Date Fri, 29 Mar 2013 23:17:15 GMT
Benno Huber created OPENJPA-2362:

             Summary: Conversion of data type CHAR and CHAR_OBJ to XML not valid for character
values  <  0x20
                 Key: OPENJPA-2362
             Project: OpenJPA
          Issue Type: Bug
          Components: xml store
    Affects Versions: 2.3.0
         Environment: independent
            Reporter: Benno Huber

Saving data with char values below 0x20 will throw runtime execption next time should be retrieved
(Stack trace below).

Code for XMLFileHandler starting line 309 should be modified like this:

            case JavaTypes.CHAR:
            case JavaTypes.CHAR_OBJ:
                // quote chars so we can distinguish whitespace chars; special
                // case for \0
                char c = ((Character) val).charValue();
                // according to W3C spec (
                // no characters below 0x20 are allowed on document
                // execpt tab, lf and cr
                if (c <32)
                    out.write("0x" + Integer.toHexString((int)c));

<openjpa-2.3.0-SNAPSHOT-runknown nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
Ung├╝ltiges XML-Zeichen (Unicode: 0x1) wurde im Elementcontent des Dokuments gefunden.
	at org.apache.openjpa.xmlstore.XMLFileHandler.load(
	at org.apache.openjpa.xmlstore.XMLStore.getMap(
	at org.apache.openjpa.xmlstore.XMLStore.getData(
	at org.apache.openjpa.xmlstore.XMLStoreManager.executeExtent(

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message