Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326313 - tests.jpa.advanced.EntityManagerJUnitTestSuite.testSelectEmbeddable failed in the OSGi SRG with 2.2.0.v20100916-r8200
Summary: tests.jpa.advanced.EntityManagerJUnitTestSuite.testSelectEmbeddable failed in...
Status: CLOSED DUPLICATE of bug 329381
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-27 10:51 EDT by Edwin Tang CLA
Modified: 2022-06-09 10:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin Tang CLA 2010-09-27 10:51:20 EDT
tests.jpa.advanced.EntityManagerJUnitTestSuite.testSelectEmbeddable failed in the OSGi SRG with build 2.2.0.v20100916-r8200. The test was added by Tom in revision 8174.

Stack Trace:
============
An exception occurred while creating a query in EntityManager: Exception Description: Error compiling the query [select new org.eclipse.persistence.testing.models.jpa.advanced.EmployeeHolder(e.id, e.period, e.firstName) from Employee e where e.id = :id], line 1, column 7: constructor class [org.eclipse.persistence.testing.models.jpa.advanced.EmployeeHolder] not found.

java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Error compiling the query [select new org.eclipse.persistence.testing.models.jpa.advanced.EmployeeHolder(e.id, e.period, e.firstName) from Employee e where e.id = :id], line 1, column 7: constructor class [org.eclipse.persistence.testing.models.jpa.advanced.EmployeeHolder] not found.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1376)
at org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite.testSelectEmbeddable(EntityManagerJUnitTestSuite.java:9650)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:466)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
at org.eclipse.persistence.testing.framework.osgi.Activator.start(Activator.java:50)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
Caused by: Exception [EclipseLink-8013] (Eclipse Persistence Services - 2.2.0.v20100916-r8200): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [select new org.eclipse.persistence.testing.models.jpa.advanced.EmployeeHolder(e.id, e.period, e.firstName) from Employee e where e.id = :id], line 1, column 7: constructor class [org.eclipse.persistence.testing.models.jpa.advanced.EmployeeHolder] not found.
at org.eclipse.persistence.exceptions.JPQLException.constructorClassNotFound(JPQLException.java:240)
at org.eclipse.persistence.internal.jpa.parsing.ConstructorNode.getConstructorClass(ConstructorNode.java:131)
at org.eclipse.persistence.internal.jpa.parsing.ConstructorNode.applyToQuery(ConstructorNode.java:52)
at org.eclipse.persistence.internal.jpa.parsing.SelectNode.applyToQuery(SelectNode.java:174)
at org.eclipse.persistence.internal.jpa.parsing.ParseTree.applyQueryNodeToQuery(ParseTree.java:334)
at org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateReadQueryInternal(JPQLParseTree.java:113)
at org.eclipse.persistence.internal.jpa.parsing.JPQLParseTree.populateQuery(JPQLParseTree.java:84)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:211)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:182)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.(EJBQueryImpl.java:134)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.(EJBQueryImpl.java:118)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1374)
... 29 more
Comment 1 Edwin Tang CLA 2010-10-01 15:48:35 EDT
To reproduce it, follow the steps:
1. Execute "ant" from jpa\eclipselink.jpa.test to build test jars
2. Execute "ant" from jpa\eclipselink.jpa.osgi.test to build test bundle
3. Execute "ant " from jpa\eclipselink.jpa.osgi.test to run the OSGi SRG
4. Check the results via opening jpa\eclipselink.jpa.osgi.test\report\TESTS-TestSuites.xml

Note: The test bundle - org.eclipse.persistence.jpa.osgi.test_1.0.jar is generated in jpa\eclipselink.jpa.osgi.test.
Comment 2 Edwin Tang CLA 2010-10-01 15:52:16 EDT
Correction:
3. Execute "ant test-osgi-srg" from jpa\eclipselink.jpa.osgi.test to run the OSGi SRG
Comment 3 Edwin Tang CLA 2010-10-01 16:00:55 EDT
Via checking the test bundle, the missing class - org.eclipse.persistence.testing.models.jpa.advanced.EmployeeHolder is actually in eclipselink-annotation-model.jar. Maybe a classloader issue?
Comment 4 Tom Ware CLA 2010-10-04 10:39:44 EDT
Targetting as a low priority for 2.2.  This is likely a bug, but I beleive it is a higher priority to migrate the current OSGi testing framework to a more realistic configuration and then fix any issues thet tests find.  

i.e. The current test framework holds all the testing classes in a monolithic bundle.  We should, instead, separate the persitence units and the tests into various separage bundles.
Comment 5 Tom Ware CLA 2010-11-03 14:21:56 EDT

*** This bug has been marked as a duplicate of bug 329381 ***
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:21:35 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink