You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Rick Hillegas <ri...@oracle.com> on 2011/11/14 20:28:45 UTC

need theories about errors seen in the jdk 1.4 test runs

Starting on 2011-11-08, the JDK 1.4 test results began to show 2 errors 
which don't appear on other platforms. The errors are NoSuchMethodErrors 
raised by calling a BigDecimal constructor which appears in Java 5 but 
not JDK 1.4. The offending Derby test code was checked in on 2011-03-29 
at subversion revision 1086799 as part of the work on DERBY-2515. I 
would have expected to see this error long before 2011-11-08. Any 
theories about why it popped up only last week?

Thanks,
-Rick

Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Rick Hillegas <ri...@oracle.com> writes:

> Thanks for that explanation, Knut. This then is the first casualty of
> our decision to stop supporting JDK 1.4 in Derby 10.9. This appears to
> be the state of
> org.apache.derbyTesting.functionTests.tests.jdbcapi.ProcedureTest:
>
> a) It never ran on supported small devices.
>
> b) It raises an error now on the unsupported JDK 1.4 platform.
>
> c) It runs cleanly on the supported Java 5, 6, and 7 platforms.
>
> Here are some options for handling this noise:
>
> 1) Change the constructor to use a String argument rather than a
> numeric. That should compile to a form which will run on JDK
> 1.4--although some other discrepancy may be lurking behind this one.
>
> 2) Adjust the build script so that we compile this class using
> compile.classpath rather than java15compile.classpath. For extra
> credit, we could also use compile.classpath for other classes in that
> package which we expect to run on small devices.
>
> 3) Remove the whole test from runs on JDK 1.4. File a JIRA to fix the
> test so that it runs on small platforms. This would involve some form
> of (2).
>
> I am leaning toward option (1) because it is simple. Other opinions?

+1.

Alternatively (or additionally) I could stop the nightly runs on Java
1.4.2 so that we won't get similar noise in the future.

-- 
Knut Anders

Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Katherine Marsden <km...@sbcglobal.net> writes:

> Since jdk 1.4.2  won't be supported for 10.9 ,  there could be 4)
> Remove runs of jdk 1.4 from trunk and  add some sort of CDC Foundation
> 1.1 runs. This might be the best long term solution.  Are the trunk
> 1.4.2  runs currently in place to help pop issues on small devices?

They are currently in place because doing nothing is less work than
taking them down. :)

-- 
Knut Anders

Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Rick Hillegas <ri...@oracle.com> writes:

> On 11/15/11 8:58 AM, Katherine Marsden wrote:

>>   Eventually I guess they will really break and for good reason.
> +1 to turning off the 1.4 test runs on the trunk.

OK. I've disabled the 1.4 test runs.

Thanks,

-- 
Knut Anders

Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Rick Hillegas <ri...@oracle.com>.
On 11/15/11 8:58 AM, Katherine Marsden wrote:
> ...
> Since jdk 1.4.2  won't be supported for 10.9 ,  there could be 4) 
> Remove runs of jdk 1.4 from trunk and  add some sort of CDC Foundation 
> 1.1 runs. This might be the best long term solution.  Are the trunk 
> 1.4.2  runs currently in place to help pop issues on small devices?
The issues we have been seeing lately on small devices have been popped 
by the test runs on small devices. I don't think that the 1.4 test runs 
are giving us much extra coverage here.

That said, I think that we could fix some of the tests which are 
currently disabled for small devices and rework those tests to run on 
CDC/FP 1.1. Could be another project for a GSoC student.
>   Eventually I guess they will really break and for good reason.
+1 to turning off the 1.4 test runs on the trunk.

Thanks,
-Rick
>
>
>
>
>
>


Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Katherine Marsden <km...@sbcglobal.net>.
On 11/15/2011 6:07 AM, Rick Hillegas wrote:
> Thanks for that explanation, Knut. This then is the first casualty of 
> our decision to stop supporting JDK 1.4 in Derby 10.9. This appears to 
> be the state of 
> org.apache.derbyTesting.functionTests.tests.jdbcapi.ProcedureTest:
>
> a) It never ran on supported small devices.
>
> b) It raises an error now on the unsupported JDK 1.4 platform.
>
> c) It runs cleanly on the supported Java 5, 6, and 7 platforms.
>
> Here are some options for handling this noise:
>
> 1) Change the constructor to use a String argument rather than a 
> numeric. That should compile to a form which will run on JDK 
> 1.4--although some other discrepancy may be lurking behind this one.
>
> 2) Adjust the build script so that we compile this class using 
> compile.classpath rather than java15compile.classpath. For extra 
> credit, we could also use compile.classpath for other classes in that 
> package which we expect to run on small devices.
>
> 3) Remove the whole test from runs on JDK 1.4. File a JIRA to fix the 
> test so that it runs on small platforms. This would involve some form 
> of (2).
>
Since jdk 1.4.2  won't be supported for 10.9 ,  there could be 4) Remove 
runs of jdk 1.4 from trunk and  add some sort of CDC Foundation 1.1 
runs. This might be the best long term solution.  Are the trunk 1.4.2  
runs currently in place to help pop issues on small devices?  Eventually 
I guess they will really break and for good reason.






Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Rick Hillegas <ri...@oracle.com>.
Thanks for that explanation, Knut. This then is the first casualty of 
our decision to stop supporting JDK 1.4 in Derby 10.9. This appears to 
be the state of 
org.apache.derbyTesting.functionTests.tests.jdbcapi.ProcedureTest:

a) It never ran on supported small devices.

b) It raises an error now on the unsupported JDK 1.4 platform.

c) It runs cleanly on the supported Java 5, 6, and 7 platforms.

Here are some options for handling this noise:

1) Change the constructor to use a String argument rather than a 
numeric. That should compile to a form which will run on JDK 
1.4--although some other discrepancy may be lurking behind this one.

2) Adjust the build script so that we compile this class using 
compile.classpath rather than java15compile.classpath. For extra credit, 
we could also use compile.classpath for other classes in that package 
which we expect to run on small devices.

3) Remove the whole test from runs on JDK 1.4. File a JIRA to fix the 
test so that it runs on small platforms. This would involve some form of 
(2).

I am leaning toward option (1) because it is simple. Other opinions?

Thanks,
-Rick

Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Knut Anders Hatlen <kn...@oracle.com> writes:

> Rick Hillegas <ri...@oracle.com> writes:
>
>> Starting on 2011-11-08, the JDK 1.4 test results began to show 2
>> errors which don't appear on other platforms. The errors are
>> NoSuchMethodErrors raised by calling a BigDecimal constructor which
>> appears in Java 5 but not JDK 1.4. The offending Derby test code was
>> checked in on 2011-03-29 at subversion revision 1086799 as part of the
>> work on DERBY-2515. I would have expected to see this error long
>> before 2011-11-08. Any theories about why it popped up only last week?
>
> It coincides with the simplification of PropertySetter, so here's my
> theory (I don't have the build scripts for the nightlies handy right
> now, so I can't tell for sure):
> - Before 2011-11-08, PropertySetter would find the 1.4.2 run-time
>   libraries and compile against them. Since there is no BigDecimal(int)
>   constructor in 1.4.2, the compiler promotes the int argument to a
>   double and produces byte code that calls BigDecimal(double).
>
> - After 2011-11-08, PropertySetter no longer looks for old libraries,
>   and instead constructs a classpath based on the Java 6 libraries,
>   which do contain the BigDecimal(int) constructor. So the int is not
>   promoted to a double, and the byte code calls BigDecimal(int), which
>   is not available on Java 1.4.2.

Almost...

I checked the scripts used in the nightly build job, and they explicitly
point j14lib to a Java 1.4.2 installation. That would explain why the
class was compiled to something that worked on Java 1.4.2 before
2011-11-08.

j14lib is still set by the scripts, but DERBY-5485 also replaced all
occurrences of java14compile.classpath with java15compile.classpath in
the build scripts, so now we'll compile this class against the Java 5
libraries even if j14lib is set. That explains why the byte code now
calls the new constructor introduced in Java 5 instead of promoting the
int to a double and calling the Java 1.4 constructor.

-- 
Knut Anders

Re: need theories about errors seen in the jdk 1.4 test runs

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Rick Hillegas <ri...@oracle.com> writes:

> Starting on 2011-11-08, the JDK 1.4 test results began to show 2
> errors which don't appear on other platforms. The errors are
> NoSuchMethodErrors raised by calling a BigDecimal constructor which
> appears in Java 5 but not JDK 1.4. The offending Derby test code was
> checked in on 2011-03-29 at subversion revision 1086799 as part of the
> work on DERBY-2515. I would have expected to see this error long
> before 2011-11-08. Any theories about why it popped up only last week?

It coincides with the simplification of PropertySetter, so here's my
theory (I don't have the build scripts for the nightlies handy right
now, so I can't tell for sure):

- Before 2011-11-08, PropertySetter would find the 1.4.2 run-time
  libraries and compile against them. Since there is no BigDecimal(int)
  constructor in 1.4.2, the compiler promotes the int argument to a
  double and produces byte code that calls BigDecimal(double).

- After 2011-11-08, PropertySetter no longer looks for old libraries,
  and instead constructs a classpath based on the Java 6 libraries,
  which do contain the BigDecimal(int) constructor. So the int is not
  promoted to a double, and the byte code calls BigDecimal(int), which
  is not available on Java 1.4.2.

-- 
Knut Anders