This is related to the "Shell hanging" post. My shell hung when I tried to debug a uses violation, which is described next.
When I deployed my app, I received the following error:
------BEGIN ERROR-----------------
Could not satisfy constraints for bundle 'com.apress.prodmserver.vehicle.repository.jpa' at version '1.0.0'. Cannot resolve: com.apress.prodmserver.vehicle.repository.jpa
Resolver report:
Uses violation: <Import-Package: org.springframework.beans.factory.aspectj; version="0.0.0"> in bundle <com.apress.prodmserver.vehicle.repository.jpa_1.0 .0>
Possible matches:
<Export-Package: org.springframework.beans.factory.aspectj; version="3.0.0.CI-395"> from <org.springframework.aspects_3.0.0.CI-395>
No dependent constraint mismatch. Try refreshing the <org.springframework.aspects_3.0.0.CI-395> bundle.
------END ERROR-----------------
I read Rod Harrop's post on Diagnosing OSGi uses conflicts, and tried employing similar strategies to locate the cause. Because my shell hung whenever I used "headers" for one of the suspects, there is no way for me to further debugging. My understanding is that I look for conflicts in the imports of org.springframework.aspects_3.0.0.CI-395 and com.apress.prodmserver.vehicle.repository.jpa_1.0. 0. Below I am pasting the respective files.
(spring.aspect)
------BEGIN org.springframework.aspects_3.0.0.CI-395 MANIFEST.MF Import Section -----------------
Import-Package:
org.apache.commons.logging;version="[1.1.1, 2.0.0)",
org.aspectj.internal.lang.annotation;version="[1.5.4, 2.0.0)";resolution:="optional",
org.aspectj.lang;version="[1.5.4, 2.0.0)";resolution:="optional",
org.aspectj.lang.annotation;version="[1.5.4, 2.0.0)";resolution:="optional",
org.aspectj.lang.reflect;version="[1.5.4, 2.0.0)";resolution:="optional",
org.springframework.beans;version="[3.0.0, 3.0.1)",
org.springframework.beans.factory;version="[3.0.0, 3.0.1)",
org.springframework.beans.factory.annotation;versi on="[3.0.0, 3.0.1)",
org.springframework.beans.factory.wiring;version="[3.0.0, 3.0.1)",
org.springframework.transaction.annotation;version ="[3.0.0, 3.0.1)";resolution:="optional",
org.springframework.transaction.interceptor;versio n="[3.0.0, 3.0.1)";resolution:="optional"
------END org.springframework.aspects_3.0.0.CI-395 -----------------
(jpa)
------BEGIN com.apress.prodmserver.vehicle.repository.jpa_1.0. 0 MANIFEST.MF Import Section ----------------
Import-Package: com.apress.prodmserver.vehicle.domain,
com.apress.prodmserver.vehicle.repository,
javax.sql
Import-Bundle: com.springsource.org.eclipse.persistence;version="[1.1.0,1.1.0]";import-scope:=application,
com.springsource.javax.persistence;version="[1.0.0,2.0.0)",
com.springsource.org.aspectj.weaver;version="[1.6.6,1.6.7)"
Import-Library: org.springframework.spring;version="[3.0.0,3.0.1)"
------END com.apress.prodmserver.vehicle.repository.jpa_1.0. 0 ------
The Import-Package section in jpa is straight forward, and shouldn't conflict with spring.aspect. Import-Library shouldn't conflict with spring.aspect neither since spring.aspect is part of the library. Finally, I was about to examine the headers in bundles under Import-Bundle, but my shell didn't work.
Hopefully someone with a keen eye can spot the conflict.


