Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      JDK6

      Description

      When I try to run maven allBuild to build jetspeed, it fails with message:

      java:compile:
      [echo] Compiling to D:\java\src\portals-jetspeed-2.1.3-dev\components\rdbms/target/classes
      [javac] Compiling 13 source files to D:\java\src\portals-jetspeed-2.1.3-

      dev\components\rdbms\target\classes
      [javac] D:\java\src\portals-jetspeed-2.1.3-

      dev\components\rdbms\src\java\org\apache\jetspeed\components\rdbms\ojb\ConnectionRepositoryEntry.java:411:

      org
      .apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry.MinimalDataSource is not abstract and does

      not override abstract method isWrapperFor(java.lan
      g.Class) in java.sql.Wrapper
      [javac] private class MinimalDataSource implements DataSource
      [javac] ^
      [javac] 1 error

      This error raises because javax.sql.DataSource in JDK1.6 become to implement java.sql.Wrapper interface. But java5 doesn't implement it.

      So, I think, jetspeed developers have to implement isWrapperFor method for MinimalDataSource class, and tries to build jetspeed with JDK1.6.

      P.S.: I think, this is a bad practice to implement new interfaces in public classes and interfaces. I really can't understand, why Sun has did it...

        Activity

        Hide
        David Sean Taylor added a comment -

        closed, as I checked into 2.2 trunk only a solution

        Show
        David Sean Taylor added a comment - closed, as I checked into 2.2 trunk only a solution
        Hide
        David Sean Taylor added a comment -

        I don;'t think we can support Java 6 in 2.1.3 as we are also trying to support 1.4
        With the trunk, we will deprecate 1.4 support
        I applied this patch to the trunk and it compiles in Java 5:

        public boolean isWrapperFor(Class<?> iface) throws SQLException

        { return false; // #ifdef JDBC4 return getConnection().isWrapperFor(iface); }

        <T> T unwrap(Class<T> iface) throws SQLException

        { throw new SQLException("PoolingDataSource is not a wrapper."); //#ifdef JDBC4 return getConnection().unwrap(iface); }

        Im beginning we need #ifdefs here. I was looking at the commons dbcp project and they were doing conditional processing with Ant, see:

        https://issues.apache.org/jira/secure/attachment/12362389/patch.txt

        ah yes, makes you long for the coding C again...

        Show
        David Sean Taylor added a comment - I don;'t think we can support Java 6 in 2.1.3 as we are also trying to support 1.4 With the trunk, we will deprecate 1.4 support I applied this patch to the trunk and it compiles in Java 5: public boolean isWrapperFor(Class<?> iface) throws SQLException { return false; // #ifdef JDBC4 return getConnection().isWrapperFor(iface); } <T> T unwrap(Class<T> iface) throws SQLException { throw new SQLException("PoolingDataSource is not a wrapper."); //#ifdef JDBC4 return getConnection().unwrap(iface); } Im beginning we need #ifdefs here. I was looking at the commons dbcp project and they were doing conditional processing with Ant, see: https://issues.apache.org/jira/secure/attachment/12362389/patch.txt ah yes, makes you long for the coding C again...

          People

          • Assignee:
            David Sean Taylor
            Reporter:
            Vitaly Baranovsky
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development