You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by oskysal <os...@gmail.com> on 2014/05/23 16:21:34 UTC

[SMX 5.0.1] Unable to resolve bundle revision because it is exposed to package 'org.springframework.transaction' via two dependency chains

Hi,

I have a bundle with dependency to spring-tx/4.0.2.RELEASE and I use
org.springframework.transaction.* packages in it. When I deploy my bundle
into smx 5.0.1 it throws the following exception:

*java.lang.Exception: Could not start bundle
mvn:com.scanntech.switchsvr/switchsvr-operations-registration-data-service/1.0.0-SNAPSHOT
in feature(s) datasource-service-1.0.0-SNAPSHOT: Uses constraint violation.
Unable to resolve bundle revision com.test.data.datasource-service [213.0]
because it is exposed to package 'org.springframework.transaction' from
bundle revisions org.apache.servicemix.bundles.spring-tx [197.0] and
org.springframework.transaction [105.0] via two dependency chains.

Chain 1:
  com.test.data.datasource-service [213.0]
    import:
(&(osgi.wiring.package=org.springframework.transaction)(version>=3.2.4.RELESE))
     |
    export: osgi.wiring.package=org.springframework.transaction
  org.apache.servicemix.bundles.spring-tx [197.0]

Chain 2:
  com.test.data.datasource-service [213.0]
    import: (osgi.wiring.package=org.apache.camel.osgi)
     |
    export: osgi.wiring.package=org.apache.camel.osgi;
uses:=org.springframework.transaction
  org.apache.camel.camel-spring [114.0]
    import:
(&(osgi.wiring.package=org.springframework.transaction)(version>=3.1.0)(!(version>=3.3.0)))
     |
    export: osgi.wiring.package=org.springframework.transaction
  org.springframework.transaction [105.0]
	at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:493)[48:org.apache.karaf.features.core:2.3.5]
	at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:405)[48:org.apache.karaf.features.core:2.3.5]
	at Proxy8d22baff_f954_416d_91eb_ace9ed5bd66c.installFeature(Unknown
Source)[:]
	at
org.apache.karaf.deployer.kar.KarArtifactInstaller.installFeatures(KarArtifactInstaller.java:189)[40:org.apache.karaf.deployer.kar:2.3.5]
	at
org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:134)[40:org.apache.karaf.deployer.kar:2.3.5]
	at
org.apache.karaf.deployer.kar.KarArtifactInstaller.update(KarArtifactInstaller.java:348)[40:org.apache.karaf.deployer.kar:2.3.5]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:1119)[7:org.apache.felix.fileinstall:3.2.8]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:914)[7:org.apache.felix.fileinstall:3.2.8]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:498)[7:org.apache.felix.fileinstall:3.2.8]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[7:org.apache.felix.fileinstall:3.2.8]*

and yes, there are two system bundles exposing
org.springframework.transaction package from spring-tx versions
4.0.2.RELEASE and 3.2.4.RELEASE.
So I fixed the version in the MANIFEST.MF of my bundle for that package
import, this way:

*Import-Package: ...
org.springframework.transaction;version=4.0.2.RELESE,org.springframework.transaction.support;version=4.0.2.RELESE,org.apache.camel.osgi*

After deploying with this fix, smx throwed another exception

*java.lang.Exception: Could not start bundle
mvn:com.test.data/datasource-service/1.0.0-SNAPSHOT in feature(s)
datasource-service-1.0.0-SNAPSHOT: Unresolved constraint in bundle
com.test.data.datasource-service [217]: Unable to resolve 217.0: missing
requirement [217.0] osgi.wiring.package;
(&(osgi.wiring.package=org.springframework.transaction)(version>=4.0.2.RELESE))
	at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:493)[48:org.apache.karaf.features.core:2.3.5]
	at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:405)[48:org.apache.karaf.features.core:2.3.5]
	at Proxy71368142_fb15_4158_8c01_b818ecbaadeb.installFeature(Unknown
Source)[:]
	at
org.apache.karaf.deployer.kar.KarArtifactInstaller.installFeatures(KarArtifactInstaller.java:189)[40:org.apache.karaf.deployer.kar:2.3.5]
	at
org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:134)[40:org.apache.karaf.deployer.kar:2.3.5]
	at
org.apache.karaf.deployer.kar.KarArtifactInstaller.update(KarArtifactInstaller.java:348)[40:org.apache.karaf.deployer.kar:2.3.5]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:1119)[7:org.apache.felix.fileinstall:3.2.8]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:914)[7:org.apache.felix.fileinstall:3.2.8]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:498)[7:org.apache.felix.fileinstall:3.2.8]
	at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[7:org.apache.felix.fileinstall:3.2.8]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in
bundle
com.scanntech.switchsvr.switchsvr-operations-registration-data-service
[217]: Unable to resolve 217.0: missing requirement [217.0]
osgi.wiring.package;
(&(osgi.wiring.package=org.springframework.transaction)(version>=4.0.2.RELESE))
	at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
	at
org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:489)[48:org.apache.karaf.features.core:2.3.5]
	... 9 more*

What I understand from that exception is that felix cannot find
osgi.wiring.package, because no bundle export it. So I ran "exports | grep
-i osgi.wiring.package" and no bundle exports that package.

Could anyone help me with this issue?

Thanks in advance,
Oscar



--
View this message in context: http://servicemix.396122.n5.nabble.com/SMX-5-0-1-Unable-to-resolve-bundle-revision-because-it-is-exposed-to-package-org-springframework-tras-tp5720415.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: [SMX 5.0.1] Unable to resolve bundle revision because it is exposed to package 'org.springframework.transaction' via two dependency chains

Posted by oskysal <os...@gmail.com>.
Hi, any idea to solve this issue?

Regards



--
View this message in context: http://servicemix.396122.n5.nabble.com/SMX-5-0-1-Unable-to-resolve-bundle-revision-because-it-is-exposed-to-package-org-springframework-tras-tp5720415p5720540.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: [SMX 5.0.1] Unable to resolve bundle revision because it is exposed to package 'org.springframework.transaction' via two dependency chains

Posted by oskysal <os...@gmail.com>.
Hi JB, thank you for your response.

Yes, I tried an osgi:refresh and also I did a clean start (removed data
forlder and started the server)

Any idea?

Regards,
Oscar



--
View this message in context: http://servicemix.396122.n5.nabble.com/SMX-5-0-1-Unable-to-resolve-bundle-revision-because-it-is-exposed-to-package-org-springframework-tras-tp5720415p5720555.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: [SMX 5.0.1] Unable to resolve bundle revision because it is exposed to package 'org.springframework.transaction' via two dependency chains

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

did you try a osgi:refresh to rewire (after the installation) ?

Regards
JB

On 05/23/2014 04:21 PM, oskysal wrote:
> Hi,
>
> I have a bundle with dependency to spring-tx/4.0.2.RELEASE and I use
> org.springframework.transaction.* packages in it. When I deploy my bundle
> into smx 5.0.1 it throws the following exception:
>
> *java.lang.Exception: Could not start bundle
> mvn:com.scanntech.switchsvr/switchsvr-operations-registration-data-service/1.0.0-SNAPSHOT
> in feature(s) datasource-service-1.0.0-SNAPSHOT: Uses constraint violation.
> Unable to resolve bundle revision com.test.data.datasource-service [213.0]
> because it is exposed to package 'org.springframework.transaction' from
> bundle revisions org.apache.servicemix.bundles.spring-tx [197.0] and
> org.springframework.transaction [105.0] via two dependency chains.
>
> Chain 1:
>    com.test.data.datasource-service [213.0]
>      import:
> (&(osgi.wiring.package=org.springframework.transaction)(version>=3.2.4.RELESE))
>       |
>      export: osgi.wiring.package=org.springframework.transaction
>    org.apache.servicemix.bundles.spring-tx [197.0]
>
> Chain 2:
>    com.test.data.datasource-service [213.0]
>      import: (osgi.wiring.package=org.apache.camel.osgi)
>       |
>      export: osgi.wiring.package=org.apache.camel.osgi;
> uses:=org.springframework.transaction
>    org.apache.camel.camel-spring [114.0]
>      import:
> (&(osgi.wiring.package=org.springframework.transaction)(version>=3.1.0)(!(version>=3.3.0)))
>       |
>      export: osgi.wiring.package=org.springframework.transaction
>    org.springframework.transaction [105.0]
> 	at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:493)[48:org.apache.karaf.features.core:2.3.5]
> 	at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:405)[48:org.apache.karaf.features.core:2.3.5]
> 	at Proxy8d22baff_f954_416d_91eb_ace9ed5bd66c.installFeature(Unknown
> Source)[:]
> 	at
> org.apache.karaf.deployer.kar.KarArtifactInstaller.installFeatures(KarArtifactInstaller.java:189)[40:org.apache.karaf.deployer.kar:2.3.5]
> 	at
> org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:134)[40:org.apache.karaf.deployer.kar:2.3.5]
> 	at
> org.apache.karaf.deployer.kar.KarArtifactInstaller.update(KarArtifactInstaller.java:348)[40:org.apache.karaf.deployer.kar:2.3.5]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:1119)[7:org.apache.felix.fileinstall:3.2.8]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:914)[7:org.apache.felix.fileinstall:3.2.8]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:498)[7:org.apache.felix.fileinstall:3.2.8]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[7:org.apache.felix.fileinstall:3.2.8]*
>
> and yes, there are two system bundles exposing
> org.springframework.transaction package from spring-tx versions
> 4.0.2.RELEASE and 3.2.4.RELEASE.
> So I fixed the version in the MANIFEST.MF of my bundle for that package
> import, this way:
>
> *Import-Package: ...
> org.springframework.transaction;version=4.0.2.RELESE,org.springframework.transaction.support;version=4.0.2.RELESE,org.apache.camel.osgi*
>
> After deploying with this fix, smx throwed another exception
>
> *java.lang.Exception: Could not start bundle
> mvn:com.test.data/datasource-service/1.0.0-SNAPSHOT in feature(s)
> datasource-service-1.0.0-SNAPSHOT: Unresolved constraint in bundle
> com.test.data.datasource-service [217]: Unable to resolve 217.0: missing
> requirement [217.0] osgi.wiring.package;
> (&(osgi.wiring.package=org.springframework.transaction)(version>=4.0.2.RELESE))
> 	at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:493)[48:org.apache.karaf.features.core:2.3.5]
> 	at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:405)[48:org.apache.karaf.features.core:2.3.5]
> 	at Proxy71368142_fb15_4158_8c01_b818ecbaadeb.installFeature(Unknown
> Source)[:]
> 	at
> org.apache.karaf.deployer.kar.KarArtifactInstaller.installFeatures(KarArtifactInstaller.java:189)[40:org.apache.karaf.deployer.kar:2.3.5]
> 	at
> org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:134)[40:org.apache.karaf.deployer.kar:2.3.5]
> 	at
> org.apache.karaf.deployer.kar.KarArtifactInstaller.update(KarArtifactInstaller.java:348)[40:org.apache.karaf.deployer.kar:2.3.5]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:1119)[7:org.apache.felix.fileinstall:3.2.8]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:914)[7:org.apache.felix.fileinstall:3.2.8]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:498)[7:org.apache.felix.fileinstall:3.2.8]
> 	at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[7:org.apache.felix.fileinstall:3.2.8]
> Caused by: org.osgi.framework.BundleException: Unresolved constraint in
> bundle
> com.scanntech.switchsvr.switchsvr-operations-registration-data-service
> [217]: Unable to resolve 217.0: missing requirement [217.0]
> osgi.wiring.package;
> (&(osgi.wiring.package=org.springframework.transaction)(version>=4.0.2.RELESE))
> 	at
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
> 	at
> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:489)[48:org.apache.karaf.features.core:2.3.5]
> 	... 9 more*
>
> What I understand from that exception is that felix cannot find
> osgi.wiring.package, because no bundle export it. So I ran "exports | grep
> -i osgi.wiring.package" and no bundle exports that package.
>
> Could anyone help me with this issue?
>
> Thanks in advance,
> Oscar
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/SMX-5-0-1-Unable-to-resolve-bundle-revision-because-it-is-exposed-to-package-org-springframework-tras-tp5720415.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com