ace-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert M. Mather" <robert.mather....@gmail.com>
Subject Re: Some clarifications about ACE template config engine
Date Wed, 15 Apr 2015 11:06:32 GMT
On Wed, Apr 15, 2015 at 3:40 AM, Robert M. Mather <
robert.mather.rmm@gmail.com> wrote:

> On Wed, Apr 15, 2015 at 1:08 AM, Jan Willem Janssen <
> janwillem.janssen@luminis.eu> wrote:
>
>> Hi Robert,
>>
>> > On 14 Apr 2015, at 19:28, Robert M. Mather <robert.mather.rmm@gmail.com>
>> wrote:
>> >
>> >>
>> >> Ok, then I'm not sure how to explain the issue I'm having. The client
>> > side error log is the same for all the bundles I've tried:
>> >
>> >> 2015-04-14 10:13:10 | ERROR | ACE Agent Controller | 1 - Installation
>> of
>> > deployment update failed: Error while processing resource
>> >
>> 'com.patronpath.ring.channel.pubnub.PubnubChannel.Config_ring-ace-agent-test_30.0.0.xml'
>> > (463)!
>> > org.osgi.service.deploymentadmin.spi.ResourceProcessorException: No
>> Object
>> > Class Definition found with
>> > id=com.patronpath.ring.channel.pubnub.PubnubChannel
>> > at
>> >
>> org.apache.felix.deployment.rp.autoconf.AutoConfResourceProcessor.process(AutoConfResourceProcessor.java:174)
>> > […]
>> > The Object Class Definition is in the OSGI-INF/metatype directory and is
>> > being generated by bnd:
>> >
>> > <?xml version='1.0'?>
>> > <metatype:MetaData xmlns:metatype="
>> http://www.osgi.org/xmlns/metatype/v1.1.0"
>> > localization="com.patronpath.ring.channel.pubnub.PubnubChannel$Config">
>> >
>> >  <OCD name="Pubnub channel config"
>> > id="com.patronpath.ring.channel.pubnub.PubnubChannel">
>> >       <AD name="Pos client id" id="posClientId" cardinality="0"
>> > required="true" type="String"/>
>> >       <AD name="Pubnub publish key" id="pubnubPublishKey"
>> cardinality="0"
>> > required="true" type="String"/>
>> >       <AD name="Pubnub subscribe key" id="pubnubSubscribeKey"
>> > cardinality="0" required="true" type="String"/>
>> >       <AD name="Heartbeat interval seconds"
>> id="heartbeatIntervalSeconds"
>> > cardinality="0" required="true" default="3" type="Integer"
>> description="How
>> > often the Pubnub presence info should be updated."/>
>> >       <AD name="Reconnect interval seconds"
>> id="reconnectIntervalSeconds"
>> > cardinality="0" required="true" default="3" type="Integer"/>
>> >       <AD name="Retreive missed messages" id="retreiveMissedMessages"
>> > cardinality="0" required="true" default="false" type="Boolean"/>
>> >  </OCD>
>> >
>> >  <Designate pid="com.patronpath.ring.channel.pubnub.PubnubChannel">
>> >       <Object
>> ocdref="com.patronpath.ring.channel.pubnub.PubnubChannel"/>
>> >  </Designate>
>> > </metatype:MetaData>
>> >
>> > The OCD id is correct and I know it's getting picked up by the metatype
>> > service because I can see the correct entry in the configuration tab of
>> the
>> > webconsole, and I'm able to load configuration to it via fileinstall.
>> This
>> > makes it seem as though there is something wrong with the autoconf
>> resource
>> > processor preventing it from finding the OCD. Finally, here is the
>> > <Designate> definition I'm giving to ACE for interpolation:
>> >
>> > <?xml version='1.0'?>
>> > <metatype:MetaData xmlns:metatype="
>> http://www.osgi.org/xmlns/metatype/v1.1.0
>> > "
>> > localization="com.patronpath.ring.channel.pubnub.PubnubChannel$Config">
>> > <Designate pid="com.patronpath.ring.channel.pubnub.PubnubChannel"
>> > bundle="osgi-dp:com.patronpath.ring.channel.pubnub">
>> > <Object ocdref="com.patronpath.ring.channel.pubnub.PubnubChannel">
>> > <Attribute adref="posClientId" content="${context.posClientId}" />
>> > <Attribute adref="pubnubPublishKey"
>> content="${context.pubnubPublishKey}" />
>> > <Attribute adref="pubnubSubscribeKey"
>> > content="${context.pubnubSubscribeKey}" />
>> > <Attribute adref="heartbeatIntervalSeconds"
>> > content="${context.heartbeatIntervalSeconds}" />
>> > <Attribute adref="reconnectIntervalSeconds"
>> > content="${context.reconnectIntervalSeconds}" />
>> > <Attribute adref="retreiveMissedMessages"
>> > content="${context.retreiveMissedMessages}" />
>> > </Object>
>> > </Designate>
>> > </metatype:MetaData>
>>
>> Ok, you want to provide the MetaType definition from a bundle while it is
>> being
>> installed through DeploymentAdmin. For this to work, you need the MetaType
>> service as well, is this deployed as well (or already present) at the
>> target?
>>
>> The MetaType service is an optional requirement for the AutoConf resource
>> processor (if all MetaType definitions contain both a designate and OCD
>> it does
>> not use/need the MetaType service itself).
>>
>> > Is there some sort of security or permissions context I'm unaware of
>> that
>> > would prevent the resource processor from seeing the OCD from the
>> bundle?
>> > I'm using the latest binary distribution of ACE and
>> > the org.apache.felix.deployment.rp.autoconf-0.1.5.jar that comes with
>> it. A
>> > possibility I've been asking about on the bndtools group is whether the
>> > empty <Designate> generated by bnd next to the <OCD> might interfere
>> with
>> > the <Designate> I'm supplying via ACE, but I'd expect a different sort
>> of
>> > error if that were the case. Also, it's not straightforward to prevent
>> bnd
>> > from generating the empty <Designate>, so I'm hoping to explore other
>> > possibilities first.
>>
>> I think your problem is because the MetaType service is not available on
>> your
>> target. Can you confirm this?
>>
>> Yes, the Felix Metatype service version 1.0.10 was deployed. I'm seeing
> now that that version implements metatype spec 1.2, while the xml version
> I'm using specifies 1.1, so I'll try downgrading to 1.0.4 and let you know
> what happens.
>
> Thanks for your help!
>

I got the same error using Felix Metatype 1.0.4. I can see from the
Webconsole that the Metatype bundle is installed and active. If you don't
see anything wrong with the xml I wrote, then maybe there's a version
incompatibility between some of the OSGi libs I'm using. I'm on the latest
version of most Felix services supporting OSGi R5, so:
- Felix Framework 4.6.0
- Felix Config Admin 1.8.0
- OSGI CMPN 5.0.0
etc...

Is there a particular version level of OSGi or the Felix implementations
that autoconf is known to work with?

>
> Robert
>
>> --
>> Met vriendelijke groeten | Kind regards
>>
>> Jan Willem Janssen | Software Architect
>> +31 631 765 814
>>
>> My world is revolving around INAETICS and Amdatu
>>
>> Luminis Technologies B.V.
>> Churchillplein 1
>> 7314 BZ   Apeldoorn
>> +31 88 586 46 00
>>
>> http://www.luminis-technologies.com
>> http://www.luminis.eu
>>
>> KvK (CoC) 09 16 28 93
>> BTW (VAT) NL8169.78.566.B.01
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message