New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #21037 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

commons-dbcp does not compile

Reported by: johan@… Owned by: jberry@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: boxerab@…, idefix@…, smibrahim@…, scooper@…, lastobelus@…, bhuisgen@…, com-macosforge@…, ericpallen@…, davis@…, software@…, dr.roentgen@…, dossy@…, toshio.nishimura@…, nox@…
Port: commons-dbcp

Description (last modified by toby@…) (diff)

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

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

Change History

comment:1 Changed 4 years ago by toby@…

  • Keywords Snow Leopard removed
  • Version 1.8.0 deleted
  • Description modified (diff)

comment:2 Changed 4 years ago by toby@…

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

comment:3 Changed 4 years ago by toby@…

  • Summary changed from commons-dbcp does not compile not Snow Leopard to commons-dbcp does not compile

Changed 4 years ago by johan@…

debug output of port -d install commons-dbcp

comment:4 Changed 4 years ago by snc@…

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

comment:5 Changed 4 years ago by boxerab@…

  • Cc boxerab@… added

Cc Me!

comment:6 Changed 4 years ago by jmr@…

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

comment:7 Changed 4 years ago by idefix@…

  • Cc idefix@… added

Cc Me!

comment:8 Changed 4 years ago by idefix@…

  • Cc idefix@… removed

Cc Me!

comment:9 Changed 4 years ago by idefix@…

  • Cc idefix@… added

Cc Me!

comment:10 follow-up: ↓ 23 Changed 4 years ago by idefix@…

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 4 years ago by smibrahim@…

  • Cc smibrahim@… added

Cc Me!

comment:12 Changed 4 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 4 years ago by scooper@…

  • Cc scooper@… added

Cc Me!

comment:14 Changed 4 years ago by lastobelus@…

  • Cc lastobelus@… added

Cc Me!

comment:15 Changed 4 years ago by bhuisgen@…

  • Cc bhuisgen@… added

Cc Me!

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

  • Cc com-macosforge@… added

Cc Me!

comment:17 Changed 4 years ago by ericpallen@…

  • Cc ericpallen@… added

Cc Me!

comment:18 Changed 4 years ago by davis@…

  • Cc davis@… added

Cc Me!

comment:19 follow-up: ↓ 20 Changed 4 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 ; follow-up: ↓ 22 Changed 4 years ago by scooper@…

Sadly, dbcp 1.3 isn't released yet.

comment:21 in reply to: ↑ description ; follow-up: ↓ 25 Changed 4 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 4 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 4 years ago by idefix@…

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 4 years ago by software@…

  • Cc software@… added

Cc Me!

comment:25 in reply to: ↑ 21 Changed 4 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 4 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 4 years ago by dr.roentgen@…

  • Cc dr.roentgen@… added

Cc Me!

comment:28 Changed 4 years ago by dossy@…

  • Cc dossy@… added

Cc Me!

comment:29 Changed 3 years ago by nox@…

  • Cc nox@… added

Cc Me!

comment:30 Changed 3 years ago by nox@…

  • Cc nox@… removed

Cc Me!

Changed 3 years ago by nox@…

A patch for JDK-1.6 support

comment:31 Changed 3 years ago by nox@…

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

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

  • Cc toshio.nishimura@… added

Cc Me!

comment:33 Changed 3 years ago by nox@…

  • Cc nox@… added

Cc Me!

comment:34 Changed 3 years ago by nox@…

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.