Opened 15 years ago

Closed 15 years ago

#21037 closed defect (fixed)

commons-dbcp does not compile

Reported by: johan@… Owned by: jberry@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: boxerab@…, mfechner (Matthias Fechner), smibrahim@…, scooper@…, lastobelus@…, bhuisgen@…, com-macosforge@…, ericpallen@…, davis@…, macfreek (Freek Dijkstra), dr.roentgen@…, dossy@…, toshio.nishimura@…, nox@…
Port: commons-dbcp

Description (last modified by tobypeterson)

I tried installing tomcat6, but the installation fails on compiling commons-dbcp.

The errors message:
Command output:     [javac]        ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/PoolingConnection.java:42: org.apache.commons.dbcp.PoolingConnection is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
    [javac] public class PoolingConnection extends DelegatingConnection implements Connection, KeyedPoolableObjectFactory {

etc, etc.

Attachments (2)

macportsdebugdbcp.txt (27.5 KB) - added by johan@… 15 years ago.
debug output of port -d install commons-dbcp
commons-dbcp-JDK-1.6.diff (61.9 KB) - added by nox@… 15 years ago.
A patch for JDK-1.6 support

Download all attachments as: .zip

Change History (36)

comment:1 Changed 15 years ago by tobypeterson

Description: modified (diff)
Keywords: Snow Leopard removed
Version: 1.8.0

comment:2 Changed 15 years ago by tobypeterson

Please run sudo port clean commons-dbcp and then attach the output of sudo port -d install commons-dbcp

comment:3 Changed 15 years ago by tobypeterson

Summary: commons-dbcp does not compile not Snow Leopardcommons-dbcp does not compile

Changed 15 years ago by johan@…

Attachment: macportsdebugdbcp.txt added

debug output of port -d install commons-dbcp

comment:4 Changed 15 years ago by nerdling (Jeremy Lavergne)

By chance, did you follow the Migration instructions when you installed Snow Leopard?

comment:5 Changed 15 years ago by boxerab@…

Cc: boxerab@… added

Cc Me!

comment:6 Changed 15 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to jberry@…

comment:7 Changed 15 years ago by mfechner (Matthias Fechner)

Cc: idefix@… added

Cc Me!

comment:8 Changed 15 years ago by mfechner (Matthias Fechner)

Cc: idefix@… removed

Cc Me!

comment:9 Changed 15 years ago by mfechner (Matthias Fechner)

Cc: idefix@… added

Cc Me!

comment:10 Changed 15 years ago by mfechner (Matthias Fechner)

Exactly the same problem here. Installed Leopard Snow, wiped all installed ports and started a fresh install from the port.

Error message is:

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src" && ant dist -Djunit.jar=/opt/local/share/java/junit.jar -Dcommons-collections.jar=/opt/local/share/java/commons-collections.jar -Dcommons-pool.jar=/opt/local/share/java/commons-pool.jar " returned error 1
Command output:     [javac]        ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/PoolingConnection.java:42: org.apache.commons.dbcp.PoolingConnection is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
    [javac] public class PoolingConnection extends DelegatingConnection implements Connection, KeyedPoolableObjectFactory {
    [javac]        ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/PoolingDataSource.java:45: org.apache.commons.dbcp.PoolingDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class) in java.sql.Wrapper
    [javac] public class PoolingDataSource implements DataSource {
    [javac]        ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java:41: org.apache.commons.dbcp.cpdsadapter.ConnectionImpl is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
    [javac] class ConnectionImpl implements Connection {
    [javac] ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/cpdsadapter/PooledConnectionImpl.java:43: org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl is not abstract and does not override abstract method removeStatementEventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection
    [javac] class PooledConnectionImpl 
    [javac] ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/cpdsadapter/PoolablePreparedStatementStub.java:34: isClosed() in org.apache.commons.dbcp.DelegatingStatement cannot implement isClosed() in java.sql.Statement; attempting to assign weaker access privileges; was public
    [javac] class PoolablePreparedStatementStub extends PoolablePreparedStatement {
    [javac] ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java:52: org.apache.commons.dbcp.datasources.PerUserPoolDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class) in java.sql.Wrapper
    [javac] public class PerUserPoolDataSource
    [javac]        ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java:45: org.apache.commons.dbcp.datasources.SharedPoolDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class) in java.sql.Wrapper
    [javac] public class SharedPoolDataSource
    [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
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/build.xml:151: Compile failed; see the compiler error output for details.

Total time: 2 seconds

Error: The following dependencies failed to build: commons-dbcp commons-digester commons-el servlet24-api commons-fileupload commons-httpclient commons-codec commons-io commons-launcher commons-modeler mx4j jakarta-bcel jakarta-regexp jakarta-taglibs-standard-11 xalanj xercesj jaxen dom4j jdom xom saxpath
Error: Status 1 encountered during processing.

comment:11 Changed 15 years ago by smibrahim@…

Cc: smibrahim@… added

Cc Me!

comment:12 Changed 15 years ago by narf_tm@…

Tomcat will not try to build commons-dbcp if jdk1.6 is found. It just displays a message "WARNING: tomcat-dbcp.jar not included, this build can't be used in a release. Please run 'ant download' with JDK1.5 if you are building a tomcat release."

Can we remove the dependency under Snow Leopard until this is fixed and display a similar warning?

Reference

comment:13 Changed 15 years ago by scooper@…

Cc: scooper@… added

Cc Me!

comment:14 Changed 15 years ago by lastobelus@…

Cc: lastobelus@… added

Cc Me!

comment:15 Changed 15 years ago by bhuisgen@…

Cc: bhuisgen@… added

Cc Me!

comment:16 Changed 15 years ago by com-macosforge@…

Cc: com-macosforge@… added

Cc Me!

comment:17 Changed 15 years ago by ericpallen@…

Cc: ericpallen@… added

Cc Me!

comment:18 Changed 15 years ago by davis@…

Cc: davis@… added

Cc Me!

comment:19 Changed 15 years ago by davis@…

Dbcp 1.2.2 won't compile against JDK 1.6. See this bug report. Looks like it might have been fixed in dbcp 1.3. Could macports move to 1.3 or would that cause other dependency problems?

comment:20 in reply to:  19 ; Changed 15 years ago by scooper@…

Sadly, dbcp 1.3 isn't released yet.

comment:21 in reply to:  description ; Changed 15 years ago by lorenzo@…

I had a similar problem. It seems that Snow Leopard DOES NOT come with a JDK1.5! It creates symbolic links to it but these point in fact to JVM1.6!! I solved the problem by simply getting back JDK1.5 from my backup, edited the symbolic links and changed the default JAVA search order using Utilities-->Java Preferences. Once done, my java problems were gone!

Hope it works for you guys too; Kind regards Lorenzo.

Replying to johan@…:

I tried installing tomcat6, but the installation fails on compiling commons-dbcp.

The errors message:
Command output:     [javac]        ^
    [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_commons-dbcp/work/commons-dbcp-1.2.2-src/src/java/org/apache/commons/dbcp/PoolingConnection.java:42: org.apache.commons.dbcp.PoolingConnection is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
    [javac] public class PoolingConnection extends DelegatingConnection implements Connection, KeyedPoolableObjectFactory {

etc, etc.

comment:22 in reply to:  20 Changed 15 years ago by ironstorm@…

Replying to scooper@…:

Sadly, dbcp 1.3 isn't released yet.

What about using this replacement version or something... https://issues.apache.org/bugzilla/show_bug.cgi?id=46038

comment:23 in reply to:  10 Changed 15 years ago by mfechner (Matthias Fechner)

I already tried to reply via email, but it seems that it failed, here via web gui: I installed now the binary version of tomcat6. It's working without problems with the new jdk installed by snow leopard.

Bye, Matthias

comment:24 Changed 15 years ago by macfreek (Freek Dijkstra)

Cc: software@… added

Cc Me!

comment:25 in reply to:  21 Changed 15 years ago by plindberg@…

Replying to lorenzo@…:

I had a similar problem. It seems that Snow Leopard DOES NOT come with a JDK1.5! It creates symbolic links to it but these point in fact to JVM1.6!! I solved the problem by simply getting back JDK1.5 from my backup, edited the symbolic links and changed the default JAVA search order using Utilities-->Java Preferences. Once done, my java problems were gone!

I also did this. Copied 1.5.0 from backup into /System/Library/Frameworks/JavaVM.framework/Versions, did an ln -s 1.5.0 1.5, and then sudo env JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/ port install commons-dbcp.

Thanks!

comment:26 Changed 15 years ago by ryanlives@…

problems are due to the default jdk1.6 in Snow Leopard!!! Workaround: http://blog.gumho.org/2009/10/tomcat-6-on-snow-leopard.html

comment:27 Changed 15 years ago by dr.roentgen@…

Cc: dr.roentgen@… added

Cc Me!

comment:28 Changed 15 years ago by dossy@…

Cc: dossy@… added

Cc Me!

comment:29 Changed 15 years ago by nox@…

Cc: nox@… added

Cc Me!

comment:30 Changed 15 years ago by nox@…

Cc: nox@… removed

Cc Me!

Changed 15 years ago by nox@…

Attachment: commons-dbcp-JDK-1.6.diff added

A patch for JDK-1.6 support

comment:31 Changed 15 years ago by nox@…

This bug is known by upstream, I've attached a patch which fixes it.

comment:32 Changed 15 years ago by toshio.nishimura@…

Cc: toshio.nishimura@… added

Cc Me!

comment:33 Changed 15 years ago by nox@…

Cc: nox@… added

Cc Me!

comment:34 Changed 15 years ago by nox@…

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.