|
Replies:
4
-
Last Post:
Jun 27, 2009 12:21 PM
by: dave5555
|
Threads:
[
Previous
|
Next
]
|
|
|
|
|
|
How to build JTDS JDBC driver
Posted:
Jun 23, 2009 8:11 PM
|
|
|
Hi, if anyone can help me with JTDS, I'd really appreciate it. I am new to JTDS and am having trouble compiling the source to build the JDBC driver. I am trying to modify the source code somewhat to enhance JTDS functionality for my application. First I'm trying to compile the basic source code to build the basic JDBC driver. I am testing on my laptop using a trial version of MS SQL Server 2008. I've downloaded and unzipped jtds-1.2.2-src.zip (from sourceforge.net) and created the JAVA_HOME variable to point to C:\Program Files\Java\jdk1.6.0_13 on my machine. Then I go to c:\jtds-1.2.2-src\ directory and type "build". It tries to compile and gets the following errors: Building jTDS... ---------------- Building with classpath C:\Program Files\Java\jdk1.6.0_13\lib\tools.jar;lib\ant- junit.jar;lib\ant-launcher.jar;lib\ant.jar;lib\crimson.jar;lib\jaxp.jar;lib\jcer t.jar;lib\jcifs-1.2.14.jar;lib\jdbc2_0-stdext.jar;lib\jdbc3_0-ext.jar;lib\jnet.j ar;lib\jsse.jar;lib\jta-1.0.1B.jar;lib\junit.jar Starting Ant... Buildfile: build.xml init: prepare: compile: [javac] Compiling 103 source files to C:\jtds-1.2.2-src\build\classes [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\BlobImpl.java: 34: net.sourceforge.jtds.jdbc.BlobImpl is not abstract and does not override abs tract method getBinaryStream(long,long) in java.sql.Blob [javac] public class BlobImpl implements Blob { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\ConnectionJDBC 2.java:67: net.sourceforge.jtds.jdbc.ConnectionJDBC2 is not abstract and does no t override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection [javac] public class ConnectionJDBC2 implements java.sql.Connection { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\JtdsStatement. java:59: net.sourceforge.jtds.jdbc.JtdsStatement is not abstract and does not ov erride abstract method isPoolable() in java.sql.Statement [javac] public class JtdsStatement implements java.sql.Statement { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\JtdsPreparedSt atement.java:62: net.sourceforge.jtds.jdbc.JtdsPreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in java.sql. PreparedStatement [javac] public class JtdsPreparedStatement extends JtdsStatement implements PreparedStatement { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\JtdsResultSet. java:60: net.sourceforge.jtds.jdbc.JtdsResultSet is not abstract and does not ov erride abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql. ResultSet [javac] public class JtdsResultSet implements ResultSet { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\ClobImpl.java: 52: net.sourceforge.jtds.jdbc.ClobImpl is not abstract and does not override abs tract method getCharacterStream(long,long) in java.sql.Clob [javac] public class ClobImpl implements Clob { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\JtdsCallableSt atement.java:52: net.sourceforge.jtds.jdbc.JtdsCallableStatement is not abstract and does not override abstract method setNClob(java.lang.String,java.io.Reader) in java.sql.CallableStatement [javac] public class JtdsCallableStatement extends JtdsPreparedStatement imp lements CallableStatement { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\JtdsDatabaseMe taData.java:48: net.sourceforge.jtds.jdbc.JtdsDatabaseMetaData is not abstract a nd does not override abstract method getFunctionColumns(java.lang.String,java.la ng.String,java.lang.String,java.lang.String) in java.sql.DatabaseMetaData [javac] public class JtdsDatabaseMetaData implements java.sql.DatabaseMetaDa ta { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\JtdsResultSetM etaData.java:36: net.sourceforge.jtds.jdbc.JtdsResultSetMetaData is not abstract and does not override abstract method isWrapperFor(java.lang.Class<?>) in java. sql.Wrapper [javac] public class JtdsResultSetMetaData implements ResultSetMetaData { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbc\ParameterMetaD ataImpl.java:33: net.sourceforge.jtds.jdbc.ParameterMetaDataImpl is not abstract and does not override abstract method isWrapperFor(java.lang.Class<?>) in java. sql.Wrapper [javac] public class ParameterMetaDataImpl implements ParameterMetaData { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbcx\JtdsDataSourc e.java:47: net.sourceforge.jtds.jdbcx.JtdsDataSource is not abstract and does no t override abstract method isWrapperFor(java.lang.Class<?>) in java.sql.Wrapper [javac] public class JtdsDataSource [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbcx\PooledConnect ion.java:32: net.sourceforge.jtds.jdbcx.PooledConnection is not abstract and doe s not override abstract method removeStatementEventListener(javax.sql.StatementE ventListener) in javax.sql.PooledConnection [javac] public class PooledConnection implements javax.sql.PooledConnection { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbcx\JtdsXAConnect ion.java:32: net.sourceforge.jtds.jdbcx.JtdsXAConnection is not abstract and doe s not override abstract method removeStatementEventListener(javax.sql.StatementE ventListener) in javax.sql.PooledConnection [javac] public class JtdsXAConnection extends PooledConnection implements XA Connection { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbcx\proxy\Stateme ntProxy.java:32: net.sourceforge.jtds.jdbcx.proxy.StatementProxy is not abstract and does not override abstract method isPoolable() in java.sql.Statement [javac] public class StatementProxy implements Statement { [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbcx\proxy\Prepare dStatementProxy.java:34: net.sourceforge.jtds.jdbcx.proxy.PreparedStatementProxy is not abstract and does not override abstract method setNClob(int,java.io.Read er) in java.sql.PreparedStatement [javac] public class PreparedStatementProxy [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbcx\proxy\Callabl eStatementProxy.java:34: net.sourceforge.jtds.jdbcx.proxy.CallableStatementProxy is not abstract and does not override abstract method setNClob(java.lang.String ,java.io.Reader) in java.sql.CallableStatement [javac] public class CallableStatementProxy [javac] ^ [javac] C:\jtds-1.2.2-src\build\src\net\sourceforge\jtds\jdbcx\proxy\Connect ionProxy.java:34: net.sourceforge.jtds.jdbcx.proxy.ConnectionProxy is not abstra ct and does not override abstract method createStruct(java.lang.String,java.lang .Object[]) in java.sql.Connection [javac] public class ConnectionProxy 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] 17 errors BUILD FAILED C:\jtds-1.2.2-src\build.xml:56: Compile failed; see the compiler error output fo r details. Total time: 4 seconds -------------------- The main problem is the message "...is not abstract and does not override abstract method...". What is the problem here and does anyone know how to fix it? Thank you, Dave
|
|
|
|
|
|
|
Re: How to build JTDS JDBC driver
Posted:
Jun 25, 2009 6:46 AM
in response to: dave5555
|
|
|
The message "...is not abstract and does not override abstract method..." means that you have to declare the entire class abstract or you have to implement the specified method. I think the reason for your problem is that you don't use the right Java / JDBC API Version to compile the driver. You should check the docs for information about the java version you have to use.
hth Andreas
|
|
|
|
|
|
|
|
Re: How to build JTDS JDBC driver
Posted:
Jun 25, 2009 6:46 AM
in response to: dave5555
|
|
|
The message "...is not abstract and does not override abstract method..." means that you have to declare the entire class abstract or you have to implement the specified method. I think the reason for your problem is that you don't use the right Java / JDBC API Version to compile the driver. You should check the docs for information about the java version you have to use.
hth Andreas
|
|
|
|
|
|
|
|
Re: How to build JTDS JDBC driver
Posted:
Jun 25, 2009 3:47 PM
in response to: dave5555
|
|
|
You have to compile this project using JDK 1.5
JDK 1.6 introduced new APIs in JDBC which, apparently, the JTDS (whatever that may be, I'm ignorant, sorry) folks had no time to pick up on yet. You may avoid the issue if you use pre-built JARs from that project, as other option.
|
|
|
|
|
|
|
|
Re: How to build JTDS JDBC driver
Posted:
Jun 27, 2009 12:21 PM
in response to: dave5555
|
|
|
Thank you. I appreciate the information. I actually recompiled with JDK version 1.4.2 and it worked! Thanks
|
|
|
|
|