[
https://issues.apache.org/jira/browse/DERBY-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kathey Marsden updated DERBY-3081:
----------------------------------
Attachment: DERBY-3081_try1_stat.txt
DERBY-3081_try1_diff.txt
Attached is an initial attempt to fix this issue. I would most appreciate
review from someone familiar with byte code generation as it is a weak area for
me. The patch changes
- mb.upCast(leftInterfaceType);
to
+ mb.cast(leftInterfaceType);
to properly cast the argument to StringDataValue. Essentially what we were
ending up with in the generated code was this:
public Object e2()
throws StandardException, Exception
{
ConcatableDataValue concatabledatavalue =
((StringDataValue)getColumnFromRow(2,
2)).substring(getDataValueFactory().getDataValue(1, null),
getDataValueFactory().getDataValue(1, null), e3, 16);
e3 = concatabledatavalue;
StringDataValue stringdatavalue = ((StringDataValue)getColumnFromRow(2,
2)).ansiTrim(2, concatabledatavalue, e2);
....
So we were passing a ConcatableDataValue instead of a StringDataValue to
ansiTrim. Changing from upCast to cast forces the cast so that ansiTrim gets
called, but I am not sure I entirely understand the implications of the change.
Please take a look at this one line change and let me know what you think.
So far I only verified that the reproducible case passes on iseries and windows
and that AnsiTrimTest passes on Windows. I'll run the full set of tests on
iseries after I confirm I am on the right track here.
Thanks
Kathey
> cannot create instance of generated class because of java.lang.VerifyError in
> 4 tests on IBM iseries
> ----------------------------------------------------------------------------------------------------
>
> Key: DERBY-3081
> URL: https://issues.apache.org/jira/browse/DERBY-3081
> Project: Derby
> Issue Type: Bug
> Affects Versions: 10.3.1.4
> Environment: IBM iseries, OS: V5R4M0; both with ibm 142 (build
> 1.4.2_08-b02) and 15 jvm (build 1.5.0_03-b07)
> Reporter: Myrna van Lunteren
> Assignee: Kathey Marsden
> Attachments: ac601a400fx0115x38bex8045x0000004554b80.class,
> DERBY-3081_try1_diff.txt, DERBY-3081_try1_stat.txt, javap.out
>
>
> 4 tests fail to instantiate a generated class:
> 1)
> testTrimCharIsExpr(org.apache.derbyTesting.functionTests.tests.lang.AnsiTrimTest)java.sql.SQLException:
> Cannot create an instance of generated class
> org.apache.derby.exe.ac848c0061x0114xfee3x0ec7x0000636c39840.
> 2)
> testEnglishCollation(org.apache.derbyTesting.functionTests.tests.lang.CollationTest)java.sql.SQLException:
> Cannot create an instance of generated class
> org.apache.derby.exe.aca31ba168x0114xfee3x0ec7x0000636c39842a.
> 3)
> testNorwayCollation(org.apache.derbyTesting.functionTests.tests.lang.CollationTest)java.sql.SQLException:
> Cannot create an instance of generated class
> org.apache.derby.exe.ac066fa8c8x0114xfee3x0ec7x0000636c39842a.
> 4)
> testPolishCollation(org.apache.derbyTesting.functionTests.tests.lang.CollationTest)java.sql.SQLException:
> Nie mo?na utworzy? instancji wygenerowanej klasy
> org.apache.derby.exe.ac86a73025x0114xfee3x0ec7x0000636c39842a.
> All these something like this:
> ------------------------
> Caused by: java.lang.VerifyError:
> org/apache/derby/exe/ac86a73025x0114xfee3x0ec7x0000636c39842a 0000 0000
> at java.lang.Throwable.<init>(Throwable.java:195)
> at java.lang.Error.<init>(Error.java:49)
> at java.lang.VerifyError.<init>(VerifyError.java:34)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> at
> org.apache.derby.iapi.services.loader.ClassInfo.getNewInstance(Unknown Source)
> at
> org.apache.derby.impl.services.reflect.LoadedGeneratedClass.newInstance(Unknown
> Source)
> at
> org.apache.derby.impl.services.reflect.ReflectGeneratedClass.newInstance(Unknown
> Source)
> at org.apache.derby.impl.sql.GenericActivationHolder.<init>(Unknown
> Source)
> at
> org.apache.derby.impl.sql.GenericPreparedStatement.getActivation(Unknown
> Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.