felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Yung <ERIC.Y...@jspectrum.com>
Subject problem for dependency to google guice fragment bundles due to deployment order
Date Sat, 21 May 2011 18:39:06 GMT
Hi,

I have tried to use the Google Guice 3.0 bundles in Felix 3.2.1, the bundles includes one
main bundle and several fragment bundles. But I found a strange behavior when starting the
Felix framework when the Guice bundles and my bundle deployed in the /bundle directory and
the my bundle is deployed before the Guice bundles.

The framework may complain about the following error but it does NOT happen every time (sometimes
there is NO error and my bundle can be deployed and started).

Candidate permutation failed due to a conflict between imports; will try another if possible.
(org.apache.felix.framework.resolver.ResolveException: Uses constraint violation. Unable to
resolve module com.abc.bundle1 [5.0] because it is exposed to package 'com.google.inject.name'
from modules com.google.inject [72.0] and com.google.inject [72.0] via two dependency chains.
Chain 1:
  com.abc.bundle1 [5.0]
    import: (package=com.google.inject.name)
     |
    export: package=com.google.inject.name
  com.google.inject [72.0]

Chain 2:
  com.abc.bundle1 [5.0]
    import: (package=com.abc.package)
     |
    export: package=com.abc.package; uses:=com.google.inject.name
  com.abc.bundle2 [11.0]
    import: (package=com.google.inject.name)
     |
    export: package=com.google.inject.name
  com.google.inject [72.0])

  at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3524)
  at org.apache.felix.framework.Felix.startBundle(Felix.java:1750)
  at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1179)
  at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
  at java.lang.Thread.run(Thread.java:680)


If I make the Guice bundles be deployed before my bundle, there is NO error (I have tried
more than 10 times and I think it can solve my problem).


Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message