Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337143 - on Postgresql, in test-jpa, 6 tests failed with invalid byte sequence for encoding "UTF8"
Summary: on Postgresql, in test-jpa, 6 tests failed with invalid byte sequence for enc...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: postgresql
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 11:47 EST by Praba Vijayaratnam CLA
Modified: 2022-06-09 10:35 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Praba Vijayaratnam CLA 2011-02-14 11:47:19 EST
Test Env:
---------

EL 2.3.0.v20110210-r8951 (Started to fail with this)
JDK 1.5.0_22
RHLinux 64-bit

Following tests failed, seems to be code bug:
---------------------------------------------
org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite.testCharFieldDefaultNullValue
org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJunitTest.testGF1818
org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedJunitTest.testStringArrayField
org.eclipse.persistence.testing.tests.jpa.fieldaccess.advanced.EntityManagerJUnitTestSuite.testCharFieldDefaultNullValue
org.eclipse.persistence.testing.tests.jpa.fieldaccess.advanced.AdvancedJunitTest.testGF1818
org.eclipse.persistence.testing.tests.jpa.fieldaccess.advanced.AdvancedJunitTest.testStringArrayField
---------------

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110210-r8951): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 Error Code: 0 Call: INSERT INTO CMP3_VEGETABLE (COST, TAGS, TYPE, vegetable_color, vegetable_name) VALUES (?, ?, ?, ?, ?) bind => [5 parameters bound] Query: InsertObjectQuery(Vegetable[id=VegetablePK [id=Capsicum - Green]])

javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110210-r8951): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
Error Code: 0
Call: INSERT INTO CMP3_VEGETABLE (COST, TAGS, TYPE, vegetable_color, vegetable_name) VALUES (?, ?, ?, ?, ?)
bind => [5 parameters bound]
Query: InsertObjectQuery(Vegetable[id=VegetablePK [id=Capsicum - Green]])
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.commitTransaction(JUnitTestCase.java:311)
at org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite.testCharFieldDefaultNullValue(EntityManagerJUnitTestSuite.java:11037)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:503)
at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248)
at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208)
at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110210-r8951): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
Error Code: 0
Call: INSERT INTO CMP3_VEGETABLE (COST, TAGS, TYPE, vegetable_color, vegetable_name) VALUES (?, ?, ?, ?, ?)
bind => [5 parameters bound]
Query: InsertObjectQuery(Vegetable[id=VegetablePK [id=Capsicum - Green]])
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1460)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:804)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:872)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:591)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:534)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1702)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:234)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:342)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:162)
at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:177)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:465)
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:287)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:807)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:709)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2840)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1501)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1483)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1443)
at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:224)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:123)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3739)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1404)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:621)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1490)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:264)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1132)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
Caused by: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:797)
Comment 1 James Sutherland CLA 2012-06-05 14:19:50 EDT
was an issue with Vegetable init char to 0, which is an invalid ascii char, fixed to default to '0'.

See bug#321649 for patch file.
Comment 2 James Sutherland CLA 2012-06-19 11:27:08 EDT
fixed
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:49 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:35:40 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink