Bug #3128
closedKepler devel tree can't be compiled in java 1.6.0: DBConnection problem
0%
Description
Christopher Brooks reported he couldn't compile the src code -
When I run:
export KEPLER=c:/Kepler/kepler-1.0.0rc1
cd $KEPLER
export PTII=c:/tmp/cxh/ptII
ant ptolemy
ant run
I get:
compile:
[javac] Compiling 752 source files to
c:\Kepler\kepler-1.0.0rc1\build\classes
[javac]
c:\Kepler\kepler-1.0.0rc1\build\src\org\ecoinformatics\util\DBConnection.java:61:
org.ecoinformatics.util.DBConnection
is not abstract and does not override abstract method createSQLXML()
in java.sql.Connection
[javac] public class DBConnection implements Connection {
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
Christopher was running
JDK 1.6.0_04
I repeated above steps.
It worked if i used jdk1.5.0_11
However, if I used jdk1.6.0_04, i got an error which is as same as Christopher reported:
compile-dev:
[javac] Compiling 752 source files to /home/tao/Kepler/build/classes
[javac] /home/tao/Kepler/build/src/org/ecoinformatics/util/DBConnection.java:61: org.ecoinformatics.util.DBConnection is not abstract and does not override abstract method createSQLXML() in java.sql.Connection
[javac] public class DBConnection implements Connection {
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
When I ran above tests, kepler src is Kepler 1.0.0rc1 and ptomely src is rel-7-0-beta-2 tag.
Updated by Christopher Brooks almost 16 years ago
With the new build system under Windows with JDK 1.6.0_05, I get:
[compile] Compiling core...
[compile] Compiling 98 source files to c:\tmp\cxh\src\kepler\core\target\classes
[compile] c:\tmp\cxh\src\kepler\core\src\org\ecoinformatics\util\DBConnection.java:67: org.ecoinformatics.util.DBConnection is not abstract and does not override abstract method createSQLXML() in java.sql.Connection
[compile] public class DBConnection implements Connection {
[compile] ^
The workaround is to move core/src/org/ecoinformatics/util/DBConnection-JDK1.6-Java to DBConnection.java.
bash-3.2$ pushd ../core/src/org/ecoinformatics/util/
/src/kepler/core/src/org/ecoinformatics/util ~/src/kepler/build-area
bash-3.2$ ls
Config.java
DBConnection-JDK1.6-Java
DBConnection.java
DBConnectionFactory.java
DelimitedReader.java
bash-3.2$ mv DBConnection.java DBConnection-JDK1.5-Java
bash-3.2$ cp DBConnection-JDK1.6-Java DBConnection.java
bash-3.2$ popd
/src/kepler/build-area
bash-3.2$
This problem is caused because Sun broke backward compatibility with certain
classes.
The real fix is to have the build system check the version of java and
copy the appropriate file as necessary.
Updated by Christopher Brooks almost 16 years ago
In my opinion, Kepler 1.1.0 must able to be compiled with Java 6 (aka JDK1.6).
The problem is:
[compile] Compiling 96 source files to /home/bldmastr/kepler/core/target/classes
[compile] /home/bldmastr/kepler/core/src/org/ecoinformatics/util/DBConnection.java\
:62: org.ecoinformatics.util.DBConnection is not abstract and does not override abst\
ract method createSQLXML() in java.sql.Connection
[compile] public class DBConnection implements Connection {
[compile] ^
The solution is for the build system to move files if Java 1.6 is detected.
Updated by Chad Berkley over 15 years ago
Kepler 2.0 should be Java 1.6 compatible, IMHO. The main problem is that we need to work around this since older macs will not be upgraded Java 1.6. One option is to have the installer check to see what version of java is running and choose the correct DBConnection class file.
Updated by Daniel Crawl over 15 years ago
DBConnection has been removed since it provided trivial functionality.
Kepler now compiles with java 1.6.