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 Jørgen Løland <Jo...@Sun.COM> on 2007/10/24 14:39:18 UTC
Compilation problem - head of trunk and JDK6
In the current proof of concept replication code, we boot the slave
database by calling
Database db =
(Database)Monitor.findService(Property.DATABASE_MODULE, dbname);
This requires org.apache.derby.iapi.db.Database to be imported. With the
head of trunk, this import results in compilation errors that seem to be
related to VTIs and probably the new requirements to compile environment
(see further down for compile error). Any ideas for how I should proceed
with this? The problem was probably introduced this or last week.
To get this error, add "import org.apache.derby.iapi.db.Database" to
NetworkServerControlImpl.java and compile with JDK6.
$ ant all
<snip>
compile:
[javac] Compiling 17 source files to
/export/home/derby/clean1/trunk/classes
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:354:
warning: [deprecation] getUnicodeStream(java.lang.String) in
java.sql.ResultSet has been deprecated
[javac] public java.io.InputStream getUnicodeStream(String
columnName) throws SQLException {
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:300:
warning: [deprecation] getBigDecimal(java.lang.String,int) in
java.sql.ResultSet has been deprecated
[javac] public BigDecimal getBigDecimal(String columnName, int
scale) throws SQLException {
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:209:
warning: [deprecation] getUnicodeStream(int) in java.sql.ResultSet has
been deprecated
[javac] public java.io.InputStream getUnicodeStream(int
columnIndex) throws SQLException {
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:155:
warning: [deprecation] getBigDecimal(int,int) in java.sql.ResultSet has
been deprecated
[javac] public BigDecimal getBigDecimal(int columnIndex, int
scale) throws SQLException {
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/StringColumnVTI.java:70:
org.apache.derbyDemo.vtis.core.StringColumnVTI.SimpleBlob is not
abstract and does not override abstract method
getBinaryStream(long,long) in java.sql.Blob
[javac] public static final class SimpleBlob
implements Blob
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/StringColumnVTI.java:148:
org.apache.derbyDemo.vtis.core.StringColumnVTI.SimpleClob is not
abstract and does not override abstract method
getCharacterStream(long,long) in java.sql.Clob
[javac] public static final class SimpleClob
implements Clob
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/XmlVTI.java:39:
org.apache.derbyDemo.vtis.core.XmlVTI is not abstract and does not
override abstract method updateNClob(java.lang.String,java.io.Reader) in
java.sql.ResultSet
[javac] public class XmlVTI extends StringColumnVTI
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/PropertyFileVTI.java:35:
org.apache.derbyDemo.vtis.example.PropertyFileVTI is not abstract and
does not override abstract method
updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] public class PropertyFileVTI extends FlatFileVTI
[javac] ^
[javac]
/export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/SubversionLogVTI.java:35:
org.apache.derbyDemo.vtis.example.SubversionLogVTI is not abstract and
does not override abstract method
updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] public class SubversionLogVTI extends FlatFileVTI
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 5 errors
[javac] 4 warnings
BUILD FAILED
--
Jørgen Løland
Re: Compilation problem - head of trunk and JDK6
Posted by Jørgen Løland <Jo...@Sun.COM>.
Rick Hillegas wrote:
> Dag H. Wanvik wrote:
>> I think the reason is that the VTI demo result set template presumes
>> JDK1.5, since the JDBC has more methods in JDK 1.6 which are
>> unimplemented in the VTI template.
>>
>> Dag
>>
> I just checked in submission 587905. Hopefully this fixes the build in
> Java 6 environments. Please let me know if your build is still broken
> after syncing to the head of the trunk.
>
> Regards,
> -Rick
>
Seems to work now. Thanks for the quick fix, Rick :)
--
Jørgen Løland
Re: Compilation problem - head of trunk and JDK6
Posted by Rick Hillegas <Ri...@Sun.COM>.
Dag H. Wanvik wrote:
> I think the reason is that the VTI demo result set template presumes
> JDK1.5, since the JDBC has more methods in JDK 1.6 which are
> unimplemented in the VTI template.
>
> Dag
>
I just checked in submission 587905. Hopefully this fixes the build in
Java 6 environments. Please let me know if your build is still broken
after syncing to the head of the trunk.
Regards,
-Rick
Re: Compilation problem - head of trunk and JDK6
Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
I think the reason is that the VTI demo result set template presumes
JDK1.5, since the JDBC has more methods in JDK 1.6 which are
unimplemented in the VTI template.
Dag
Re: Compilation problem - head of trunk and JDK6
Posted by "Bernt M. Johnsen" <Be...@Sun.COM>.
I get the same errors. My changes in NetworkServerControlImpl.java
imports are:
added
import org.apache.derby.iapi.services.mbeans.ManagementService;
import javax.management.ObjectName;
removed:
import org.apache.derby.iapi.services.info.JVMInfo;
AND
I switched to Netbeans 6.0beta2 and JDK1.6u3 (it worked with 6.0beta1
and JDK1.6u2).
>>>>>>>>>>>> Jørgen Løland wrote (2007-10-24 14:39:18):
> In the current proof of concept replication code, we boot the slave
> database by calling
>
> Database db =
> (Database)Monitor.findService(Property.DATABASE_MODULE, dbname);
>
> This requires org.apache.derby.iapi.db.Database to be imported. With the
> head of trunk, this import results in compilation errors that seem to be
> related to VTIs and probably the new requirements to compile environment
> (see further down for compile error). Any ideas for how I should proceed
> with this? The problem was probably introduced this or last week.
>
> To get this error, add "import org.apache.derby.iapi.db.Database" to
> NetworkServerControlImpl.java and compile with JDK6.
>
>
> $ ant all
> <snip>
>
> compile:
> [javac] Compiling 17 source files to
> /export/home/derby/clean1/trunk/classes
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:354:
> warning: [deprecation] getUnicodeStream(java.lang.String) in
> java.sql.ResultSet has been deprecated
> [javac] public java.io.InputStream getUnicodeStream(String
> columnName) throws SQLException {
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:300:
> warning: [deprecation] getBigDecimal(java.lang.String,int) in
> java.sql.ResultSet has been deprecated
> [javac] public BigDecimal getBigDecimal(String columnName, int
> scale) throws SQLException {
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:209:
> warning: [deprecation] getUnicodeStream(int) in java.sql.ResultSet has been
> deprecated
> [javac] public java.io.InputStream getUnicodeStream(int
> columnIndex) throws SQLException {
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java:155:
> warning: [deprecation] getBigDecimal(int,int) in java.sql.ResultSet has
> been deprecated
> [javac] public BigDecimal getBigDecimal(int columnIndex, int
> scale) throws SQLException {
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/StringColumnVTI.java:70:
> org.apache.derbyDemo.vtis.core.StringColumnVTI.SimpleBlob is not abstract
> and does not override abstract method getBinaryStream(long,long) in
> java.sql.Blob
> [javac] public static final class SimpleBlob
> implements Blob
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/StringColumnVTI.java:148:
> org.apache.derbyDemo.vtis.core.StringColumnVTI.SimpleClob is not abstract
> and does not override abstract method getCharacterStream(long,long) in
> java.sql.Clob
> [javac] public static final class SimpleClob
> implements Clob
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/XmlVTI.java:39:
> org.apache.derbyDemo.vtis.core.XmlVTI is not abstract and does not override
> abstract method updateNClob(java.lang.String,java.io.Reader) in
> java.sql.ResultSet
> [javac] public class XmlVTI extends StringColumnVTI
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/PropertyFileVTI.java:35:
> org.apache.derbyDemo.vtis.example.PropertyFileVTI is not abstract and does
> not override abstract method updateNClob(java.lang.String,java.io.Reader)
> in java.sql.ResultSet
> [javac] public class PropertyFileVTI extends FlatFileVTI
> [javac] ^
> [javac]
> /export/home/derby/clean1/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/SubversionLogVTI.java:35:
> org.apache.derbyDemo.vtis.example.SubversionLogVTI is not abstract and does
> not override abstract method updateNClob(java.lang.String,java.io.Reader)
> in java.sql.ResultSet
> [javac] public class SubversionLogVTI extends FlatFileVTI
> [javac] ^
> [javac] Note: Some input files use unchecked or unsafe operations.
> [javac] Note: Recompile with -Xlint:unchecked for details.
> [javac] 5 errors
> [javac] 4 warnings
>
> BUILD FAILED
>
> --
> Jørgen Løland
--
Bernt Marius Johnsen, Database Technology Group,
Staff Engineer, Derby/Java DB
Sun Microsystems, Trondheim, Norway
Re: Compilation problem - head of trunk and JDK6
Posted by Rick Hillegas <Ri...@Sun.COM>.
Oystein Grovlen - Sun Norway wrote:
> Jørgen Løland wrote:
>> In the current proof of concept replication code, we boot the slave
>> database by calling
>>
>> Database db =
>> (Database)Monitor.findService(Property.DATABASE_MODULE, dbname);
>>
>> This requires org.apache.derby.iapi.db.Database to be imported. With
>> the head of trunk, this import results in compilation errors that
>> seem to be related to VTIs and probably the new requirements to
>> compile environment (see further down for compile error). Any ideas
>> for how I should proceed with this? The problem was probably
>> introduced this or last week.
>>
>> To get this error, add "import org.apache.derby.iapi.db.Database" to
>> NetworkServerControlImpl.java and compile with JDK6.
>
> I get this error without any changes to NetworkServerControlImpl. (My
> only changes are some local changes in LogToFile). I think the
> problem is that VTI demo does not implement Blob methods that are new
> to JDBC 4.
>
> I guess either the build system should not compile this class with
> JDK6, or the JDBC 4 methods should be implemented.
>
> --
> Øystein
>
This error is caused by my checkin yesterday on DERBY-3129. I'm working
on a fix. Please stand by...
Regards,
-Rick
Re: Compilation problem - head of trunk and JDK6
Posted by Oystein Grovlen - Sun Norway <Oy...@Sun.COM>.
Oystein Grovlen - Sun Norway wrote:
> I get this error without any changes to NetworkServerControlImpl. (My
> only changes are some local changes in LogToFile). I think the problem
> is that VTI demo does not implement Blob methods that are new to JDBC 4.
>
> I guess either the build system should not compile this class with JDK6,
> or the JDBC 4 methods should be implemented.
Forgot to mention that it compiles for me with JDK 5.0.
--
Øystein
Re: Compilation problem - head of trunk and JDK6
Posted by Oystein Grovlen - Sun Norway <Oy...@Sun.COM>.
Jørgen Løland wrote:
> In the current proof of concept replication code, we boot the slave
> database by calling
>
> Database db =
> (Database)Monitor.findService(Property.DATABASE_MODULE, dbname);
>
> This requires org.apache.derby.iapi.db.Database to be imported. With the
> head of trunk, this import results in compilation errors that seem to be
> related to VTIs and probably the new requirements to compile environment
> (see further down for compile error). Any ideas for how I should proceed
> with this? The problem was probably introduced this or last week.
>
> To get this error, add "import org.apache.derby.iapi.db.Database" to
> NetworkServerControlImpl.java and compile with JDK6.
I get this error without any changes to NetworkServerControlImpl. (My
only changes are some local changes in LogToFile). I think the problem
is that VTI demo does not implement Blob methods that are new to JDBC 4.
I guess either the build system should not compile this class with JDK6,
or the JDBC 4 methods should be implemented.
--
Øystein