从源代码构建 C3p0 时出现错误
我下载了源代码(v 0.9.1.2)并尝试构建它,首先从 命令行,然后在 IDE 中。
我认为问题是在 build.properties 文件中设置类路径。 这是我当前的类路径。当然,我尝试过各种事情 在这里,但都给出相同的结果:
j2ee.classpath=C:/glassfishv3/glassfish/lib/j2ee.jar
and tried:
j2ee.jar.base.dir=C:/glassfishv3/glassfish/lib
etc.
这是我得到的错误:
init-codegen:
[javac] Compiling 6 source files to C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\classes
beangen:
[echo] Some warnings are expected here. Don't worry about them.
newproxygen:
codegen:
compile-common:
[javac] Compiling 222 source files to C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\classes
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1339: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc
);
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1347: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw parentPooledConnection.handleThrowable( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1349: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] else throw SqlUtils.toSQLException( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1365: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc
);
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1373: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw parentPooledConnection.handleThrowable( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1375: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] else throw SqlUtils.toSQLException( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NewPooledConnection.java
:38: com.mchange.v2.c3p0.impl.NewPooledConnection is not abstract and does not override abstract method removeStatementE
ventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class NewPooledConnection extends AbstractC3P0PooledConnection{
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\ComboPooledDataSource.java:42
: com.mchange.v2.c3p0.ComboPooledDataSource is not abstract and does not override abstract method isWrapperFor(java.lang
.Class) in java.sql.Wrapper
[javac] public final class ComboPooledDataSource extends AbstractPoolBackedDataSource implements PooledDataSource, S
erializable, Referenceable
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\DriverManagerDataSource.java:
45: com.mchange.v2.c3p0.DriverManagerDataSource is not abstract and does not override abstract method isWrapperFor(java.
lang.Class) in java.sql.Wrapper
[javac] public final class DriverManagerDataSource extends DriverManagerDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\JndiRefForwardingDataSource.j
ava:47: com.mchange.v2.c3p0.JndiRefForwardingDataSource is not abstract and does not override abstract method isWrapperF
or(java.lang.Class) in java.sql.Wrapper
[javac] final class JndiRefForwardingDataSource extends JndiRefDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\PoolBackedDataSource.java:28:
com.mchange.v2.c3p0.PoolBackedDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.C
lass) in java.sql.Wrapper
[javac] public final class PoolBackedDataSource extends AbstractPoolBackedDataSource implements PooledDataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:39: com.mchange.v2.c3p0.impl.C3P0PooledConnection is not abstract and does not override abstract method removeStatemen
tEventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class C3P0PooledConnection extends AbstractC3P0PooledConnection
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:503: com.mchange.v2.c3p0.impl.C3P0PooledConnection.StatementProxyingSetManagedResultSet is not abstract and does not o
verride abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] private static class StatementProxyingSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:618: ProxyCallableStatement is not abstract and does not override abstract method setNClob(java.lang.String,java.io.Re
ader) in java.sql.CallableStatement
[javac] class ProxyCallableStatement extends FilterCallableStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:655: ProxyPreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in java
.sql.PreparedStatement
[javac] class ProxyPreparedStatement extends FilterPreparedStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:692: ProxyStatement is not abstract and does not override abstract method isPoolable() in java.sql.Statement
[javac] class ProxyStatement extends FilterStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NullStatementSetManagedR
esultSet.java:37: com.mchange.v2.c3p0.impl.NullStatementSetManagedResultSet is not abstract and does not override abstra
ct method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class NullStatementSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SetManagedDatabaseMetaDa
ta.java:30: com.mchange.v2.c3p0.impl.SetManagedDatabaseMetaData is not abstract and does not override abstract method ge
tFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in java.sql.DatabaseMetaData
[javac] final class SetManagedDatabaseMetaData extends FilterDatabaseMetaData
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SnatchFromSetResultSet.j
ava:30: com.mchange.v2.c3p0.impl.SnatchFromSetResultSet is not abstract and does not override abstract method updateNClo
b(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class SnatchFromSetResultSet extends FilterResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\test\FreezableDriverManagerDa
taSource.java:49: com.mchange.v2.c3p0.test.FreezableDriverManagerDataSource is not abstract and does not override abstra
ct method isWrapperFor(java.lang.Class) in java.sql.Wrapper
[javac] public final class FreezableDriverManagerDataSource extends DriverManagerDataSourceBase implements DataSourc
e
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\util\CloseReportingConnection
Wrapper.java:29: com.mchange.v2.c3p0.util.CloseReportingConnectionWrapper is not abstract and does not override abstract
method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
[javac] public class CloseReportingConnectionWrapper extends FilterConnection
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 21 errors
BUILD FAILED
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build.xml:256: Compile failed; see the compiler error output for details.
编辑: 以下是我使用 Java 5 构建时遇到的错误:
compile-common:
[javac] Compiling 226 source files to C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\classes
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NewPooledConnection.jav
:38: com.mchange.v2.c3p0.impl.NewPooledConnection is not abstract and does not override abstract method removeStatement
ventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class NewPooledConnection extends AbstractC3P0PooledConnection{
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\ComboPooledDataSource.java:4
: com.mchange.v2.c3p0.ComboPooledDataSource is not abstract and does not override abstract method isWrapperFor(java.lan
.Class) in java.sql.Wrapper
[javac] public final class ComboPooledDataSource extends AbstractPoolBackedDataSource implements PooledDataSource,
erializable, Referenceable
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\DriverManagerDataSource.java
45: com.mchange.v2.c3p0.DriverManagerDataSource is not abstract and does not override abstract method isWrapperFor(java
lang.Class) in java.sql.Wrapper
[javac] public final class DriverManagerDataSource extends DriverManagerDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\JndiRefForwardingDataSource.
ava:47: com.mchange.v2.c3p0.JndiRefForwardingDataSource is not abstract and does not override abstract method isWrapper
or(java.lang.Class) in java.sql.Wrapper
[javac] final class JndiRefForwardingDataSource extends JndiRefDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\PoolBackedDataSource.java:28
com.mchange.v2.c3p0.PoolBackedDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.
lass) in java.sql.Wrapper
[javac] public final class PoolBackedDataSource extends AbstractPoolBackedDataSource implements PooledDataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:39: com.mchange.v2.c3p0.impl.C3P0PooledConnection is not abstract and does not override abstract method removeStateme
tEventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class C3P0PooledConnection extends AbstractC3P0PooledConnection
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:503: com.mchange.v2.c3p0.impl.C3P0PooledConnection.StatementProxyingSetManagedResultSet is not abstract and does not
verride abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] private static class StatementProxyingSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:618: ProxyCallableStatement is not abstract and does not override abstract method setNClob(java.lang.String,java.io.R
ader) in java.sql.CallableStatement
[javac] class ProxyCallableStatement extends FilterCallableStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:655: ProxyPreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in jav
.sql.PreparedStatement
[javac] class ProxyPreparedStatement extends FilterPreparedStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:692: ProxyStatement is not abstract and does not override abstract method isPoolable() in java.sql.Statement
[javac] class ProxyStatement extends FilterStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NullStatementSetManaged
esultSet.java:37: com.mchange.v2.c3p0.impl.NullStatementSetManagedResultSet is not abstract and does not override abstr
ct method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class NullStatementSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SetManagedDatabaseMetaD
ta.java:30: com.mchange.v2.c3p0.impl.SetManagedDatabaseMetaData is not abstract and does not override abstract method g
tFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in java.sql.DatabaseMetaData
[javac] final class SetManagedDatabaseMetaData extends FilterDatabaseMetaData
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SnatchFromSetResultSet.
ava:30: com.mchange.v2.c3p0.impl.SnatchFromSetResultSet is not abstract and does not override abstract method updateNCl
b(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class SnatchFromSetResultSet extends FilterResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\test\FreezableDriverManagerD
taSource.java:49: com.mchange.v2.c3p0.test.FreezableDriverManagerDataSource is not abstract and does not override abstr
ct method isWrapperFor(java.lang.Class) in java.sql.Wrapper
[javac] public final class FreezableDriverManagerDataSource extends DriverManagerDataSourceBase implements DataSour
e
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\util\CloseReportingConnectio
Wrapper.java:29: com.mchange.v2.c3p0.util.CloseReportingConnectionWrapper is not abstract and does not override abstrac
method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
[javac] public class CloseReportingConnectionWrapper extends FilterConnection
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 15 errors
BUILD FAILED
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build.xml:256: Compile failed; see the compiler error output for details
Total time: 15 seconds
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src>java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src>
I downloaded the source (v 0.9.1.2) and tried building it, first from
command line and then inside an IDE.
I think the problem is setting classpath in the build.properties file.
Here is my current classpath. Of course, I've tried various things
here, but all give the same results:
j2ee.classpath=C:/glassfishv3/glassfish/lib/j2ee.jar
and tried:
j2ee.jar.base.dir=C:/glassfishv3/glassfish/lib
etc.
Here are the errors I get:
init-codegen:
[javac] Compiling 6 source files to C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\classes
beangen:
[echo] Some warnings are expected here. Don't worry about them.
newproxygen:
codegen:
compile-common:
[javac] Compiling 222 source files to C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\classes
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1339: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc
);
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1347: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw parentPooledConnection.handleThrowable( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1349: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] else throw SqlUtils.toSQLException( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1365: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw SqlUtils.toSQLException("You can't operate on a closed Connection!!!", exc
);
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1373: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] throw parentPooledConnection.handleThrowable( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\codegen\com\mchange\v2\c3p0\impl\NewProxyConnection.jav
a:1375: unreported exception java.sql.SQLException; must be caught or declared to be thrown
[javac] else throw SqlUtils.toSQLException( exc );
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NewPooledConnection.java
:38: com.mchange.v2.c3p0.impl.NewPooledConnection is not abstract and does not override abstract method removeStatementE
ventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class NewPooledConnection extends AbstractC3P0PooledConnection{
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\ComboPooledDataSource.java:42
: com.mchange.v2.c3p0.ComboPooledDataSource is not abstract and does not override abstract method isWrapperFor(java.lang
.Class) in java.sql.Wrapper
[javac] public final class ComboPooledDataSource extends AbstractPoolBackedDataSource implements PooledDataSource, S
erializable, Referenceable
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\DriverManagerDataSource.java:
45: com.mchange.v2.c3p0.DriverManagerDataSource is not abstract and does not override abstract method isWrapperFor(java.
lang.Class) in java.sql.Wrapper
[javac] public final class DriverManagerDataSource extends DriverManagerDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\JndiRefForwardingDataSource.j
ava:47: com.mchange.v2.c3p0.JndiRefForwardingDataSource is not abstract and does not override abstract method isWrapperF
or(java.lang.Class) in java.sql.Wrapper
[javac] final class JndiRefForwardingDataSource extends JndiRefDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\PoolBackedDataSource.java:28:
com.mchange.v2.c3p0.PoolBackedDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.C
lass) in java.sql.Wrapper
[javac] public final class PoolBackedDataSource extends AbstractPoolBackedDataSource implements PooledDataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:39: com.mchange.v2.c3p0.impl.C3P0PooledConnection is not abstract and does not override abstract method removeStatemen
tEventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class C3P0PooledConnection extends AbstractC3P0PooledConnection
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:503: com.mchange.v2.c3p0.impl.C3P0PooledConnection.StatementProxyingSetManagedResultSet is not abstract and does not o
verride abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] private static class StatementProxyingSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:618: ProxyCallableStatement is not abstract and does not override abstract method setNClob(java.lang.String,java.io.Re
ader) in java.sql.CallableStatement
[javac] class ProxyCallableStatement extends FilterCallableStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:655: ProxyPreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in java
.sql.PreparedStatement
[javac] class ProxyPreparedStatement extends FilterPreparedStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.jav
a:692: ProxyStatement is not abstract and does not override abstract method isPoolable() in java.sql.Statement
[javac] class ProxyStatement extends FilterStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NullStatementSetManagedR
esultSet.java:37: com.mchange.v2.c3p0.impl.NullStatementSetManagedResultSet is not abstract and does not override abstra
ct method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class NullStatementSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SetManagedDatabaseMetaDa
ta.java:30: com.mchange.v2.c3p0.impl.SetManagedDatabaseMetaData is not abstract and does not override abstract method ge
tFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in java.sql.DatabaseMetaData
[javac] final class SetManagedDatabaseMetaData extends FilterDatabaseMetaData
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SnatchFromSetResultSet.j
ava:30: com.mchange.v2.c3p0.impl.SnatchFromSetResultSet is not abstract and does not override abstract method updateNClo
b(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class SnatchFromSetResultSet extends FilterResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\test\FreezableDriverManagerDa
taSource.java:49: com.mchange.v2.c3p0.test.FreezableDriverManagerDataSource is not abstract and does not override abstra
ct method isWrapperFor(java.lang.Class) in java.sql.Wrapper
[javac] public final class FreezableDriverManagerDataSource extends DriverManagerDataSourceBase implements DataSourc
e
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\util\CloseReportingConnection
Wrapper.java:29: com.mchange.v2.c3p0.util.CloseReportingConnectionWrapper is not abstract and does not override abstract
method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
[javac] public class CloseReportingConnectionWrapper extends FilterConnection
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 21 errors
BUILD FAILED
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build.xml:256: Compile failed; see the compiler error output for details.
EDIT:
Here are the errors I get when building with Java 5:
compile-common:
[javac] Compiling 226 source files to C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build\classes
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NewPooledConnection.jav
:38: com.mchange.v2.c3p0.impl.NewPooledConnection is not abstract and does not override abstract method removeStatement
ventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class NewPooledConnection extends AbstractC3P0PooledConnection{
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\ComboPooledDataSource.java:4
: com.mchange.v2.c3p0.ComboPooledDataSource is not abstract and does not override abstract method isWrapperFor(java.lan
.Class) in java.sql.Wrapper
[javac] public final class ComboPooledDataSource extends AbstractPoolBackedDataSource implements PooledDataSource,
erializable, Referenceable
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\DriverManagerDataSource.java
45: com.mchange.v2.c3p0.DriverManagerDataSource is not abstract and does not override abstract method isWrapperFor(java
lang.Class) in java.sql.Wrapper
[javac] public final class DriverManagerDataSource extends DriverManagerDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\JndiRefForwardingDataSource.
ava:47: com.mchange.v2.c3p0.JndiRefForwardingDataSource is not abstract and does not override abstract method isWrapper
or(java.lang.Class) in java.sql.Wrapper
[javac] final class JndiRefForwardingDataSource extends JndiRefDataSourceBase implements DataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\PoolBackedDataSource.java:28
com.mchange.v2.c3p0.PoolBackedDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.
lass) in java.sql.Wrapper
[javac] public final class PoolBackedDataSource extends AbstractPoolBackedDataSource implements PooledDataSource
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:39: com.mchange.v2.c3p0.impl.C3P0PooledConnection is not abstract and does not override abstract method removeStateme
tEventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
[javac] public final class C3P0PooledConnection extends AbstractC3P0PooledConnection
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:503: com.mchange.v2.c3p0.impl.C3P0PooledConnection.StatementProxyingSetManagedResultSet is not abstract and does not
verride abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] private static class StatementProxyingSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:618: ProxyCallableStatement is not abstract and does not override abstract method setNClob(java.lang.String,java.io.R
ader) in java.sql.CallableStatement
[javac] class ProxyCallableStatement extends FilterCallableStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:655: ProxyPreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in jav
.sql.PreparedStatement
[javac] class ProxyPreparedStatement extends FilterPreparedStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\C3P0PooledConnection.ja
a:692: ProxyStatement is not abstract and does not override abstract method isPoolable() in java.sql.Statement
[javac] class ProxyStatement extends FilterStatement implements C3P0ProxyStatement
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\NullStatementSetManaged
esultSet.java:37: com.mchange.v2.c3p0.impl.NullStatementSetManagedResultSet is not abstract and does not override abstr
ct method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class NullStatementSetManagedResultSet extends SetManagedResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SetManagedDatabaseMetaD
ta.java:30: com.mchange.v2.c3p0.impl.SetManagedDatabaseMetaData is not abstract and does not override abstract method g
tFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String) in java.sql.DatabaseMetaData
[javac] final class SetManagedDatabaseMetaData extends FilterDatabaseMetaData
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\impl\SnatchFromSetResultSet.
ava:30: com.mchange.v2.c3p0.impl.SnatchFromSetResultSet is not abstract and does not override abstract method updateNCl
b(java.lang.String,java.io.Reader) in java.sql.ResultSet
[javac] final class SnatchFromSetResultSet extends FilterResultSet
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\test\FreezableDriverManagerD
taSource.java:49: com.mchange.v2.c3p0.test.FreezableDriverManagerDataSource is not abstract and does not override abstr
ct method isWrapperFor(java.lang.Class) in java.sql.Wrapper
[javac] public final class FreezableDriverManagerDataSource extends DriverManagerDataSourceBase implements DataSour
e
[javac] ^
[javac] C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\src\classes\com\mchange\v2\c3p0\util\CloseReportingConnectio
Wrapper.java:29: com.mchange.v2.c3p0.util.CloseReportingConnectionWrapper is not abstract and does not override abstrac
method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
[javac] public class CloseReportingConnectionWrapper extends FilterConnection
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 15 errors
BUILD FAILED
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src\build.xml:256: Compile failed; see the compiler error output for details
Total time: 15 seconds
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src>java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)
C:\downloads\c3p0-0.9.1.2.src\c3p0-0.9.1.2.src>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,您正在尝试使用 Java6 进行构建,但这是行不通的。
c3p0 0.9.1.2 版本仅适用于 Java5。
您需要尝试使用 JDK1.5 再次构建它。
不幸的是,“ant clean”目标无法 100% 清理,因此您可能需要删除文件夹并重新开始。
无论如何,你为什么要尝试从源代码构建?
有一个二进制文件可供下载,看起来您只是让自己的事情变得复杂。
It looks to me like you're trying to build with Java6, and that won't work.
The 0.9.1.2 version of c3p0 only works with Java5.
You'll need to try building it again with JDK1.5
Unfortunately, the "ant clean" target doesn't clean up 100%, so you'll probably want to delete your folder and start again.
Why are you trying to build from source anyway?
There's a binary download available, and it looks like you're just complicating things for yourself.