The previous commit broke the build for those who have
The reason seems to be that dependencies on Java SE has sneaked into
code that's supposed to work on CDC/Foundation Profile. It didn't use
to fail at compile time before because the classes were compiled by a
different target than intended. When we removed some implicit build
dependencies in the previous patch, these classes ended up being
compiled using the intended target, which used a stricter compile
classpath than the implicit target used before.
This problem could also be seen before the previous commit, by
touching java/engine/org/apache/derby/impl/db/SlaveDatabase.java and
doing an incremental build on an otherwise fully compiled source tree.
This is exactly the kind of problems we want to fix in this JIRA
I think this isn't just a build problem, but also a run-time problem
on CDC/FP. For example, the following code raises a
java.lang.NoClassDefFoundError with Derby 10.8.2.2 on Oracle Java ME
EmbeddedSimpleDataSource ds = new EmbeddedSimpleDataSource();
When the attached patch is applied, it changes to the expected
exception: java.sql.SQLException: Derby system shutdown.
Here's a description of the changes in d4845-buildbreak.diff:
This class is supposed to be compiled against CDC/FP libraries (and
now it actually is), but it references java.sql.Driver and
java.sql.DriverManager, which are not available on that platform. The
patch changes the code to use InternalDriver to shut down the
database. (The original code didn't cause any run-time failures on
CDC/FP because it the code is wrapped in a try/catch that ignores all
DataDictionaryImpl imported LOBStoredProcedure in order to get a
constant. Since LOBStoredProcedure is not supposed to work on CDC/FP,
whereas DataDictionaryImpl is, DataDictionaryImpl shouldn't reference
it directly. The patch moves the constants to the Limits interface so
that DataDictionaryImpl doesn't have to import LOBStoredProcedure.
InternalDriver calls AutoloadedDriver.setDeregister(), but it should
not reference code that only works on Java SE, since it is supposed to
work on CDC/FP. The patch moves the methods setDeregister() and
getDeregister() to InternalDriver and lets AutoloadedDriver fetch this
info from InternalDriver instead.
The build works again with jsr169compile.classpath set when the patch
is applied. No problems were found when running suites.All and
Committed revision 1200293.