Okay, so I'm probably missing something elementary, but I tried replacing
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>1.4.0</version>
</dependency>
with
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>1.4.0</version>
</dependency>
Everything else stayed as I had it before, including:
<Import-Package>
*,
org.osgi.service.cm; version="[1.3,2.0)"
</Import-Package>
Unfortunately, I see no change in outcome. I'm still getting the same
error. I do apologize if I'm missing something very basic.
Cheers
On Tue, Aug 14, 2012 at 1:39 AM, Achim Nierbeck <[email protected]>wrote:
> Hi,
>
> yes Pax Logging does use Configuration Admin Service for configuring
> the underlying Log4j logging, see also [1].
>
>
> regards, Achim
>
> [1] - http://team.ops4j.org/wiki/display/paxlogging/Pax+Logging
>
>
>
> 2012/8/14 Felix Meschberger <[email protected]>:
> > Hi
> >
> > It looks like Pax Logging needs the OSGi Configuration Admin Service
> (which is reflected by the org.osgi.service.cm import). YOu can solve the
> problem by just adding the latest Apache Felix Configuration Admin Service
> implementation bundle (1.4.0 IIRC).
> >
> > Regards
> > Felix
> >
> > Am 14.08.2012 um 01:32 schrieb lessonz:
> >
> >> So, I'm trying to use Pax Logging in a bundle:
> >>
> >> <dependency>
> >> <groupId>log4j</groupId>
> >> <artifactId>log4j</artifactId>
> >> <version>1.2.17</version>
> >> </dependency>
> >> <dependency>
> >> <groupId>org.ops4j.pax.logging</groupId>
> >> <artifactId>pax-logging-api</artifactId>
> >> <version>${pax.logging.version}</version>
> >> </dependency>
> >> <dependency>
> >> <groupId>org.ops4j.pax.logging</groupId>
> >> <artifactId>pax-logging-service</artifactId>
> >> <version>${pax.logging.version}</version>
> >> <exclusions>
> >> <exclusion>
> >> <groupId>log4j</groupId>
> >> <artifactId>log4j</artifactId>
> >> </exclusion>
> >> </exclusions>
> >> </dependency>
> >>
> >> When I do, I get:
> >>
> >> ERROR: Bundle org.ops4j.pax.logging.pax-logging-service [5] Error
> starting
> >> jar:f
> >>
> ile:/[path_to_main]/main/target/main-1.0.0-SNAPSHOT.jar!/bundle/pax-logging
> >> -service-1.6.9.jar (org.osgi.framework.BundleException: Unresolved
> >> constraint in
> >> bundle org.ops4j.pax.logging.pax-logging-service [5]: Unable to resolve
> >> 5.7: mi
> >> ssing requirement [5.7] osgi.wiring.package;
> >> (&(osgi.wiring.package=org.osgi.ser
> >> vice.cm)(version>=1.0.0)(!(version>=2.0.0))))
> >> org.osgi.framework.BundleException: Unresolved constraint in bundle
> >> org.ops4j.pa
> >> x.logging.pax-logging-service [5]: Unable to resolve 5.7: missing
> >> requirement [5
> >> .7] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.cm
> >> )(version>=1.
> >> 0.0)(!(version>=2.0.0)))
> >> at
> >> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:382
> >> 6)
> >> at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
> >> at
> >> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
> >>
> >> at
> >> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStart
> >> LevelImpl.java:295)
> >> at java.lang.Thread.run(Unknown Source)
> >>
> >> Okay, so if I'm reading that properly it needs org.osgi.service.cmwith a
> >> version between 1.0.0 and 2.0.0. Now, the pax-logging-service is
> obviously
> >> not my bundle, so I can't really fiddle with it, and that version is
> kind
> >> of interesting as org.osgi.compendium is at something like 4.3.0, so I
> try
> >> to resolve it by adding the following stuff to MY BUNDLE's pom:
> >>
> >> <dependency>
> >> <groupId>org.apache.felix</groupId>
> >> <artifactId>org.osgi.compendium</artifactId>
> >> <version>1.4.0</version>
> >> </dependency>
> >>
> >> and
> >>
> >> <Import-Package>
> >> *,
> >> org.osgi.service.cm; version="[1.3,2.0)"
> >> </Import-Package>
> >>
> >> Unfortunately, I'm left with the same error. I'm not sure what I'm doing
> >> wrong here. Using Pax logging should be doable as it appears Apache
> Karafe
> >> is doing so just fine. Any help would be greatly appreciated.
> >>
> >> Cheers
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> OPS4J Pax for Vaadin
> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
> Lead
> blog <http://notizblog.nierbeck.de/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>