Получение ошибок при построении C3p0 из исходного кода


Я скачал исходный код (v 0.9.1.2) и попытался построить его, сначала из командная строка,а затем внутри IDE.

Я думаю, что проблема заключается в установке пути к классу в сборке.файл свойств. Вот мой текущий путь к классу. Конечно, я пробовал разные вещи. здесь, но все дают одинаковые результаты:

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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildclasses

beangen:
     [echo] Some warnings are expected here. Don't worry about them.

newproxygen:

codegen:

compile-common:
    [javac] Compiling 222 source files to C:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildclasses
    [javac] C:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildcodegencommchangev2c3p0implNewProxyConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildcodegencommchangev2c3p0implNewProxyConnection.jav
a:1347: unreported exception java.sql.SQLException; must be caught or declared to be thrown
    [javac]                             throw parentPooledConnection.handleThrowable( exc );
    [javac]                             ^
    [javac] C:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildcodegencommchangev2c3p0implNewProxyConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildcodegencommchangev2c3p0implNewProxyConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildcodegencommchangev2c3p0implNewProxyConnection.jav
a:1373: unreported exception java.sql.SQLException; must be caught or declared to be thrown
    [javac]                             throw parentPooledConnection.handleThrowable( exc );
    [javac]                             ^
    [javac] C:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildcodegencommchangev2c3p0implNewProxyConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implNewPooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0ComboPooledDataSource.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0DriverManagerDataSource.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0JndiRefForwardingDataSource.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0PoolBackedDataSource.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implNullStatementSetManagedR
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implSetManagedDatabaseMetaDa
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implSnatchFromSetResultSet.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0testFreezableDriverManagerDa
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0utilCloseReportingConnection
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuild.xml:256: Compile failed; see the compiler error output for details.

Править: Вот ошибки, которые я получаю при построении с Java 5:

compile-common:
    [javac] Compiling 226 source files to C:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuildclasses
    [javac] C:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implNewPooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0ComboPooledDataSource.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0DriverManagerDataSource.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0JndiRefForwardingDataSource.
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0PoolBackedDataSource.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implC3P0PooledConnection.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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implNullStatementSetManaged
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implSetManagedDatabaseMetaD
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0implSnatchFromSetResultSet.
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0testFreezableDriverManagerD
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcsrcclassescommchangev2c3p0utilCloseReportingConnectio
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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.srcbuild.xml:256: Compile failed; see the compiler error output for details


Total time: 15 seconds
C:downloadsc3p0-0.9.1.2.srcc3p0-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:downloadsc3p0-0.9.1.2.srcc3p0-0.9.1.2.src>
1 4

1 ответ:

Мне кажется, что вы пытаетесь построить с Java6, и это не сработает. Версия 0.9.1.2 c3p0 работает только с Java5.

Вам нужно будет попробовать построить его снова с помощью JDK1. 5

К сожалению, цель "ant clean" не очищается на 100%, поэтому вы, вероятно, захотите удалить свою папку и начать все сначала.

Почему вы все равно пытаетесь строить из исходного кода? Существует бинарная загрузка, и похоже, что вы просто усложняете себе жизнь.