Community
Participate
Working Groups
The following model (from the mailing lists): @Entity public class Parameter { @Id private Long id; private Serializable parameterValue; public Serializable getParameterValue() { return parameterValue; } public void setParameterValue(Serializable parameterValue) { this.parameterValue = parameterValue; } } Causes the following exception to occur at runtime: junit.framework.AssertionFailedError: Error persisting the Parameter : javax.persistence.RollbackException: Exception [EclipseLink-6168] (Eclipse Persistence Services - 2.3.0.qualifier): org.eclipse.persistence.exceptions.QueryException Exception Description: Query failed to prepare, unexpected error occurred: [java.lang.IndexOutOfBoundsException: Index: 0, Size: 0]. Internal Exception: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 Query: DoesExistQuery(referenceClass=String ) at junit.framework.Assert.fail(Assert.java:47) at org.eclipse.persistence.testing.tests.jpa.ddlgeneration.DDLGenerationJUnitTestSuite.testUserIssue(DDLGenerationJUnitTestSuite.java:1382) 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:499) 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.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Work around is to add @Basic to "parameterValue"
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Created attachment 187569 [details] Proposed changes
Changes have been submitted. Reviewed by: Chris Delahunt Tests: No, metadata processing exception. Model change made to expose the error and cause the exception. With fix in place, no exceptions are thrown and all tests (FullRegressionTestSuite and extended JPA) pass successfully.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink