Hi Geert,
Yes, that was the problem. I accidentally bumped into a bad example missing
the Designate part and copied it. Thanks!
I copy here the working solution in case someone else will have this
problem:
Relevant part of metadata.xml:
<instance component="com.epam.osgiapache.pricing.PricingService">
<property name="callcount" value="0" />
<property name="managed.service.pid"
value="com.epam.osgiapache.pricing.1"/>
</instance>
metatype.xml
<?xml version="1.0" encoding="UTF-8"?>
<metatype:MetaData
xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0">
<OCD description="Pricing Service" name="com.epam.osgiapache.pricing"
id="com.epam.osgiapache.pricing">
<AD name="Call Count" id="callcount" required="true"
type="Integer"
default="0" />
</OCD>
<Designate pid="com.epam.osgiapache.pricing.1" bundle="*" merge="true">
</Designate>
</metatype:MetaData>
Norbert
Geert Schuring wrote:
>
> Hey Norbert,
>
> I see 2 issues that may possibly cause your problem:
> 1 - You're missing a "pid" attribute in the "properties" tag of your
> component definition.
> 2 - You're missing a "Designate" section in your metatype.xml file. This
> is what one of my metatype.xml files looks like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <metatype:MetaData
> xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0"
> localization="OSGI-INF/metatype/metatype">
> <OCD id="nl.interact911.ipds.auditservice" name="IPDS AuditService">
> <AD id="server_hostname" type="String" name="Server hostname"
> description="MySQL Server hostname"/>
> <AD id="database_username" type="String" name="Database username"
> description="Login username"/>
> <AD id="database_password" type="String" name="Database password"
> description="Login pasword"/>
> <AD id="database_name" type="String" name="Database name"
> description="Database name"/>
> </OCD>
> <Designate pid="nl.interact911.ipds.auditservice">
>
> </Designate>
> </metatype:MetaData>
>
>
> The value of the "pid" attribute on the "Designate" tag should match the
> value of the "pid" tag on the "Properties" tag in your metadata.xml.
>
> Let me know if that worked...
>
> Good luck,
> Geert Schuring.
>
>>
>> A quick note: I was able to make this work (with some metadata changes)
>> using
>> FileInstall, so my first question is: is this at all possible without
>> FileInstall.
>>
>> New metadata.xml:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <ipojo
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="org.apache.felix.ipojo
>> http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd"
>> xmlns="org.apache.felix.ipojo">
>> <component classname="com.epam.osgiapache.pricing.PricingService">
>> <requires field="vatservice" />
>> <provides>
>> <property name="callcount" field="callCount" />
>> </provides>
>> <callback transition="validate" method="start" />
>> <callback transition="invalidate" method="stop" />
>> <properties propagation="true">
>> <property name="callcount" field="callCount" />
>> </properties>
>> </component>
>> <instance component="com.epam.osgiapache.pricing.PricingService">
>> <property name="callcount" value="0" />
>> <property name="managed.service.pid"
>> value="com.epam.osgiapache.pricing"/>
>> </instance>
>> </ipojo>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Configuring-an-iPOJO-on-the-web-console-tp27861909p27862818.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://old.nabble.com/Configuring-an-iPOJO-on-the-web-console-tp27861909p27914800.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]