Community
Participate
Working Groups
Build Identifier: 2.0.2 Entity A having one of the field as char(1). Set eclipselink.weaving property to true in persistence.xml. Fetch a row from database using em.find(TestEntity.class, 1L) with char value in database as ' ' (space). It will throw NullPointerException in _persistence_set() method. java.lang.NullPointerException at test.TestEntity._persistence_set(Unknown Source) at org.eclipse.persistence.internal.descriptors.PersistenceObjectAttributeAccess or.setAttributeValueInObject(PersistenceObjectAttributeAccessor.java:46) at org.eclipse.persistence.mappings.DatabaseMapping.setAttributeValueInObject(Da tabaseMapping.java:1368) at org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject(Databa seMapping.java:1259) Reproducible: Always Steps to Reproduce: 1. Unzip enclosed testcase.zip 2. Load JPA project in eclipse. 3. Change persistence.xml to change database details. 4. Change variables in project classpath.e.g., eclipselink.jar location, javax.persistence jar location, junit jar and driver jar. 5. Run CreateTestData class to create the table and insert data. 6. Run TestCase junit test with weaving enabled by adding following in VM arguments to notice NPE. -javaagent:D:/EclipseLink/main/trunk/eclipselink.jar -Declipselink.weaving.output.path=D:\tmp-weaving -Declipselink.weaving.overwrite.existing=true
Created attachment 188211 [details] Testcase
Created attachment 188291 [details] Patch with testcase included.
Created attachment 188494 [details] Patch with minor changes including testcase
Checked into trunk (2.3) at revision: 8951
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink