persistence@glassfish.java.net

Re: entity persistence update

From: Michael Bouschen <Michael.Bouschen_at_Sun.COM>
Date: Fri, 03 Mar 2006 20:46:46 +0100

Hi Tom, hi Gordon,

I'm running into two issues after updating my workspace:
- The testcase multipleParameterTest in entity-persistence-tests fails
throwing an IllegalStateException saying: "Attempting to execute an
operation on a closed EntityManager.". You find my testsresults.txt file
attached below.
- EJBQL aggregate queries using AVG, SUM or COUNT return the correct
value of the wrong type, e.g. "SELECT COUNT(o) FROM Order o" returns a
BigDecimal instance instead of a Long.

Do you have an idea? Is there anything wrong with my environment?

Regards Michael

> Issue number: entity-persistence-updates
> Obtained from: TopLink
> Submitted by: Tom Ware
> Reviewed by: TopLink team
>
> -Handling of Persistence Unit defaults for schema and catalog, part 2
> and now complete. Includes cleanup of logging messages, code
> re-factoring and cleanup.
> -Handling of Persistence Unit defaults for schema and catalog, part 1.
> Includes cleanup of logging messages, code re-factoring and cleanup.
> delayed ejbql query parsing till login to add constructor expression
> support for inheritance
> -em close method behaviour changed: if em associated with an active
> transaction then closure postponed until the transaction completes.
> --added FETCH JOIN support to TopLink Report Queries
> Fixed an error in the metadata complete test.
> -Refactored TopLink Weaving
>
> Tested with full GlassFish build, QuickLook tests, entity-persistence
> tests, oracle-internal tests and ejb 3 persistence dev tests
>



Testsuite: oracle.toplink.essentials.testing.tests.FullRegressionTestSuite
Tests run: 309, Failures: 0, Errors: 1, Time elapsed: 46.516 sec

Testcase: testNamedNativeQuery took 0.016 sec
Testcase: testPersistThenRemoveCalls took 0.187 sec
Testcase: testRemoveUnmanagedNewEntity took 0.063 sec
Testcase: testPersistOnRegisteredObject took 0.062 sec
Testcase: testPreUpdateEvent_UpdateAltered took 0.063 sec
Testcase: testPreUpdateEvent_UpdateReverted took 0.062 sec
Testcase: testRefreshNotManaged took 0.015 sec
Testcase: testRefreshRemoved took 0.047 sec
Testcase: testContainsRemoved took 0.032 sec
Testcase: testFlushModeEmAutoQueryCommit took 0.015 sec
Testcase: testFlushModeEmAuto took 0.031 sec
Testcase: testFlushModeEmAutoQueryAuto took 0.032 sec
Testcase: testFlushModeEmCommitQueryCommit took 0.015 sec
Testcase: testFlushModeEmCommit took 0.016 sec
Testcase: testFlushModeEmCommitQueryAuto took 0.031 sec
Testcase: testFlushModeOnUpdateQuery took 0.063 sec
Testcase: testSubString took 0.078 sec
Testcase: testDatabaseSyncNewObject took 0 sec
Testcase: testTransactionRequired took 0.015 sec
Testcase: testIgnoreRemovedObjectsOnDatabaseSync took 0.11 sec
Testcase: testREADLock took 0.047 sec
Testcase: testPersistRemoved took 0.765 sec
Testcase: testRemoveFlushPersistContains took 0.032 sec
Testcase: testRemoveFlushFind took 0.046 sec
Testcase: testFindWithWrongTypePk took 0 sec
Testcase: testCheckVersionOnMerge took 0.016 sec
Testcase: testClear took 0 sec
Testcase: testExtendedPersistenceContext took 0.281 sec
Testcase: testReadTransactionIsolation_CustomUpdate took 0.047 sec
Testcase: testReadTransactionIsolation_CustomUpdate_Flush took 0.047 sec
Testcase: testReadTransactionIsolation_CustomUpdate_Refresh took 0.047 sec
Testcase: testReadTransactionIsolation_CustomUpdate_Refresh_Flush took 0.047 sec
Testcase: testReadTransactionIsolation_UpdateAll took 0.062 sec
Testcase: testReadTransactionIsolation_UpdateAll_Flush took 0.063 sec
Testcase: testReadTransactionIsolation_UpdateAll_Refresh took 0.062 sec
Testcase: testReadTransactionIsolation_UpdateAll_Refresh_Flush took 0.063 sec
Testcase: testReadTransactionIsolation_OriginalInCache_CustomUpdate took 0.031 sec
Testcase: testReadTransactionIsolation_OriginalInCache_CustomUpdate_Flush took 0.047 sec
Testcase: testReadTransactionIsolation_OriginalInCache_CustomUpdate_Refresh took 0.047 sec
Testcase: testReadTransactionIsolation_OriginalInCache_CustomUpdate_Refresh_Flush took 0.062 sec
Testcase: testReadTransactionIsolation_OriginalInCache_UpdateAll took 0.047 sec
Testcase: testReadTransactionIsolation_OriginalInCache_UpdateAll_Flush took 0.047 sec
Testcase: testReadTransactionIsolation_OriginalInCache_UpdateAll_Refresh took 0.063 sec
Testcase: testReadTransactionIsolation_OriginalInCache_UpdateAll_Refresh_Flush took 0.062 sec
Testcase: testFindDeleteAllPersist took 0.094 sec
Testcase: testWRITELock took 0.031 sec
Testcase: testEMFWrapValidationException took 0.359 sec
Testcase: testEMDefaultTxType took 0.625 sec
Testcase: testClose took 0 sec
Testcase: testBeginTransactionClose took 0 sec
Testcase: testInheritanceNoDiscriminatorColumn took 0.015 sec
Testcase: testComplicateResultWithInheritance took 0.172 sec
Testcase: testRefresh took 0.141 sec
Testcase: testBindParameters took 0.062 sec
Testcase: testBindParametersWithPostitional took 0.016 sec
Testcase: testSimpleInheritance took 0.031 sec
Testcase: testPessimisticLocking took 0.016 sec
Testcase: testComplicateResults took 0.031 sec
Testcase: testProjectJoinTeamMembers took 0.5 sec
Testcase: testProjectJoinTeamLeaderJoinAddressWhereTeamLeaderNotNull took 0.703 sec
Testcase: testProjectJoinTeamMembersJoinAddress took 0.453 sec
Testcase: testProjectOuterJoinTeamMembersJoinAddress took 0.453 sec
Testcase: testProjectOuterJoinTeamMembersOuterJoinAddress took 0.438 sec
Testcase: testProjectJoinTeamMembersOuterJoinAddress took 0.531 sec
Testcase: testProblemReporterProjectJoinTeamMembersJoinAddress took 0.344 sec
Testcase: testEmployeeJoinProjects took 0.406 sec
Testcase: testEmployeeJoinProjectsJoinTeamLeaderJoinAddressWhereManagerIsNull took 0.328 sec
Testcase: testProjectOuterJoinTeamLeaderAddressTeamMembersAddressPhonesWhereProjectName took 0.406 sec
Testcase: testEmployeeOuterJoinAddressPhoneProjectsTeamLeaderAddressTeamMembersPhones took 0.672 sec
Testcase: testEmployeeJoinManagerAddressOuterJoinManagerAddress took 0.313 sec
Testcase: testSimpleReturnDirectToField took 0 sec
Testcase: testSimpleReturnObject took 0.015 sec
Testcase: testReturnObjectAndDirectToField took 0 sec
Testcase: testReturnUnrelatedObjectAndDirectToField took 0.047 sec
Testcase: testInheritanceMultiTableException took 0 sec
Testcase: testReturnRootObject took 0.016 sec
Testcase: testExtendedPersistenceContext took 0.015 sec
Testcase: testSimpleConstructorExpression took 0.016 sec
Testcase: testSimpleConstructorExpressionWithNamedQuery took 0 sec
Testcase: testMultipleTypeConstructorExpression took 0.015 sec
Testcase: testNonExistantConstructorConstructorExpression took 0 sec
Testcase: testPrimitiveConstructorExpression took 0.016 sec
Testcase: testConstructorEJBQLWithInheritance took 0 sec
Testcase: testCreateDepartment took 0.031 sec
Testcase: testCreateScientists took 0.047 sec
Testcase: testReadDepartment took 0.031 sec
Testcase: testPrePersistEntityListenerInherit took 0.015 sec
Testcase: testPrePersistEntityListenerOverride took 0.016 sec
Testcase: testPostPersistEntityListenerInherit1 took 0 sec
Testcase: testPostPersistEntityListenerInherit2 took 0.016 sec
Testcase: testPostLoadEntityListenerInherit took 0 sec
Testcase: testPrePersistEntityEventOverride took 0.015 sec
Testcase: test_null took 0.906 sec
Testcase: test_nullNonDeferred took 0.687 sec
Testcase: test_ownerTOP took 0.86 sec
Testcase: test_fuelTypePetrol took 0.312 sec
Testcase: test_schoolBusNullDriver took 0.078 sec
Testcase: test_ownerOwnsNonFueledVehicle took 0.407 sec
Testcase: testInitialize took 0.046 sec
Testcase: test1 took 0.047 sec
Testcase: testInitialize took 0.032 sec
Testcase: test2 took 0.031 sec
Testcase: testInitialize took 0.031 sec
Testcase: test3 took 0.047 sec
Testcase: testPreAndPostPersist took 0 sec
Testcase: testPostLoadOnFind took 0.016 sec
Testcase: testPostLoadOnRefresh took 0.015 sec
Testcase: testPreAndPostUpdate took 0 sec
Testcase: testPreAndPostRemove took 0.016 sec
Testcase: testCreateBeerConsumer took 0.016 sec
Testcase: testCreateAlpine took 0.031 sec
Testcase: testCreateCanadian took 0.032 sec
Testcase: testCreateCertifications took 0.015 sec
Testcase: testCreateTelephoneNumbers took 0.047 sec
Testcase: testReadBeerConsumer took 0.031 sec
Testcase: testReadAlpine took 0 sec
Testcase: testReadCanadian took 0 sec
Testcase: testInsertNewAlpine took 0.047 sec
Testcase: testInsertNewAlpineAndModifyOrderOfExistingAlpines took 0.063 sec
Testcase: testUpdateAlpine took 0.015 sec
Testcase: testUpdateAlpineThroughBeerConsumer took 0.032 sec
Testcase: testUpdateBeerConsumer took 0.031 sec
Testcase: testUpdateCanadian took 0.015 sec
Testcase: testUpdateCanadianThroughBeerConsumer took 0.032 sec
Testcase: testUpdateCertifications took 0.047 sec
Testcase: testUpdateTelephoneNumberThroughBeerConsumer took 0.031 sec
Testcase: testShuffleTelephoneNumbersOnBeerConsumers took 0.062 sec
Testcase: testDeleteAlpine took 0.016 sec
Testcase: testDeleteCanadian took 0.016 sec
Testcase: testDeleteBeerConsumer took 0.031 sec
Testcase: testgetReference took 0.375 sec
Testcase: testcreateNativeQuery took 0.312 sec
Testcase: testcreateNativeQueryWithSelectSQL took 0.313 sec
Testcase: testNativeNamedQuery took 0.312 sec
Testcase: testSetParameterUsingNull took 0.328 sec
Testcase: testLeftTrimWithTrimChar took 0.313 sec
Testcase: testTrimWithTrimChar took 0.328 sec
Testcase: testTrimWithoutTrimChar took 0.313 sec
Testcase: testLocateWithSingleArgument took 0.312 sec
Testcase: testLocateWithDoubleArgument took 0.313 sec
Testcase: testInsertVirtualAttribute took 0.031 sec
Testcase: testReadVirtualAttribute took 0 sec
Testcase: testUpdateVirtualAttribute took 0.031 sec
Testcase: testDeleteVirtualAttribute took 0.016 sec
Testcase: testPKClassTypeValidation took 0 sec
Testcase: testParameterNameValidation took 0 sec
Testcase: testParameterPositionValidation took 0 sec
Testcase: testParameterPositionValidation2 took 0.016 sec
Testcase: testSelectPhoneNumberAreaCode took 0.015 sec
Testcase: testSelectPhoneNumberAreaCodeWithEmployee took 0.031 sec
Testcase: testSelectPhoneNumberNumberWithEmployeeWithExplicitJoin took 0.032 sec
Testcase: testSelectPhoneNumberNumberWithEmployeeWithFirstNameFirst took 0.031 sec
Testcase: testSelectEmployeeWithSameParameterUsedMultipleTimes took 0.031 sec
Testcase: baseTestCase took 0.266 sec
Testcase: simpleABSTest took 0.047 sec
Testcase: simpleBetweenAndTest took 0.062 sec
Testcase: simpleBetweenTest took 0.063 sec
Testcase: simpleConcatTest took 0.047 sec
Testcase: simpleConcatTestWithConstants1 took 0.047 sec
Testcase: simpleDoubleOrTest took 0.078 sec
Testcase: simpleEqualsBracketsTest took 0.047 sec
Testcase: simpleEqualsTest took 0.031 sec
Testcase: simpleEqualsTestWithJoin took 0.031 sec
Testcase: simpleEqualsWithAs took 0.047 sec
Testcase: collectionMemberIdentifierEqualsTest took 0.031 sec
Testcase: abstractSchemaIdentifierEqualsTest took 0.047 sec
Testcase: abstractSchemaIdentifierNotEqualsTest took 0.422 sec
Testcase: simpleInOneDotTest took 0.328 sec
Testcase: simpleInTest took 0.031 sec
Testcase: simpleLengthTest took 0.031 sec
Testcase: simpleLikeTest took 0.047 sec
Testcase: simpleLikeTestWithParameter took 0.094 sec
Testcase: simpleNotBetweenTest took 0.516 sec
Testcase: simpleNotEqualsVariablesInteger took 0.343 sec
Testcase: simpleNotInTest took 0.328 sec
Testcase: simpleNotLikeTest took 0.313 sec
Testcase: simpleOrFollowedByAndTest took 0.031 sec
Testcase: simpleOrFollowedByAndTestWithStaticNames took 0.078 sec
Testcase: simpleOrTest took 0.047 sec
Testcase: simpleParameterTest took 0.031 sec
Testcase: simpleParameterTestChangingParameters took 0.094 sec
Testcase: simpleReverseAbsTest took 0.031 sec
Testcase: simpleReverseConcatTest took 0.032 sec
Testcase: simpleReverseEqualsTest took 0.031 sec
Testcase: simpleReverseLengthTest took 0.047 sec
Testcase: simpleReverseParameterTest took 0.047 sec
Testcase: simpleReverseSqrtTest took 0.015 sec
Testcase: simpleReverseSubstringTest took 0.032 sec
Testcase: simpleSqrtTest took 0.031 sec
Testcase: simpleSubstringTest took 0.031 sec
Testcase: simpleNullTest took 0.047 sec
Testcase: simpleNotNullTest took 0.328 sec
Testcase: distinctTest took 0.063 sec
Testcase: conformResultsInUnitOfWorkTest took 0.375 sec
Testcase: simpleModTest took 0.063 sec
Testcase: simpleIsEmptyTest took 0.015 sec
Testcase: simpleIsNotEmptyTest took 0.328 sec
Testcase: simpleApostrohpeTest took 0.016 sec
Testcase: simpleEscapeUnderscoreTest took 0.016 sec
Testcase: smallProjectMemberOfProjectsTest took 0.187 sec
Testcase: smallProjectNOTMemberOfProjectsTest took 0.188 sec
Testcase: selectCountOneToOneTest took 0.015 sec
Testcase: selectOneToOneTest took 0 sec
Testcase: selectPhonenumberDeclaredInINClauseTest took 0.125 sec
Testcase: selectSimpleMemberOfWithParameterTest took 0.032 sec
Testcase: selectSimpleNotMemberOfWithParameterTest took 0.312 sec
Testcase: selectSimpleBetweenWithParameterTest took 0.063 sec
Testcase: selectSimpleInWithParameterTest took 0.031 sec
Testcase: complexABSTest took 0.078 sec
Testcase: compexInTest took 0.125 sec
Testcase: complexLengthTest took 0.031 sec
Testcase: complexLikeTest took 0.047 sec
Testcase: complexNotInTest took 0.36 sec
Testcase: complexNotLikeTest took 0.375 sec
Testcase: complexParameterTest took 0.031 sec
Testcase: complexReverseAbsTest took 0.094 sec
Testcase: compleReverseLengthTest took 0.031 sec
Testcase: complexReverseParameterTest took 0.094 sec
Testcase: complexReverseSqrtTest took 0.046 sec
Testcase: complexSqrtTest took 0.063 sec
Testcase: complexStringInTest took 0.094 sec
Testcase: complexStringNotInTest took 0.312 sec
Testcase: complexSubstringTest took 0.016 sec
Testcase: complexNestedOneToManyUsingInClause took 0.062 sec
Testcase: generalExceptionTest took 0 sec
Testcase: recognitionExceptionTest took 0.016 sec
Testcase: missingSelectExceptionTest took 0 sec
Testcase: malformedEjbqlExceptionTest1 took 0 sec
Testcase: malformedEjbqlExceptionTest2 took 0 sec
Testcase: malformedEjbqlExceptionTest3 took 0 sec
Testcase: malformedEjbqlExceptionTest4 took 0 sec
Testcase: badAliasExceptionTest took 0 sec
Testcase: noAliasWithWHEREAndParameterExceptionTest took 0 sec
Testcase: missingDescriptorExceptionTest took 0 sec
Testcase: aliasResolutionException took 0 sec
Testcase: illegalArgumentExceptionTest took 0.234 sec
Testcase: createNamedQueryThrowsIllegalArgumentExceptionTest took 0 sec
Testcase: flushTxExceptionTest took 0 sec
Testcase: noResultExceptionTest took 0.016 sec
Testcase: testGetSingleResultOnUpdate took 0 sec
Testcase: testGetSingleResultOnDelete took 0 sec
Testcase: testExecuteUpdateOnSelect took 0 sec
Testcase: flushOptimisticLockExceptionTest took 0.046 sec
Testcase: commitOptimisticLockExceptionTest took 0.047 sec
Testcase: JTAOptimisticLockExceptionTest took 0.032 sec
Testcase: testParameterNameValidation took 0 sec
Testcase: testParameterPositionValidation took 0 sec
Testcase: testParameterPositionValidation2 took 0 sec
Testcase: complexAVGTest took 0 sec
Testcase: complexCountTest took 0.016 sec
Testcase: complexDistinctCountTest took 0.015 sec
Testcase: complexMaxTest took 0.063 sec
Testcase: complexMinTest took 0 sec
Testcase: complexSumTest took 0.015 sec
Testcase: testSqlDate took 0.015 sec
Testcase: testSqlDateToTS took 0 sec
Testcase: testTime took 0.016 sec
Testcase: testTimeToTS took 0 sec
Testcase: testTimestamp took 0 sec
Testcase: testTimestampToDate took 0.015 sec
Testcase: testTimestampToTime took 0 sec
Testcase: testUtilDate took 0 sec
Testcase: testCalenderWithUtilDate took 0.016 sec
Testcase: testSqlDateWithCal took 0 sec
Testcase: testTimeWithCal took 0 sec
Testcase: testTimestampWithCal took 0.016 sec
Testcase: testUtilDateWithCal took 0 sec
Testcase: testCalendar took 0 sec
Testcase: testTimestampGreaterThan took 0.015 sec
Testcase: testTimestampLessThan took 0 sec
Testcase: testTimestampIn took 0.016 sec
Testcase: testTimestampBetween took 0 sec
Testcase: multipleParameterTest took 0 sec
        Caused an ERROR
Attempting to execute an operation on a closed EntityManager.
java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManager.
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:463)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:153)
        at oracle.toplink.essentials.testing.tests.ejb.ejbqltesting.JUnitEJBQLParameterTestSuite.multipleParameterTest(JUnitEJBQLParameterTestSuite.java:139)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)

Testcase: testCreateCustomer took 0.031 sec
Testcase: testCreateItem took 0 sec
Testcase: testCreateOrder took 0.031 sec
Testcase: testReadCustomer took 0 sec
Testcase: testReadItem took 0 sec
Testcase: testReadOrder took 0 sec
Testcase: testNamedQueryOnCustomer took 0 sec
Testcase: testNamedQueryOnItem took 0.016 sec
Testcase: testNamedQueryOnOrder took 0 sec
Testcase: testUpdateCustomer took 0.016 sec
Testcase: testUpdateItem took 0.031 sec
Testcase: testUpdateOrder took 0.015 sec
Testcase: testDeleteCustomer took 0.016 sec
Testcase: testDeleteItem took 0.016 sec
Testcase: testDeleteOrder took 0.015 sec
Testcase: testCreateFueledVehicle took 0.016 sec
Testcase: testCreateNonFueledVehicle took 0.047 sec
Testcase: testReadFueledVehicle took 0 sec
Testcase: testReadNonFueledVehicle took 0 sec
Testcase: testNamedNativeQueryOnSportsCar took 0 sec
Testcase: testUpdateFueledVehicle took 0.015 sec
Testcase: testUpdateNonFueledVehicle took 0.016 sec
Testcase: testDeleteFueledVehicle took 0.016 sec
Testcase: testDeleteNonFueledVehicle took 0.015 sec
Testcase: testNamedNativeQueryBeerConsumers took 0.016 sec
Testcase: testNamedNativeQueryCertifications took 0 sec
Testcase: testCreateEmployee took 0.047 sec
Testcase: testReadEmployee took 0 sec
Testcase: testNamedNativeQueryOnAddress took 0.016 sec
Testcase: testNamedQueryOnEmployee took 0 sec
Testcase: testUpdateEmployee took 0.016 sec
Testcase: testRefreshNotManagedEmployee took 0 sec
Testcase: testRefreshRemovedEmployee took 0.046 sec
Testcase: testDeleteEmployee took 0.032 sec
Testcase: testInheritanceDiscriminatorFieldValue took 0 sec
Testcase: testMappingsTypes took 0 sec