This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

problem with DM Server 2.0 RC1

Dec 21st, 2009, 12:27 AM

Hi,
When I am Trying to deploy my application which was built on spring 3.0 GA on DM Server 2.0 RC1 I am getting following issue

Code:

[2009-12-21 10:28:20.262] TCP Connection(14)-127.0.0.1 <DE0000I> Installing bundle 'com.ocimum.btree.mw.util' version '5.0.1.1'.
[2009-12-21 10:28:28.323] TCP Connection(14)-127.0.0.1 <ME0003I> Dump 'serviceability\dump\2009-12-21-10-28-402' generated
[2009-12-21 10:28:28.995] TCP Connection(14)-127.0.0.1 <DE0002E> Installation of bundle 'com.ocimum.btree.mw.util' version '5.0.1.1' failed. com.springsource.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.ocimum.btree.mw.util' at version '5.0.1.1': Cannot resolve: com.ocimum.btree.mw.util
Resolver report:
Uses violation: <Import-Package: org.springframework.web.servlet.view; version="0.0.0"> in bundle <com.ocimum.btree.mw.util_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 com.springsource.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:81)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:277)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:160)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:132)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:196)
at com.springsource.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:62)
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.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:167)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:96)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:33)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
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:619)
[2009-12-21 10:28:29.011] TCP Connection(14)-127.0.0.1 <DE0003E> Install failed for bundle 'com.ocimum.btree.mw.util' version '5.0.1.1'.
[2009-12-21 10:28:29.027] TCP Connection(14)-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.util.jar'. Cannot satisfy constraints for bundle 'com.ocimum.btree.mw.util' version '5.0.1.1'. Cannot resolve: com.ocimum.btree.mw.util
Resolver report:
Uses violation: <Import-Package: org.springframework.web.servlet.view; version="0.0.0"> in bundle <com.ocimum.btree.mw.util_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.util' at version '5.0.1.1': Cannot resolve: com.ocimum.btree.mw.util
Resolver report:
Uses violation: <Import-Package: org.springframework.web.servlet.view; version="0.0.0"> in bundle <com.ocimum.btree.mw.util_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 com.springsource.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:81)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:277)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:160)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:132)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:196)
at com.springsource.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:62)
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.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:167)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:96)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:33)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
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:619)

Thank you for this forum entry. Issue DMS-2260 has been raised to track this issue.
In your case I suspect a conflict in the hibernate packages, which are explicitly versioned in your jars, and there are lower-level version ranges transitively constraining the other imports via uses.

The particular issue here which is hard to diagnose is that each potential import is satisfiable, consistent with other, single, imports, but a combination of three or more is not.

Improvements to the Diagnosis of uses constraints failures is tracked by task DMS-2170.

Comment

Based on comments of the bug that I have posted, I started my analysis on that, now I am able to work with that bundle. The changes that I have made are
I just changed the slf4j version to 1.5.10 from 1.5.6, even I removed the unneccesory 1.5.6 version from my usr folder.

But now I am facing one more issue with Aspects in my another bundle , and the exception is.

Code:

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 com.springsource.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:81)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:277)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:160)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:132)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:196)
at com.springsource.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:62)
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.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:167)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:96)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:33)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
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: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 com.springsource.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:81)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:71)
at com.springsource.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:50)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:277)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:160)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:132)
at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:196)
at com.springsource.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:62)
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.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:167)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:96)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:33)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
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:619)

Comment

When I removed the org.springframework.aspects bundle from import bundles section and I imported all the packages related in to the import packages section then it is working fine, but I dont know what kind of difference makes when I am importing a bundle and all the packages of bundle

Comment

Hello Mahesh,
The import bundle header will generate imports for all the packages exported by the bundle named. In that sense it is like a shorthand for a list of package imports.

However, it differs from a list of simple imports because each of the generated package imports is constrained to get these packages from the import bundle and no-where else. So, because the packages are exported by bundle 1 (in the user region), and other bundles (previously resolved) already import them from there, we get clashes if any of these packages are in uses clauses for exports that are visible in this bundle.

Changing these to simple (unconstrained) imports means that we are free to get them from where the other bundles get them from (and therefore not have uses constraint violations).

You may like to read the notes in jira issue DMS-2260, where Glyn Normington goes into greater detail.

Steve PowellI wish you a very happy 2010, and thank you for continuing to contribute to this forum.