Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351260

Summary: [DB] [PostgreSQL] Exception when persisting EChar attribute with default '\u0000' value
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.dbAssignee: Stefan Winkler <stefan>
Status: CLOSED WONTFIX QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3    
Version: 4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Eike Stepper CLA 2011-07-06 01:52:55 EDT
Cloned from: 350137: [DB] [PostgreSQL] Exception when persisting EChar attribute with default '\u0000' value
https://bugs.eclipse.org/bugs/show_bug.cgi?id=350137

Build Identifier: 20110218-0911

It seems that if the default value on an EChar attribute is not set, or if it is set to '\u0000' that CDO cannot persist the object due to an "invalid byte sequence for encoding 'UTF8': 0x00" error.  This may be specific to only a PostgreSQL datastore, but I am unable to test with other datastore implementations at this time. 

Details of this bug have been discussed in the forums: http://www.eclipse.org/forums/index.php/t/215023/

Reproducible: Always

Steps to Reproduce:
1. Configure PostgreSQL as the CDO datastore
2. Generate an ECore model with an object consisting of an EChar attribute.  Do not set its default attribute.
3. Instantiate the object with the EChar attribute, but do not change the EChar attribute's value.
4. Commit the object via CDO.
Comment 1 Eike Stepper CLA 2011-07-06 01:54:05 EDT
Stefan, when you apply the patch fro bug 350137 (4.1) please do not forget to decrease the plugin version from 4.0.100 to 4.0.1 !
Comment 2 Eike Stepper CLA 2012-06-05 07:30:54 EDT
Moving all open bug reports to 4.1 because the release is very near and it's hghly unlikely that there will be spare time to address 4.0 problems.

Please make sure that your patches can be applied against the master branch and that your problem is not already fixed there!!!
Comment 3 Eike Stepper CLA 2012-08-14 22:58:01 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 4 Eike Stepper CLA 2013-05-20 03:02:11 EDT
4.2 is very near. No maintenance for 4.1 anymore. Please follow bug 350137.