Hello Steven.

In fact, our software stack has been defined quite a long time ago, and
we're just testing (trying to test in reality) some failing cases. This is
why we're still using Camel 3.22.1 and Groovy 3.0.19.

Groovy JSON was not a requirement for our applications and is not included
in our Karaf features.

I'm just trying to deploy some temporary "single use" bundles with some
groovy code to analyze and detect possible ActiveMQ messages delivery
issues.

I'm not sure to understand the actual role of "spifly" that you also
include in your feature. On my side, I've tried installing the built-in
Karaf feature that provides the version 1.3.6. But it has no effect on the
groovy-json bundle that seems to require more : its single bundle is
started but it doesn't intercept the groovy json bundle requirements to
create the service.

I've read the bundle's manifest, but I'm sincerely unable to explain what's
mssing to provide its requirements. The bundle indeed needs some
ServiceLoader to create and expose for its own usage the "Fast String"
service factory that is defined as a common Java SPI (that is not properly
handled in an OSGi context).

We've no other bundles in such a case...

On your side, could you verify that the Fast String service appears in the
OSGi services as expected with some properties provided by spifly ?

Thanks again.

Le mar. 21 janv. 2025 à 18:16, Steven Huypens <steven.huyp...@gmail.com> a
écrit :

> Hi,
>
> Any reason why you are using Groovy 3.x instead of 4.x ?
>
> I needed Groovy to be able to use Rest Assured in my Pax Exam Tests
> and this is my feature, which is working for me
>
> <feature name="myFeature" version="x.y.z">
>     <feature prerequisite="true">wrap</feature>
>     <bundle>mvn:a.b.io.rest-assured/common-fragment/1.0.2</bundle>
> (just a simple fragment bundle to fix a Rest Assured issue)
>     <bundle>mvn:io.rest-assured/json-path/5.5.0</bundle>
>     <bundle>mvn:io.rest-assured/xml-path/5.5.0</bundle>
>     <bundle>mvn:io.rest-assured/rest-assured/5.5.0</bundle>
>     <bundle>mvn:io.rest-assured/rest-assured-common/5.5.0</bundle>
>
> <bundle>mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.3.4</bundle>
>     <bundle>mvn:org.apache.groovy/groovy-json/4.0.13</bundle>
>     <bundle>mvn:org.apache.groovy/groovy-xml/4.0.13</bundle>
>     <bundle>mvn:org.apache.groovy/groovy/4.0.13</bundle>
>     <bundle>wrap:mvn:org.ccil.cowan.tagsoup/tagsoup/1.2.1</bundle>
> </feature>
>
>
> Kind regards,
> Steven
>
> On Tue, Jan 21, 2025 at 5:49 PM Ephemeris Lappis
> <ephemeris.lap...@gmail.com> wrote:
> >
> > Hello again !
> >
> > I've been looking for solutions, but I didn't find anything that works...
> >
> > I've tried installing the feature "spifly" that, if I'm not mistaken,
> should support the ServiceLoader that's needed for groovy-json Fast String
> service.
> > But the groovy json bundle still refuses to resolve :(
> >
> > No more ideas at this time. Waiting for any help.
> >
> > Thanks again.
> >
> > Le mar. 21 janv. 2025 à 09:08, Ephemeris Lappis <
> ephemeris.lap...@gmail.com> a écrit :
> >>
> >> Hello.
> >>
> >> I'm trying to install groovy-json for some Camel tests on a Karaf that
> already has Groovy features installed and working.
> >>
> >> karaf@root()> la | grep groovy
> >> 236 | Active    |  50 | 3.22.1             | camel-groovy
> >> 248 | Resolved  |  80 | 3.0.19             | groovy-dateutil, Hosts: 233
> >> 249 | Resolved  |  80 | 3.0.19             | groovy-xml, Hosts: 233
> >> 275 | Installed |  80 | 3.0.19             | groovy-json
> >>
> >> As you can see the groovy-json is in "Installed" state. The diag
> command gives missing requirements that I don't understand.
> >>
> >> diag 275
> >> groovy-json (275)
> >> -----------------
> >> Status: Installed
> >> Unsatisfied Requirements:
> >> [groovy-json [275](R 275.1)] osgi.wiring.package;
> (&(osgi.wiring.package=groovy.json)(version>=3.0.0)(!(version>=4.0.0)))
> >> [groovy-json [275](R 275.1)] osgi.wiring.package;
> (&(osgi.wiring.package=org.apache.groovy.json)(version>=3.0.0)(!(version>=4.0.0)))
> >> [groovy-json [275](R 275.1)] osgi.wiring.package;
> (&(osgi.wiring.package=org.apache.groovy.json.internal)(version>=3.0.0)(!(version>=4.0.0)))
> >> [groovy-json [275](R 275.1)] osgi.extender;
> (osgi.extender=osgi.serviceloader.registrar)
> >> [groovy-json [275](R 275.1)] osgi.extender;
> (osgi.extender=osgi.serviceloader.processor)
> >> [groovy-json [275](R 275.1)] osgi.serviceloader;
> (osgi.serviceloader=org.apache.groovy.json.FastStringServiceFactory)
> >>
> >> The missing packages are exported and imported by the bundle itself :
> >>
> >> Export-Package =
> >>         groovy.json;
> >>                 uses:="groovy.io,
> >>                         groovy.lang,
> >>                         groovy.transform.stc,
> >>                         groovy.util,
> >>                         org.apache.groovy.json.internal";
> >>                 version=3.0.19,
> >>         org.apache.groovy.json;version=3.0.19,
> >>         org.apache.groovy.json.internal;uses:=groovy.json;version=3.0.19
> >> Import-Package =
> >>         groovy.io;resolution:=optional,
> >>         groovy.json;resolution:=optional;version="[3.0,4)",
> >>         groovy.lang;resolution:=optional,
> >>         groovy.transform.stc;resolution:=optional,
> >>         groovy.util;resolution:=optional,
> >>         org.apache.groovy.internal.util;resolution:=optional,
> >>         org.apache.groovy.io;resolution:=optional,
> >>         org.apache.groovy.json;resolution:=optional;version="[3.0,4)",
> >>
>  org.apache.groovy.json.internal;resolution:=optional;version="[3.0,4)",
> >>         org.codehaus.groovy.runtime;resolution:=optional,
> >>         org.codehaus.groovy.runtime.memoize;resolution:=optional
> >>
> >> And I don't understand what are the other missing elements.
> >>
> >> Could someone help me, please ?
> >>
> >> Thanks in advance.
> >>
> >> Regards.
> >>
> >>
>

Reply via email to