You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Achim Nierbeck <bc...@googlemail.com> on 2011/01/14 21:44:58 UTC

Strange Blueprint behavior

Hi,

I do have a strange behavior when using blueprint for creating a web
command.
like seen below (it's also available at trunk)

I always get a

org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'cardinality' is not allowed to appear in element 'reference'.

But there is no cardinality at all in the blueprint xml.

Any hints what I'm doing wrong here?

Thanks, Achim

-----------> SNIP

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">

    <reference id="slService"
interface="org.osgi.service.startlevel.StartLevel"
availability="optional" />

    <bean id="eaHandler"
class="org.apache.karaf.shell.web.WebEventHandler" />
       
    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.0.0">
        <command name="web/list">
            <action class="org.apache.karaf.shell.web.WebListCommand">
                <property name="startLevelService" ref="slService" />
                <property name="eventHandler" ref="eaHandler" />
            </action>
        </command>
    </command-bundle>


    <service id="eaHandlerSrvc"
interface="org.osgi.service.event.EventHandler" ref="eaHandler">
        <service-properties>
            <entry key="event.topics" value="org/osgi/service/web/*"/>
        </service-properties>
    </service>

</blueprint>

Re: Strange Blueprint behavior

Posted by Achim Nierbeck <bc...@googlemail.com>.
Thanks a lot found the issue it was in the features.xml (gertv on IRC
found it)

> Did you make sure the correct bundle is installed?  Drop it in the
> deploy folder after having verified the contents.
>
> On Friday, January 14, 2011, Achim Nierbeck <bc...@googlemail.com> wrote:
>> Hi,
>>
>> I do have a strange behavior when using blueprint for creating a web
>> command.
>> like seen below (it's also available at trunk)
>>
>> I always get a
>>
>> org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
>> 'cardinality' is not allowed to appear in element 'reference'.
>>
>> But there is no cardinality at all in the blueprint xml.
>>
>> Any hints what I'm doing wrong here?
>>
>> Thanks, Achim
>>
>> -----------> SNIP
>>
>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
>>
>>     <reference id="slService"
>> interface="org.osgi.service.startlevel.StartLevel"
>> availability="optional" />
>>
>>     <bean id="eaHandler"
>> class="org.apache.karaf.shell.web.WebEventHandler" />
>>
>>     <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.0.0">
>>         <command name="web/list">
>>             <action class="org.apache.karaf.shell.web.WebListCommand">
>>                 <property name="startLevelService" ref="slService" />
>>                 <property name="eventHandler" ref="eaHandler" />
>>             </action>
>>         </command>
>>     </command-bundle>
>>
>>
>>     <service id="eaHandlerSrvc"
>> interface="org.osgi.service.event.EventHandler" ref="eaHandler">
>>         <service-properties>
>>             <entry key="event.topics" value="org/osgi/service/web/*"/>
>>         </service-properties>
>>     </service>
>>
>> </blueprint>
>>


Re: Strange Blueprint behavior

Posted by Guillaume Nodet <gn...@gmail.com>.
Did you make sure the correct bundle is installed?  Drop it in the
deploy folder after having verified the contents.

On Friday, January 14, 2011, Achim Nierbeck <bc...@googlemail.com> wrote:
> Hi,
>
> I do have a strange behavior when using blueprint for creating a web
> command.
> like seen below (it's also available at trunk)
>
> I always get a
>
> org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
> 'cardinality' is not allowed to appear in element 'reference'.
>
> But there is no cardinality at all in the blueprint xml.
>
> Any hints what I'm doing wrong here?
>
> Thanks, Achim
>
> -----------> SNIP
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
>
>     <reference id="slService"
> interface="org.osgi.service.startlevel.StartLevel"
> availability="optional" />
>
>     <bean id="eaHandler"
> class="org.apache.karaf.shell.web.WebEventHandler" />
>
>     <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.0.0">
>         <command name="web/list">
>             <action class="org.apache.karaf.shell.web.WebListCommand">
>                 <property name="startLevelService" ref="slService" />
>                 <property name="eventHandler" ref="eaHandler" />
>             </action>
>         </command>
>     </command-bundle>
>
>
>     <service id="eaHandlerSrvc"
> interface="org.osgi.service.event.EventHandler" ref="eaHandler">
>         <service-properties>
>             <entry key="event.topics" value="org/osgi/service/web/*"/>
>         </service-properties>
>     </service>
>
> </blueprint>
>

-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com