dm Server
  1. dm Server
  2. DMS-2029

Error Deploying collections, beanutils, digester & struts Bundles from EBR on dm Server 2

    Details

    • Type: Defect Defect
    • Status: Done Done
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.0.M5
    • Fix Version/s: Sprint 14, 2.0.0.RC1, 2.0.0.RELEASE
    • Component/s: None
    • Labels:
      None
    • Environment:

      windows xp, dm server 2 versions M5, CI-453 and CI-458

      Description

      Please see the forum reference thread for detailed information.

      To reproduce simply, drop the following into the pickup folder of a CLEAN dm server 2 (I have tried M5, CI-453 and CI-458) in the order listed here:

      1. com.springsource.org.apache.commons.collections-3.2.1
      2. com.springsource.org.apache.commons.beanutils-1.8.0
      3. com.springsource.org.apache.commons.digester-1.8.1
      4. com.springsource.org.apache.struts-1.1.0

      You will get an error on the struts deployment and the error in the dm server log/console is unhelpful:

      Caused by: com.springsource.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.springsource.org.apache.struts' at version '1.1.0': Cannot resolve: com.springsource.org.apache.struts
      Unsatisfied leaf constraints:

      Starting the "installed" struts module from the dm server ssh console yields slightly better help:

      Error occured while starting bundle '[62] com.springsource.org.apache.struts-1.1.0' : The bundle could not be resolved. Reason: Package uses conflict: Import-Package: org.apache.commons.digester; version="[1.8.0,2.0.0)"

      The best I've been able to come up with is that digester has pulled in com.springsource.slf4j.org.apache.commons.logging-1.5.6 to satisfy the import for org.apache.commons.logging. However, once that is done, any subsequent request for that package resolves to two bundles:

      Package:org.apache.commons.logging
      Importers:
      2 Resolved org.springframework.aop-3.0.0.RC1
      5 Resolved org.springframework.beans-3.0.0.RC1
      6 Resolved org.springframework.core-3.0.0.RC1
      7 Resolved org.springframework.context-3.0.0.RC1
      8 Resolved org.springframework.osgi.core-1.2.1
      9 Resolved org.springframework.osgi.extender-1.2.1
      10 Resolved org.springframework.osgi.io-1.2.1
      33 Resolved com.springsource.org.apache.commons.httpclient-3.1.0
      43 Resolved org.springframework.oxm-3.0.0.RC1
      44 Resolved org.springframework.web-3.0.0.RC1
      45 Resolved com.springsource.server.admin.content-2.0.0.D-20091027131059
      46 Resolved com.springsource.server.admin.web-2.0.0.D-20091027131059
      49 Resolved org.springframework.context.support-3.0.0.RC1
      50 Resolved org.springframework.jdbc-3.0.0.RC1
      51 Resolved org.springframework.js-2.0.8.RELEASE
      52 Resolved org.springframework.transaction-3.0.0.RC1
      53 Resolved org.springframework.web.servlet-3.0.0.RC1
      59 Resolved com.springsource.org.apache.commons.beanutils-1.8.0
      60 Resolved com.springsource.org.apache.commons.digester-1.8.1
      62 Resolved com.springsource.org.apache.struts-1.1.0
      Exporters:
      1 Resolved com.springsource.region.user-0.0.0
      61 Resolved com.springsource.slf4j.org.apache.commons.logging-1.5.6

      I think that it is the commons logging import from struts which is now causing this problem because com.springsource.region.user is exporting it along with slf4j, both of which are provided by springsource dm server.

        Activity

        Hide
        Andy Wilkinson added a comment -

        I've reproduced this on dm Server built straight out of Git and have made a little bit of progress.

        The commons digester bundle imports the org.apache.commons.logging.impl package. This package is available in the kernel, but isn't passed through into the user region. As a result of this the package isn't available in the user region and, correctly, a bundle is installed to satisfy the dependency: com.springsource.slf4j.org.apache.commons.logging-1.5.6. Things then get in a mess as there are a number of the bundle in the user region getting commons logging from com.springsource.region.user-0.0.0 and others getting it from com.springsource.slf4j.org.apache.commons.logging-1.5.6 which was faulted in to satisfy digester's requirements.

        Interestingly, if I place beanutils, digester and collections in repository/usr, and struts in pickup the struts bundle installs and starts successfully: there's a temporal aspect to the resolution failure that's exposed by deploying and therefore resolving the bundles one at a time. This is really a side issue: I believe that the fact that we're faulting in the com.springsource.slf4j.org.apache.commons.logging-1.5.6 bundle at all if the root cause of the problem.

        Show
        Andy Wilkinson added a comment - I've reproduced this on dm Server built straight out of Git and have made a little bit of progress. The commons digester bundle imports the org.apache.commons.logging.impl package. This package is available in the kernel, but isn't passed through into the user region. As a result of this the package isn't available in the user region and, correctly, a bundle is installed to satisfy the dependency: com.springsource.slf4j.org.apache.commons.logging-1.5.6. Things then get in a mess as there are a number of the bundle in the user region getting commons logging from com.springsource.region.user-0.0.0 and others getting it from com.springsource.slf4j.org.apache.commons.logging-1.5.6 which was faulted in to satisfy digester's requirements. Interestingly, if I place beanutils, digester and collections in repository/usr, and struts in pickup the struts bundle installs and starts successfully: there's a temporal aspect to the resolution failure that's exposed by deploying and therefore resolving the bundles one at a time. This is really a side issue: I believe that the fact that we're faulting in the com.springsource.slf4j.org.apache.commons.logging-1.5.6 bundle at all if the root cause of the problem.
        Hide
        Andy Wilkinson added a comment -

        Good news. Updating config/com.springsource.kernel.region.properties to import the org.apache.commons.logging.impl package into the user region allows the 4 bundles to be deployed via pickup in the order listed above. The required change is to add the following to the com.springsource.kernel.region.imports property:

         org.apache.commons.logging.impl;version="[1.0.0,2.0.0)",\
        
        Show
        Andy Wilkinson added a comment - Good news. Updating config/com.springsource.kernel.region.properties to import the org.apache.commons.logging.impl package into the user region allows the 4 bundles to be deployed via pickup in the order listed above. The required change is to add the following to the com.springsource.kernel.region.imports property: org.apache.commons.logging.impl;version="[1.0.0,2.0.0)",\
        Hide
        Andy Wilkinson added a comment - - edited

        Another side issue here is that the shell is showing the wrong wiring for the org.apache.commons.logging packages that's exported by the com.springsource.slf4j.org.apache.commons.logging-1.5.6 bundle. I've opened DMS-2045 to fix this.

        I'll use this issue to correct the com.springsource.kernel.region.properties file so that both commons logging packages are shared between the kernel and the user region.

        Show
        Andy Wilkinson added a comment - - edited Another side issue here is that the shell is showing the wrong wiring for the org.apache.commons.logging packages that's exported by the com.springsource.slf4j.org.apache.commons.logging-1.5.6 bundle. I've opened DMS-2045 to fix this. I'll use this issue to correct the com.springsource.kernel.region.properties file so that both commons logging packages are shared between the kernel and the user region.
        Hide
        Andy Wilkinson added a comment -

        This issue is fixed in CI-476 and later.

        Show
        Andy Wilkinson added a comment - This issue is fixed in CI-476 and later.

          People

          • Assignee:
            Andy Wilkinson
            Reporter:
            Scott Hamilton
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 1h
              1h