Hi list,

a couple more notes/questions on the configuration mechanism.

1) Seems that (at least) using the REST api I am required to set
"processorPid" : "org.osgi.deployment.rp.autoconf". Without it the
artifact will be created, but once associated to a target things fail
(exception below). From an api user perspective this feels
inconsistent (as it is different form bundles where you can leave it
empty or commit it altogether) and/or at least I'd expect an error on
creation because it apparently is required. From an implementation
perspective I am wondering why it needs to be specified at all as the
helpers map mimetypes to processors anyway.

Server side logged exception when leaving the attribute empty string:
(note the empty string in the message ;)

[Warn ] 
[012]org.apache.ace.client.repository.stateful.StatefulGatewayRepository;org.osgi.service.event.EventHandler:
EventAdmin: Exception during event dispatc
h [org.osgi.service.event.Event
[topic=org/apache/ace/client/repository/public/Group2LicenseAssociation/ADDED]
| [org.apache.ace.client.repository.stateful.Stat
efulGatewayRepository, org.osgi.service.event.EventHandler] |
Bundle(org.apache.ace.client.repository.impl [12])]
java.lang.IllegalStateException: Unable to create deployment version:
there is no resource processing bundle available that publishes
        at 
org.apache.ace.client.repository.stateful.impl.StatefulGatewayRepositoryImpl.getNecessaryDeploymentArtifacts(StatefulGatewayRepositoryImpl.java:495)


Server side logged exception when omitting the attribute:

g! java.lang.IllegalArgumentException: Neither the key nor the value
should be null.[Warn ]
[012]org.apache.ace.client.repository.stateful.StatefulGatewayReposi
tory;org.osgi.service.event.EventHandler: EventAdmin: Exception during
event dispatch [org.osgi.service.event.Event
[topic=org/apache/ace/client/repository/publ
ic/Group2LicenseAssociation/ADDED] |
[org.apache.ace.client.repository.stateful.StatefulGatewayRepository,
org.osgi.service.event.EventHandler] | Bundle(org.apa
che.ace.client.repository.impl [12])]

        at 
org.apache.ace.client.repository.impl.DeploymentArtifactImpl.addDirective(DeploymentArtifactImpl.java:98)


2) The velocity based properties substituion in metatype works once
you find out you need to wrap the in "${context.<tag>}". Documenting
this will save a lot of people a lot of searching and frustration ;)
As of yet I am unclear whether I can use the more powerful stuff such
as "foreach( $license in $gateway.children)" as described at
http://incubator.apache.org/ace/template-mechanism.html, but from the
implementation I guess not?

Furthermote I am wondering about why velocity is used at all. The
metatype provides us with declarative attributes descriptions that
allows UIs to provide appropriate input fields (eg felix webconsole) .
It could allow webui for example to spawn a "specify required missing
attributes" dialog upon association to a target. The velocity model is
non declarative making this stuff harder?

Regards,
Bram

On Thu, Aug 18, 2011 at 2:39 PM, Bram de Kruijff <bdekrui...@gmail.com> wrote:
> On Thu, Aug 18, 2011 at 10:59 AM, Angelo van der Sijpt
> <angelo.vandersi...@luminis.eu> wrote:
>> The message you see tells us 'yes, we recognized your artifact, but we don't 
>> have a resource processor bundle available.' During deployment, this bundle 
>> will be put into the deployment package, and shipped along with the artifact 
>> so we can handle it (see section 114.10 of the OSGi Compendium spec).
>>
>> You need to add a resource processor bundle to the system, just as you would 
>> import any other bundle you want to provision (note that it will not be 
>> shown in the list of artifacts, since it doesn't make sense to provision it 
>> yourself). There is an AutoConf processor available as part of Felix' 
>> Deployment Admin.
>
> Ok, that is easy enough. However, it seems they are not only hidden in
> the "provisioning UI" as I also do not seen them in the REST api.
> Feels very obscure. Is there any way to determine installed processors
> from a client perspective?
>
> Anyway, thanks again guys! Got it to work after I figured out the
> Designate tag in metatype apparently requires a bundle attribute :S
>
> Regards,
> Bram
>
>
> ps. Don't think this is documented anywhere on the site. Should I make
> jira issues for this stuff?
>
>> Angelo
>>
>> On Aug 18, 2011, at 10:41 AM, Bram de Kruijff wrote:
>>
>>> Hi List,
>>>
>>> trying to get metatype configuration deployed through ACE, but am stuck.
>>>
>>> First, I've create a artifact through the REST API and that seems all in 
>>> order
>>>
>>> "attributes": {
>>>    "artifactName": "Amdatu Web - HTTP Config",
>>>    "artifactDescription": "Amdatu Web - HTTP Config",
>>>    "mimetype": "application/xml:osgi-autoconf",
>>>    "url": 
>>> "file:///C:/bramk/Amdatu/svn/amdatu-trunk/amdatu-release-ams/org.apache.felix.http.xml",
>>>    "filename": "org.apache.felix.http.xml"
>>> }
>>>
>>> Now when I try to associate this artifact with a feature I get
>>>
>>> "Unable to create deployment version: there is no resource processing
>>> bundle available that publishes org.osgi.deployment.rp.autoconf
>>> java.lang.IllegalStateException: Unable to create deployment version:
>>> there is no resource processing bundle available that publishes
>>> org.osgi.deployment.rp.autoconf"
>>>
>>>
>>> So it seems the ConfigurationHelper recognized the mimetype and sets
>>> the processor to  org.osgi.deployment.rp.autoconf. However there seems
>>> to be no processor? It is not in my runtime and grepping the ACE
>>> codebase there is only resourceprocessor.useradmin.
>>>
>>> Should I create my own processor or am I missing something here?
>>>
>>> Thanks,
>>> Bram
>>
>>
>

Reply via email to