[
https://issues.apache.org/jira/browse/OPENJPA-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133311#comment-18133311
]
Maxim Solodovnik commented on OPENJPA-3033:
-------------------------------------------
h2. Derby
*fieldTypeTest1*
{code}
SEVERE: Unexpected Exception in createTestData:
<openjpa-4.2.0-SNAPSHOT-ra2e9c6eM fatal store error>
org.apache.openjpa.persistence.RollbackException: The transaction has been
rolled back. See the nested exceptions for details on the errors that occurred.
FailedObject:
ee.jakarta.tck.persistence.core.annotations.access.field.DataTypes@334ac669
at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:985)
at
ee.jakarta.tck.persistence.core.annotations.access.field.Client1.createTestData(Client1.java:1018)
at
ee.jakarta.tck.persistence.core.annotations.access.field.Client1.setup(Client1.java:36)
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:728)
at
org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at
org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at
org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
at
org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128)
at
org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeEachMethod(TimeoutExtension.java:78)
at
org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
at
org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
at
org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at
org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at
org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at
org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at
org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
at
org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
at
org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:521)
at
org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeBeforeEachMethodAdapter$23(ClassBasedTestDescriptor.java:506)
at
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachMethods$3(TestMethodTestDescriptor.java:175)
at
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$6(TestMethodTestDescriptor.java:203)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:203)
at
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachMethods(TestMethodTestDescriptor.java:172)
at
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at
org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at
org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at
org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at
org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
at
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
at
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
at
org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
at
org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
at
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
at
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
at
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
at
org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
at
org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
at
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
at
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
at
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
at
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at
org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
Caused by: <openjpa-4.2.0-SNAPSHOT-ra2e9c6eM fatal general error>
org.apache.openjpa.persistence.PersistenceException: The transaction has been
rolled back. See the nested exceptions for details on the errors that occurred.
FailedObject:
ee.jakarta.tck.persistence.core.annotations.access.field.DataTypes@334ac669
at
org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2488)
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2323)
at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2213)
at
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2130)
at
org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:84)
at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1608)
at
org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:1035)
at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:963)
... 75 more
Caused by: <openjpa-4.2.0-SNAPSHOT-ra2e9c6eM fatal general error>
org.apache.openjpa.persistence.PersistenceException: 22001 : [0] CHAR, [1] 97,
[2] 1 {prepstmnt 2075691191 INSERT INTO DATATYPES (id, BOOLEANDATA,
BYTEARRAYDATA, BYTEDATA, CHARARRAYDATA, CHARDATA, DBLDATA, ENUMSDATA,
FLOATDATA, INTDATA, INTDATA2, LONGDATA, SHORTDATA) VALUES (?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?)} [code=20000, state=22001]
FailedObject:
ee.jakarta.tck.persistence.core.annotations.access.field.DataTypes@334ac669
at
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:5673)
at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:5639)
at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:134)
at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:75)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:159)
at
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:80)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:104)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:92)
at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:555)
at
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:109)
at
org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:61)
at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:109)
at
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:81)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:762)
at
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:146)
... 82 more
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 22001 : [0] CHAR,
[1] 97, [2] 1 {prepstmnt 2075691191 INSERT INTO DATATYPES (id, BOOLEANDATA,
BYTEARRAYDATA, BYTEDATA, CHARARRAYDATA, CHARDATA, DBLDATA, ENUMSDATA,
FLOATDATA, INTDATA, INTDATA2, LONGDATA, SHORTDATA) VALUES (?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?)} [code=20000, state=22001]
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219)
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:195)
at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1188)
at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:308)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1867)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:301)
at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:123)
... 92 more
{code}
*DataTypes*
{code}
public class DataTypes implements java.io.Serializable {
@Id
protected int id;
@Basic(fetch = FetchType.EAGER)
@Column(name = "BOOLEANDATA")
@Access(AccessType.FIELD)
protected boolean booleanData;
@Column(name = "BYTEDATA")
protected byte byteData;
@Column(name = "CHARDATA")
protected char characterData;
@Column(name = "SHORTDATA")
protected short shortData;
@Column(name = "INTDATA")
protected int intData;
@Column(name = "LONGDATA")
protected long longData;
@Column(name = "DBLDATA")
protected double doubleData;
@Column(name = "FLOATDATA")
protected float floatData;
@Column(name = "ENUMSDATA")
@Enumerated(EnumType.STRING)
protected Grade enumData;
@Column(name = "CHARARRAYDATA")
protected char[] charArrayData;
@Lob
@Column(name = "BYTEARRAYDATA")
protected byte[] byteArrayData;
{code}
created as follows:
{code}
d1 = new DataTypes(1, false, (byte) 100, 'a', (short) 100, 300, 600L,
50D, 1.0F, cArray, bArray);
{code}
{{propertyTypeTest1}}, {{generatorTypeTest1}}, {{autoTypeTest1}} seems to be
similar to above
> Derby: basic type, generator and numeric result type tests fail
> ---------------------------------------------------------------
>
> Key: OPENJPA-3033
> URL: https://issues.apache.org/jira/browse/OPENJPA-3033
> Project: OpenJPA
> Issue Type: Sub-task
> Reporter: Richard Zowalla
> Priority: Major
>
> These tests fail on Derby and only report "failed", the cause has to be found
> from the TCK logs:
> * {{fieldTypeTest1}} to {{fieldTypeTest17}}, {{propertyTypeTest1}} to
> {{propertyTypeTest13}} (field and property access)
> * {{autoTypeTest1}} to {{autoTypeTest6}}, {{generatorTypeTest1}} to
> {{generatorTypeTest6}}, {{generatorTypeSequenceTest}}
> * {{persistBasicTest2}} to {{persistBasicTest5}}
> * {{Client2}} / {{Client5}}: {{BigDecimal}}, {{BigInteger}}, {{Double}},
> {{Float}}, {{Long}} and {{ShortOperandResultTypeTests}}
> * {{dateTimeTest}} (Java 8 date and time types)
> {{propertyTypeTest1}} and {{autoTypeTest1}} also fail on SQL Server.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)