Bug 269561 - jpa/customfeatures model failed with "org.eclipse.persistence.exceptions.ConversionException" on WebSphere 7.0.0.1
Summary: jpa/customfeatures model failed with "org.eclipse.persistence.exceptions.Conv...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 14:39 EDT by Yiping Zhao CLA
Modified: 2022-06-09 10:35 EDT (History)
1 user (show)

See Also:


Attachments
proposed changes (5.74 KB, patch)
2009-11-27 10:25 EST, Tom Ware CLA
no flags Details | Diff
Proposed changes (3.68 KB, patch)
2009-11-27 10:35 EST, Tom Ware CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yiping Zhao CLA 2009-03-20 14:39:01 EDT
All tests in CustomFeaturesJUnitTestSuite.java under trunk\foundation\eclipselink.extension.oracle.test\src\org\eclipse\persistence\testing\tests\jpa\customfeatures failed on WebSphere 7.0.0.1 with following exception:

[3/20/09 14:24:35:562 EDT] 0000001d SystemOut     O [EL Warning]: 2009-03-20 14:24:35.562--UnitOfWork(1693082858)--Thread(Thread[ORB.thread.pool : 0,5,main])--Local Exception Stack: 
Exception [EclipseLink-3002] (Eclipse Persistence Services - 2.0.0.20090313-SNAPSHOT): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [?], of class [class java.lang.Character], from mapping [org.eclipse.persistence.mappings.DirectToFieldMapping[empNChar-->CUSTOM_FEATURE_EMPLOYEE.NCHARTYPE]] with descriptor [RelationalDescriptor(org.eclipse.persistence.testing.models.jpa.customfeatures.Employee --> [DatabaseTable(CUSTOM_FEATURE_EMPLOYEE)])], could not be converted to [class org.eclipse.persistence.platform.database.oracle.NString].
	at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConverted(ConversionException.java:71)
	at org.eclipse.persistence.internal.helper.ConversionManager.convertObject(ConversionManager.java:162)
	at org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.convertObject(DatasourcePlatform.java:151)
	at org.eclipse.persistence.platform.database.oracle.Oracle9Platform.convertObject(Oracle9Platform.java:329)
	at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getFieldValue(AbstractDirectMapping.java:713)
	at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.writeFromObjectIntoRow(AbstractDirectMapping.java:1126)
	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildRow(ObjectBuilder.java:898)
	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildRow(ObjectBuilder.java:886)
	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:426)
	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:286)
	at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:664)
	at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:583)
	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:110)
	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:86)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2697)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1187)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1171)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1131)
	at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:195)
	at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:103)
	at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3189)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1277)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:468)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1373)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2961)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:224)
	at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157)
	at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
	at com.ibm.tx.jta.RegisteredSyncs.coreDistributeBefore(RegisteredSyncs.java:289)
	at com.ibm.ws.tx.jta.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:150)
	at com.ibm.ws.tx.jta.TransactionImpl.prePrepare(TransactionImpl.java:2252)
	at com.ibm.ws.tx.jta.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:488)
	at com.ibm.tx.jta.TransactionImpl.processCommit(TransactionImpl.java:978)
	at com.ibm.tx.jta.TransactionImpl.commit(TransactionImpl.java:913)
	at com.ibm.ws.tx.jta.TranManagerImpl.commit(TranManagerImpl.java:369)
	at com.ibm.tx.jta.TranManagerSet.commit(TranManagerSet.java:161)
	at com.ibm.ws.tx.jta.UserTransactionImpl.commit(UserTransactionImpl.java:293)
	at com.ibm.ejs.container.UserTransactionWrapper.commit(UserTransactionWrapper.java:305)
	at org.eclipse.persistence.testing.framework.server.JEEPlatform.commitTransaction(JEEPlatform.java:74)
	at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.commitTransaction(JUnitTestCase.java:209)
	at org.eclipse.persistence.testing.tests.jpa.customfeatures.CustomFeaturesJUnitTestSuite.testBatchInserts(CustomFeaturesJUnitTestSuite.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:599)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBareServer(JUnitTestCase.java:396)
	at org.eclipse.persistence.testing.framework.server.TestRunnerBean.runTest(TestRunnerBean.java:87)
	at org.eclipse.persistence.testing.framework.server.EJSRemote0SLTestRunner_ed643271.runTest(EJSRemote0SLTestRunner_ed643271.java)
	at org.eclipse.persistence.testing.framework.server._EJSRemote0SLTestRunner_ed643271_Tie.runTest(_EJSRemote0SLTestRunner_ed643271_Tie.java)
	at org.eclipse.persistence.testing.framework.server._EJSRemote0SLTestRunner_ed643271_Tie._invoke(_EJSRemote0SLTestRunner_ed643271_Tie.java)
	at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)
	at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)
	at com.ibm.rmi.iiop.ORB.process(ORB.java:504)
	at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
	at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2771)
	at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2640)
	at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
	at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Comment 1 Yiping Zhao CLA 2009-04-14 16:16:16 EDT
changed Severity to "major" because EclipseLink should support this NChar oracle specific feature as described in UserGuide, but it didn't work on WebSphere now.
Comment 2 Tom Ware CLA 2009-11-27 10:25:22 EST
Created attachment 153248 [details]
proposed changes
Comment 3 Tom Ware CLA 2009-11-27 10:27:06 EST
Changes attached will solve this test case.

A separate bug will be entered to address similar issues with DirectCollection and DirectMap
Comment 4 Tom Ware CLA 2009-11-27 10:35:21 EST
Created attachment 153249 [details]
Proposed changes
Comment 5 Tom Ware CLA 2009-11-27 11:21:19 EST
Fix makes it so FieldClassification set at Predeploy time is set by class name and converted to a class by the real classloader

reviewed by Guy Pelletier

Fix makes broken tests pass

Also tested with full JPA and Core LRG
Comment 6 Doug Clarke CLA 2009-11-27 13:57:51 EST
Moving bugs previously targeted for 1.1.X that are resolved to 1.1.3
Comment 7 Tom Ware CLA 2009-12-14 14:47:44 EST
fixing target
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:35:51 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink