dm Server
  1. dm Server
  2. DMS-2260

Uses conflict reported, but no conflicts detected can still occur with little information.

    Details

    • Type: Defect Defect
    • Status: Done Done
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.0.RC1
    • Fix Version/s: 2.0.0.RELEASE
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0.5

      Description

      See DMS-2157 for details.

      1. candy.bundles.7z
        26 kB
        Candy Chiu
      2. candy.repository.usr.7z
        4.41 MB
        Candy Chiu

        Issue Links

          Activity

          Show
          Steve Powell (c) added a comment - http://forum.springsource.org/showthread.php?p=275110#post275110
          Hide
          Steve Powell (c) added a comment -

          Here are the extracts from the log:
          ---cut-here----8<----------------------------
          Resolver report:
          Uses violation: <Import-Package: org.springframework.mock.staticmock; version="[3.0.0.RELEASE,3.0.0.RELEASE]"> in bundle <com.ocimum.btree.mw.core_5.0.1.1>
          Uses conflict reported, but no conflicts detected.

          at com.springsource.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:54)
          at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71)
          ...
          at java.lang.Thread.run(Thread.java:619)

          [2009-12-22 17:12:02.159] TCP Connection(16)-127.0.0.1 <DE0003E> Install failed for bundle 'com.ocimum.btree.mw.core' version '5.0.1.1'.
          [2009-12-22 17:12:02.175] TCP Connection(16)-127.0.0.1 <DE0500E> Unable to install application from URI 'file:/E:/springsource-dm-server-2.0.0.RC1/stage/com.ocimum.btree.mw.core.jar'. Cannot satisfy constraints for bundle 'com.ocimum.btree.mw.core' version '5.0.1.1'. Cannot resolve: com.ocimum.btree.mw.core
          Resolver report:
          Uses violation: <Import-Package: org.springframework.mock.staticmock; version="[3.0.0.RELEASE,3.0.0.RELEASE]"> in bundle <com.ocimum.btree.mw.core_5.0.1.1>
          Uses conflict reported, but no conflicts detected.
          . com.springsource.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.ocimum.btree.mw.core' at version '5.0.1.1': Cannot resolve: com.ocimum.btree.mw.core
          Resolver report:
          Uses violation: <Import-Package: org.springframework.mock.staticmock; version="[3.0.0.RELEASE,3.0.0.RELEASE]"> in bundle <com.ocimum.btree.mw.core_5.0.1.1>
          Uses conflict reported, but no conflicts detected.

          at com.springsource.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:54)
          at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71)
          ...
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
          ---cut-here----8<----------------------------

          Show
          Steve Powell (c) added a comment - Here are the extracts from the log: --- cut-here ---- 8< ---------------------------- Resolver report: Uses violation: <Import-Package: org.springframework.mock.staticmock; version=" [3.0.0.RELEASE,3.0.0.RELEASE] "> in bundle <com.ocimum.btree.mw.core_5.0.1.1> Uses conflict reported, but no conflicts detected. at com.springsource.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:54) at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71) ... at java.lang.Thread.run(Thread.java:619) [2009-12-22 17:12:02.159] TCP Connection(16)-127.0.0.1 <DE0003E> Install failed for bundle 'com.ocimum.btree.mw.core' version '5.0.1.1'. [2009-12-22 17:12:02.175] TCP Connection(16)-127.0.0.1 <DE0500E> Unable to install application from URI 'file:/E:/springsource-dm-server-2.0.0.RC1/stage/com.ocimum.btree.mw.core.jar'. Cannot satisfy constraints for bundle 'com.ocimum.btree.mw.core' version '5.0.1.1'. Cannot resolve: com.ocimum.btree.mw.core Resolver report: Uses violation: <Import-Package: org.springframework.mock.staticmock; version=" [3.0.0.RELEASE,3.0.0.RELEASE] "> in bundle <com.ocimum.btree.mw.core_5.0.1.1> Uses conflict reported, but no conflicts detected. . com.springsource.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.ocimum.btree.mw.core' at version '5.0.1.1': Cannot resolve: com.ocimum.btree.mw.core Resolver report: Uses violation: <Import-Package: org.springframework.mock.staticmock; version=" [3.0.0.RELEASE,3.0.0.RELEASE] "> in bundle <com.ocimum.btree.mw.core_5.0.1.1> Uses conflict reported, but no conflicts detected. at com.springsource.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:54) at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71) ... at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) --- cut-here ---- 8< ----------------------------
          Hide
          Candy Chiu added a comment - - edited
          Show
          Candy Chiu added a comment - - edited Files for discussion thread: http://forum.springsource.org/showthread.php?p=275184
          Hide
          Steve Powell (c) added a comment -

          org.springframework.mock.staticmock uses:

          org.aspectj.lang,
          org.aspectj.lang.annotation,
          org.aspectj.runtime.internal

          and these are exported by com.springsource.region.user (bundle id 1 – set up when the user region is set up).

          The import-bundle of com.springsource.org.aspectj.weaver (in repository-jpa) converts into imports of these org.aspectj packages BOUND TO THE BUNDLE WE ARE IMPORTING. Thus faulting in the aspectj.weaver bundle (during resolution of repository-jpa, or the entire par, for example) causes a conflict – you need to get the aspectj packages from the weaver bundle, but uses on mock.staticmock (obtained from region.user) refer to the exported packages in region.user. This is a uses violation.

          It is still not clear why this was not spotted by the analysis; but in any case I attempted to remove the import-bundle of the aspectj weaver from the par-embedded repository-jpa jar, and re-deployed the par.

          This gets further, but fails with:

          [2009-12-23 17:35:58.943] start-signalling-5 <DE0006E> Start failed for bundle 'com.apress.prodmserver.vehicle-1-com.apress.prodmserver.vehicle.repository.jpa' version '1.0.0'. java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException
          at java.lang.Class.getDeclaredMethods0(Native Method)
          at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
          at java.lang.Class.getDeclaredMethods(Class.java:1791)
          at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:449)
          at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:431)
          at org.springframework.util.ReflectionUtils.getAllDeclaredMethods(ReflectionUtils.java:473)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:626)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:565)
          at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1277)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:302)
          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:424)
          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:395)
          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:281)
          at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
          at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)
          at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)
          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
          at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
          at com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:637)
          Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.NoAspectBoundException
          at java.lang.ClassLoader.findClass(ClassLoader.java:441)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
          at org.springframework.core.OverridingClassLoader.loadClass(OverridingClassLoader.java:70)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402)
          ... 23 common frames omitted

          [2009-12-23 17:35:58.945] Thread-3 <AG0000E> Application context creation failure for bundle 'com.apress.prodmserver.vehicle-1-com.apress.prodmserver.vehicle.repository.jpa' version '1.0.0'. java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException
          ...

          and then the web bundle fails and the par eventually fails, too.

          So – it is aspects in your bundles. If the dependencies that are needed in aspectj.weaver can be explicitly imported(packages) in repository-jpa we may be able to get further – the import-bundle is too coarse a tool.

          I hope this helps. This issue remains open, for the analysis phase did not spot this case.

          Show
          Steve Powell (c) added a comment - org.springframework.mock.staticmock uses: org.aspectj.lang, org.aspectj.lang.annotation, org.aspectj.runtime.internal and these are exported by com.springsource.region.user (bundle id 1 – set up when the user region is set up). The import-bundle of com.springsource.org.aspectj.weaver (in repository-jpa) converts into imports of these org.aspectj packages BOUND TO THE BUNDLE WE ARE IMPORTING. Thus faulting in the aspectj.weaver bundle (during resolution of repository-jpa, or the entire par, for example) causes a conflict – you need to get the aspectj packages from the weaver bundle, but uses on mock.staticmock (obtained from region.user) refer to the exported packages in region.user. This is a uses violation. It is still not clear why this was not spotted by the analysis; but in any case I attempted to remove the import-bundle of the aspectj weaver from the par-embedded repository-jpa jar, and re-deployed the par. This gets further, but fails with: [2009-12-23 17:35:58.943] start-signalling-5 <DE0006E> Start failed for bundle 'com.apress.prodmserver.vehicle-1-com.apress.prodmserver.vehicle.repository.jpa' version '1.0.0'. java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:449) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:431) at org.springframework.util.ReflectionUtils.getAllDeclaredMethods(ReflectionUtils.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:626) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:565) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1277) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:302) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:424) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:395) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:281) at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175) at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716) at com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637) Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.NoAspectBoundException at java.lang.ClassLoader.findClass(ClassLoader.java:441) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at org.springframework.core.OverridingClassLoader.loadClass(OverridingClassLoader.java:70) at java.lang.ClassLoader.loadClass(ClassLoader.java:254) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:402) ... 23 common frames omitted [2009-12-23 17:35:58.945] Thread-3 <AG0000E> Application context creation failure for bundle 'com.apress.prodmserver.vehicle-1-com.apress.prodmserver.vehicle.repository.jpa' version '1.0.0'. java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException ... and then the web bundle fails and the par eventually fails, too. So – it is aspects in your bundles. If the dependencies that are needed in aspectj.weaver can be explicitly imported(packages) in repository-jpa we may be able to get further – the import-bundle is too coarse a tool. I hope this helps. This issue remains open, for the analysis phase did not spot this case.
          Hide
          Glyn Normington (c) added a comment - - edited

          The fact that bundle 1 exports the org.aspectj.* packages but the bundle in the kernel region which is the real source of these packages is not visible in the user region is due to the way the user region is implemented in 2.0. Beyond 2.0, we expect to migrate to the later implementation of nested frameworks in Equinox where it will be possible to expose bundles are well as packages from the kernel region into the user region. I think this will help solve the basic problem which is being encountered here, although more work may need to be done by dm Server in the way it handles import-bundle in those circumstances.

          But for 2.0 the packages exported by bundle 1 (which are defined by the packageImports property of config/com.springsource.kernel.userregion.properties) must not be obtained using import-bundle. In 2.0 RC1 these packages consist of various dm Server related packages, which are not intended for user application consumption, plus:

          • org.apache.commons.logging
          • org.apache.commons.logging.impl
          • org.aspectj.* (that is all packages in the kernel region beginning with "org.aspectj.")
          • org.osgi.service.cm
          • org.osgi.service.event
          • org.slf4j
          • org.slf4j.spi

          In general, applications should not presume which bundle exports each logging related package as this is too brittle if logging is refactored.Also, it would be foolhardy for an application to presume which bundle exports an OSGi compendium service such as Config Admin (org.osgi.service.cm) or Event Admin (org.osgi.service.event) as the corresponding bundle symbolic names are not part of the compendium spec. So it seems that the AspectJ bundles, which are relatively well-known and relatively stable in structure, are the most likely reason that users will run in to this issue.

          Show
          Glyn Normington (c) added a comment - - edited The fact that bundle 1 exports the org.aspectj.* packages but the bundle in the kernel region which is the real source of these packages is not visible in the user region is due to the way the user region is implemented in 2.0. Beyond 2.0, we expect to migrate to the later implementation of nested frameworks in Equinox where it will be possible to expose bundles are well as packages from the kernel region into the user region. I think this will help solve the basic problem which is being encountered here, although more work may need to be done by dm Server in the way it handles import-bundle in those circumstances. But for 2.0 the packages exported by bundle 1 (which are defined by the packageImports property of config/com.springsource.kernel.userregion.properties) must not be obtained using import-bundle. In 2.0 RC1 these packages consist of various dm Server related packages, which are not intended for user application consumption, plus: org.apache.commons.logging org.apache.commons.logging.impl org.aspectj.* (that is all packages in the kernel region beginning with "org.aspectj.") org.osgi.service.cm org.osgi.service.event org.slf4j org.slf4j.spi In general, applications should not presume which bundle exports each logging related package as this is too brittle if logging is refactored.Also, it would be foolhardy for an application to presume which bundle exports an OSGi compendium service such as Config Admin (org.osgi.service.cm) or Event Admin (org.osgi.service.event) as the corresponding bundle symbolic names are not part of the compendium spec. So it seems that the AspectJ bundles, which are relatively well-known and relatively stable in structure, are the most likely reason that users will run in to this issue.
          Hide
          Candy Chiu added a comment -

          As suggested, I changed import-bundle to import-package, as a result, the repository-jpa bundle has been resolved successfully.

          Show
          Candy Chiu added a comment - As suggested, I changed import-bundle to import-package, as a result, the repository-jpa bundle has been resolved successfully.
          Hide
          Srikanth Pagadala added a comment -

          Hi Candy Chiu

          can you please enumerate which exact packages did you shift from import-bundle to import-packages? Thx

          Show
          Srikanth Pagadala added a comment - Hi Candy Chiu can you please enumerate which exact packages did you shift from import-bundle to import-packages? Thx
          Hide
          Steve Powell (c) added a comment -

          This Community forum post enumerates packages created from another user with this problem.

          Show
          Steve Powell (c) added a comment - This Community forum post enumerates packages created from another user with this problem.

            People

            • Assignee:
              Steve Powell (c)
              Reporter:
              Steve Powell (c)
            • Votes:
              0 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