Derby
  1. Derby
  2. DERBY-5998

Replication tests fail on CDC platforms without optional JSSE package

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.8.3.0, 10.9.2.2, 10.10.1.1
    • Fix Version/s: 10.8.3.3, 10.9.2.2, 10.10.1.1
    • Component/s: Replication, Test
    • Labels:
      None
    • Environment:
      phoneME Advanced (phoneme_advanced_mr2-b168)
    • Bug behavior facts:
      Regression Test Failure

      Description

      The replication code uses the javax.net.ServerSocketFactory class, which is not part of the core API defined by Foundation Profile 1.1. It is however part of an optional security package (JSSE) defined by the same specification, so it may or may not be available on the CDC platforms that Derby runs on.

      Running the replication tests on phoneME without said optional package, results in NoClassDefFoundError:

      Caused by: java.lang.NoClassDefFoundError: javax.net.SocketFactory
      at org.apache.derby.impl.store.replication.net.ReplicationMessageTransmit$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Unknown Source)
      at java.security.AccessController.doPrivileged(Unknown Source)
      at org.apache.derby.impl.store.replication.net.ReplicationMessageTransmit.initConnection(Unknown Source)
      at org.apache.derby.impl.store.replication.master.MasterController.setupConnection(Unknown Source)
      at org.apache.derby.impl.store.replication.master.MasterController.startMaster(Unknown Source)
      at org.apache.derby.impl.store.raw.RawStore.startReplicationMaster(Unknown Source)
      at org.apache.derby.impl.store.access.RAMAccessManager.startReplicationMaster(Unknown Source)
      at org.apache.derby.impl.db.BasicDatabase.startReplicationMaster(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleStartReplicationMaster(Unknown Source)

      We might fix this by rewriting the replication code so that it's not dependent on optional packages on CDC. However, there have not been any user requests for this functionality on platforms without that package, as far as I'm aware, so I suggest we just skip the replication tests for now if that package is missing.

      The tests I've run on Oracle Java Micro Edition Embedded Client 1.1 (OJEC) have not revealed this problem, as OJEC comes with the optional JSSE package (it's version output lists "JSSE JSR219" under the components section). And since the reports from the weme 6.2 test runs don't show this failure, I think it's included there as well.

      1. d5998-1a.diff
        1 kB
        Knut Anders Hatlen

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        30m 22s 1 Knut Anders Hatlen 15/Nov/12 09:58
        In Progress In Progress Resolved Resolved
        4d 3h 18m 1 Knut Anders Hatlen 19/Nov/12 13:17
        Resolved Resolved Closed Closed
        209d 20h 9m 1 Knut Anders Hatlen 17/Jun/13 10:27
        Gavin made changes -
        Workflow jira [ 12734121 ] Default workflow, editable Closed status [ 12802889 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kathey Marsden made changes -
        Affects Version/s 10.9.2.0 [ 12323562 ]
        Affects Version/s 10.9.1.1 [ 12321551 ]
        Fix Version/s 10.9.2.0 [ 12323562 ]
        Fix Version/s 10.9.1.1 [ 12321551 ]
        Knut Anders Hatlen made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Issue & fix info Patch Available [ 10102 ]
        Fix Version/s 10.9.1.1 [ 12321551 ]
        Fix Version/s 10.10.0.0 [ 12321550 ]
        Fix Version/s 10.8.3.1 [ 12323475 ]
        Resolution Fixed [ 1 ]
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1411160.
        Backported to 10.9 (revision 1411161) and 10.8 (revision 1411163).

        Show
        Knut Anders Hatlen added a comment - Committed revision 1411160. Backported to 10.9 (revision 1411161) and 10.8 (revision 1411163).
        Knut Anders Hatlen made changes -
        Issue & fix info Patch Available [ 10102 ]
        Knut Anders Hatlen made changes -
        Attachment d5998-1a.diff [ 12553642 ]
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch (d5998-1a.diff) excludes all replication tests if the javax.net.ServerSocketFactory class is not available. I've verified that it skips all replication tests on phoneME Advanced without the optional package, it runs one replication test on OJEC (the others are already skipped because they require the network client driver), and it runs all tests on Java SE 7.

        Show
        Knut Anders Hatlen added a comment - The attached patch (d5998-1a.diff) excludes all replication tests if the javax.net.ServerSocketFactory class is not available. I've verified that it skips all replication tests on phoneME Advanced without the optional package, it runs one replication test on OJEC (the others are already skipped because they require the network client driver), and it runs all tests on Java SE 7.
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Assignee Knut Anders Hatlen [ knutanders ]
        Knut Anders Hatlen created issue -

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development