On 2/10/11 6:56, [email protected] wrote:
Hi.
I've deployed a couple of Restlet 2.x bundles, one being
restlet.xstream extension.
To activate restlet.xstream I've added xstream 1.3.1 via:

obr:deploy com.springsource.com.thoughtworks.xstream

That installed a lot of required and optional extensions.
Now, the existing activemq-core bundels stop working due to:

Error executing command: Constraint violation for package
'javax.xml.stream' when resolving module 154.0 between existing import
0.javax.xml.stream BLAMED ON [[154.0] package;
(package=javax.xml.stream)] and uses constraint 200.0.javax.xml.stream
BLAMED ON [[154.0] package; (package=com.thoughtworks.xstream.io.xml),
[196.0] package;
(&(package=javax.xml.stream)(version>=1.0.1)(!(version>=2.0.0)))]

being
154 activemq-core
200 Java XML Stream API (StAX) (1.0.1)
196 Thoughtworks XStream (1.3.1)

What this is telling you is that 154 imports javax.xml.stream and the candidate chosen for that is the system bundle, but 154 is also exposed to javax.xml.stream from bundle 200 from 154's import of com.thoughtworks.xstream.io.xml which it satisfied by 196 and uses its import of javax.xml.stream which is satisfied by 200.

The confusing part to me, though, is that this doesn't seem like it should be the final error, rather this seems like an intermediate error. Because 154's import of javax.xml.stream should also be satisfiable by 200 since 154's import doesn't include a version range. So, the resolver should attempt this combination too, which given this limited information should succeed.

If you can give me a simple way to reproduce this situation, I can check it out; e.g., you could provide me a link to download your bundle cache and give me the steps to cause the error.

I've read this:
http://www.osgi.org/blog/2011/01/error-messages.html
but yet I can't figure out how to solve my specific issue.

Neil also posted this recently, which may be useful reading:

    http://njbartlett.name/2011/02/09/uses-constraints.html

xstream has this dep

Required resource(s):
---------------------
    Java XML Stream API (StAX) (1.0.1)
    XMLPULL V1 API (1.1.4.c)

Optional resource(s):
---------------------
    Joda-Time - Java date and time API (1.6.0)
    dom4j DOM Processor (1.6.1)
    Apache ANT (1.8.1)
    CGLIB Code Generation Library (2.2.0)
    Apache ANT Launcher (1.8.1)
    Apache XML Commons XML-APIs (1.3.4)
    XML Object Model (1.1.0)
    Apache XML Commons Resolver (1.2.0)
    XML Schema Datatypes Library (0.0.0.20060615)
    JUnit (4.8.1)
    A JSON StAX Implementation (1.0.1)
    Jaxen XPath Engine (1.1.1)
    RelaxNG Datatypes (1.0.0)
    Apache Xerces XML Support (2.9.1)
    Java XML Binding API (2.2.0)
    JDOM DOM Processor (1.1.0)

Just so you know, this bundle-level is not really helpful in this situation, since uses constraints occur at the package level.

-> richard


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to