dm Server
  1. dm Server
  2. DMS-1738

Pointing dm Server to a maven local repository gives a DuplicateBundleException

    Details

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

      Windows 2003 Server

      Description

      Pointing the dm Server to the attached repository yields the exception. In trying to trim down the repo to its minimum it looks like we have 3 different apache commons codec bundles in 3 different locations that may be contributing to this, tho there are some interrelationships with other apache commons that might also be playing a factor - I could not reduce the repo to just the three duplicate bundles and reproduce the error, for instance. I also left in a jug-1.jar file that generates a warning that I cannot explain - this is incidental and not directly related to this bug report.

      The DuplicateBundleException reported:

      R:\bin\springsource\dm-server-1.0.2.SR02\bin>startup
      [2009-10-14 09:53:06.955] main <SPKB0001I> Server starting.
      [2009-10-14 09:53:07.705] main <SPOF0001I> OSGi telnet console available on port 2401.
      [2009-10-14 09:53:09.362] main <SPOP0004W> The bundle 'R:\repository\tms\lib\jug\1\jug-1.jar' could not be provisioned as its manifest is malformed. The error encountered whilst parsing the manifest was: Exception reading manifest. Source: 'unknown'
      [2009-10-14 09:53:10.799] main <SPKB0002E> Start failed:
      com.springsource.server.osgi.framework.OsgiFrameworkException: Error installing fragment from 'R:\bin\springsource\dm-server-1.0.2.SR02\repository\bundles\subsystems\com.springsource.server.kernel\com.springsource.server.kernel.dm-1.0.2.SR02.jar' for bundle 'org.springframework.osgi.extender'
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.resolveFragments(EquinoxBundleInstaller.java:179)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundleInternal(EquinoxBundleInstaller.java:149)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundle(EquinoxBundleInstaller.java:105)
      at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundleFromLocation(AbstractBundleInstaller.java:170)
      at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundleFromDefinition(AbstractBundleInstaller.java:242)
      at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundle(AbstractBundleInstaller.java:137)
      at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundle(AbstractBundleInstaller.java:109)
      at com.springsource.server.kernel.bootstrap.KernelBootstrap.start(KernelBootstrap.java:73)
      at com.springsource.server.kernel.bootstrap.Bootstrap.main(Bootstrap.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.springsource.server.bootstrap.harness.BootHarness.main(BootHarness.java:63)
      Caused by: org.eclipse.osgi.framework.internal.core.Framework$DuplicateBundleException: Bundle "org.apache.commons.codec" version "1.3.0.v20080530-1600" has already been installed from: file:///R:\repository\org\eclipse\birt\org.apache.commons.codec_1.3.0.v20080530-1600\2.3\org.apache.commons.codec_1.3.0.v20080530-1600-2.3.jar
      at org.eclipse.osgi.framework.internal.core.Framework.createAndVerifyBundle(Framework.java:700)
      at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:939)
      at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:824)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.eclipse.osgi.framework.internal.core.Framework.installWorker(Framework.java:905)
      at org.eclipse.osgi.framework.internal.core.Framework.installBundle(Framework.java:819)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:215)
      at com.springsource.server.osgi.framework.equinox.BundleContextWrapper.installBundle(BundleContextWrapper.java:199)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundleInternal(EquinoxBundleInstaller.java:145)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.satisfyConstraints(EquinoxBundleInstaller.java:237)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundleInternal(EquinoxBundleInstaller.java:157)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.satisfyConstraints(EquinoxBundleInstaller.java:237)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundleInternal(EquinoxBundleInstaller.java:157)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.satisfyConstraints(EquinoxBundleInstaller.java:237)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundleInternal(EquinoxBundleInstaller.java:157)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.satisfyConstraints(EquinoxBundleInstaller.java:265)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundleInternal(EquinoxBundleInstaller.java:157)
      at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.resolveFragments(EquinoxBundleInstaller.java:177)
      ... 13 more

      Also note it complains (a warning) about bundle 'R:\repository\tms\lib\jug\1\jug-1.jar' could not be provisioned as its manifest is malformed. At least this is not an error, and can be ignored, but the JAR manifest.mf looks ok to me...

        Activity

        Hide
        Steve Powell (c) added a comment -

        Investigated this.

        Apparently, org.apache.commons/codec_1.3.0.v20080530-1600-1.3.jar
        and org.apache.commons/codec_1.3.0.v20080530-1600-2.3.jar

        have apparently the same bundle inside them (from the manifests):

        Bundle-SymbolicName: org.apache.commons.codec
        Bundle-Version: 1.3.0.v20080530-1600

        When the second is inserted into the repository you get the 'Duplicate bundle' message.
        There is nothing wrong with this – the type/name/version needs to distinguish each artifact in each repository.

        Here is the message I got:

        [2009-11-18 11:54:23.033] kernel-dm-7 c.s.repository.internal.external.ExternalStorageRepository Duplicate artifact '/Users/spowell/dev/git2/dm-server/build-dm-server/target/package-expanded/springsource-dm-server-2.0.0.BUILD-20091116172214/repository/dms1738/repository/tms/lib/org.apache.commons.codec_1.3.0.v20080530-1600/1.3/org.apache.commons.codec_1.3.0.v20080530-1600-1.3.jar' discovered in external repository 'dms1738'.

        This means that only one of these is visible in the repository. Which should be OK.

        Show
        Steve Powell (c) added a comment - Investigated this. Apparently, org.apache.commons/codec_1.3.0.v20080530-1600-1.3.jar and org.apache.commons/codec_1.3.0.v20080530-1600-2.3.jar have apparently the same bundle inside them (from the manifests): Bundle-SymbolicName: org.apache.commons.codec Bundle-Version: 1.3.0.v20080530-1600 When the second is inserted into the repository you get the 'Duplicate bundle' message. There is nothing wrong with this – the type/name/version needs to distinguish each artifact in each repository. Here is the message I got: [2009-11-18 11:54:23.033] kernel-dm-7 c.s.repository.internal.external.ExternalStorageRepository Duplicate artifact '/Users/spowell/dev/git2/dm-server/build-dm-server/target/package-expanded/springsource-dm-server-2.0.0.BUILD-20091116172214/repository/dms1738/repository/tms/lib/org.apache.commons.codec_1.3.0.v20080530-1600/1.3/org.apache.commons.codec_1.3.0.v20080530-1600-1.3.jar' discovered in external repository 'dms1738'. This means that only one of these is visible in the repository. Which should be OK.
        Hide
        Scott Hamilton added a comment -

        Must this be a fatal exception then? At least when I was testing this on dm server 1 (we've since moved to 2 and haven't tried this again) this would prevent anything else from happening in the server.

        Put another way, can this be made a warning-level event? Maybe make it configurable?

        Show
        Scott Hamilton added a comment - Must this be a fatal exception then? At least when I was testing this on dm server 1 (we've since moved to 2 and haven't tried this again) this would prevent anything else from happening in the server. Put another way, can this be made a warning-level event? Maybe make it configurable?
        Hide
        Steve Powell (c) added a comment - - edited

        I'm just looking to see if there is any message about jug-1.jar – so have run the whole thing with DEBUG tracing on.

        As far as I can see, the message isn't fatal. and the server comes up fine. There are no messages about jug-1.jar either, though I think the MANIFEST.MF file in the jar is:
        "Manifest-Version: 1.0
        Created-By: 0.92-gcc

        "
        which isn't very helpful to the repository scanning code. I guess we are better at filtering out noise these days.

        I'm going to close this issue. Please re-open it if you discover it hasn't been fixed in the latest builds.

        Show
        Steve Powell (c) added a comment - - edited I'm just looking to see if there is any message about jug-1.jar – so have run the whole thing with DEBUG tracing on. As far as I can see, the message isn't fatal. and the server comes up fine. There are no messages about jug-1.jar either, though I think the MANIFEST.MF file in the jar is: "Manifest-Version: 1.0 Created-By: 0.92-gcc " which isn't very helpful to the repository scanning code. I guess we are better at filtering out noise these days. I'm going to close this issue. Please re-open it if you discover it hasn't been fixed in the latest builds.
        Hide
        Steve Powell (c) added a comment -

        In lastest 2.0 builds this problem doesn't occur.

        Show
        Steve Powell (c) added a comment - In lastest 2.0 builds this problem doesn't occur.

          People

          • Assignee:
            Unassigned
            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 - 3h
              3h
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 52m Time Not Required
              52m