ace-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Willem Janssen <janwillem.jans...@luminis.eu>
Subject Re: Some clarifications about ACE template config engine
Date Wed, 15 Apr 2015 08:08:34 GMT
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?

--
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
View raw message