Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orbit-dev] How to avoid "Bundle ch.qos.logback.slf4j_0.9.24.v20100831-0715 failed to resolve.:" ?

I talked to Tom Watson about this, we don't think this is related to the GenericRequire/Capability.

It is a more restriction is that two versions of the same fragment can not attach to the same host.   This came from https://bugs.eclipse.org/bugs/show_bug.cgi?id=201489
 Dev mode does not relax this restriction, and we aren't sure if it should since it doesn't make for a good build time classpath for other bundles depending on the host.

One workaround for this problem would be to have two instances of the host bundle in the state.  This way both fragments can attach to different hosts.  You could "trick" PDE/Build into doing this by having two copies of the host available in the build.  They would need to be located in different directories on disk.  Dev mode should allow both instances of the host to resolve, and then the fragments can attach to both.

-Andrew


From: Gunnar Wagenknecht <gunnar@xxxxxxxxxxxxxxx>
To: orbit-dev@xxxxxxxxxxx
Date: 02/25/2011 03:41 AM
Subject: Re: [orbit-dev] How to avoid "Bundle ch.qos.logback.slf4j_0.9.24.v20100831-0715 failed to resolve.:" ?
Sent by: orbit-dev-bounces@xxxxxxxxxxx





Am 25.02.2011 07:45, schrieb David M Williams:
> "It's looks like a conflict with the newer version. There is only one
> fragment allowed at runtime. It looks like they can't be build together.
> Any ideas?"

The reason is the following bundle header in the fragment host.

Eclipse-GenericRequire: org.slf4j.impl.StaticLoggerBinder;
selection-filter=(&(version>=1.6.0)(!(version>=1.7.0)))

This is a limitation from SLF4J. It only allows one implementation at
runtime. Because implementations are shipped as fragments, only one
fragment instance is allowed at runtime.

There is also an addition p2.inf to ensure that p2 does the right thing
when installing.

> To give a little more info, below is the full log at the point of
> failure  ... in case any PDE Build experts can weigh in.

Technically it should be possible to "build" both at build time.
However, I can imagine that this would require two build stages. But I
also share David's opinion on doing all in one.

> And, let me ask the radical  ... if this is a conflict of "old" and
>  "new", do we (or, clients) really need both? Could we go with just the
> new?

That is the easiest solution. However, our retention policy expects us
keeping the last three. If we think an exception would be ok I could ask
on cross-project if anybody is using it currently and if there are any
objections.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/
_______________________________________________
orbit-dev mailing list
orbit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orbit-dev



Back to the top