felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Pozolotin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-1898) Extend SCR Plugin to support new updated method declaration
Date Mon, 25 Apr 2011 17:41:03 GMT

    [ https://issues.apache.org/jira/browse/FELIX-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024873#comment-13024873
] 

Andrei Pozolotin commented on FELIX-1898:
-----------------------------------------

Felix: 

1) thanks for the response;

2) when I enable 
@Component(specVersion = "1.1-felix", 

I get this exception:

java.lang.NullPointerException
	at org.apache.felix.scr.impl.metadata.XmlHandler.startElement(XmlHandler.java:237)
	at org.apache.felix.scr.impl.parser.KXml2SAXParser.parseXML(KXml2SAXParser.java:73)
	at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:227)
	at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)
	at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111)
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285)
	at org.apache.felix.scr.impl.Activator.loadAllComponents(Activator.java:223)
	at org.apache.felix.scr.impl.Activator.start(Activator.java:120)
	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1852)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:1769)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1173)
	at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
	at java.lang.Thread.run(Thread.java:662)
ERROR: com.barchart.test.osgi-hello-0 (1): General problem with descriptor entry '/OSGI-INF/serviceComponents.xml'
org.apache.felix.scr.impl.parser.ParseException: Exception during parsing
	at org.apache.felix.scr.impl.metadata.XmlHandler.startElement(XmlHandler.java:333)
	at org.apache.felix.scr.impl.parser.KXml2SAXParser.parseXML(KXml2SAXParser.java:73)
	at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:227)
	at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)
	at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111)
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:285)
	at org.apache.felix.scr.impl.Activator.loadAllComponents(Activator.java:223)
	at org.apache.felix.scr.impl.Activator.start(Activator.java:120)
	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1852)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:1769)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1173)
	at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
	at java.lang.Thread.run(Thread.java:662)

and this xml:

<?xml version="1.0" encoding="UTF-8"?>
<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0-felix">
    <scr:component enabled="true" name="basic-multipe" configuration-policy="require" activate="activate"
deactivate="deactivate" modified="modified">
        <implementation class="com.barchart.hello.impl.CompMultiple"/>
        <service servicefactory="false">
            <provide interface="com.barchart.hello.BasicService"/>
        </service>
        <property name="json"/>
        <property name="service.pid" value="basic-multipe"/>
    </scr:component>
    <scr:component enabled="true" name="com.barchart.hello.impl.CompMultipleFactory" activate="activate"
deactivate="deactivate">
        <implementation class="com.barchart.hello.impl.CompMultipleFactory"/>
        <service servicefactory="false">
            <provide interface="org.osgi.service.cm.ManagedServiceFactory"/>
        </service>
        <property name="service.pid" value="com.barchart.hello.impl.CompMultipleFactory"/>
    </scr:component>
    <scr:component enabled="true" name="com.barchart.hello.impl.CompMultipleHost" activate="activate"
deactivate="deactivate">
        <implementation class="com.barchart.hello.impl.CompMultipleHost"/>
        <property name="service.pid" value="com.barchart.hello.impl.CompMultipleHost"/>
        <reference name="service" interface="com.barchart.hello.BasicService" cardinality="0..n"
policy="dynamic" bind="bind" unbind="unbind"/>
    </scr:component>
    <scr:component enabled="true" name="basic-single" configuration-policy="require" activate="activate"
deactivate="deactivate" modified="modified">
        <implementation class="com.barchart.hello.impl.CompSingle"/>
        <service servicefactory="false">
            <provide interface="com.barchart.hello.BasicService"/>
        </service>
        <property name="prop_key_1"/>
        <property name="prop_key_2" type="String"/>
        <property name="service.pid" value="basic-single"/>
    </scr:component>
</components>


> Extend SCR Plugin to support new updated method declaration
> -----------------------------------------------------------
>
>                 Key: FELIX-1898
>                 URL: https://issues.apache.org/jira/browse/FELIX-1898
>             Project: Felix
>          Issue Type: Sub-task
>          Components: Maven SCR Plugin, SCR Annotations
>    Affects Versions: maven-scr-plugin-1.4.0, scr annotations 1.0.0
>            Reporter: Felix Meschberger
>            Assignee: Carsten Ziegeler
>             Fix For: maven-scr-plugin-1.4.2, scr annotations 1.2.0
>
>         Attachments: FELIX-1898-annotations.patch, FELIX-1898.patch
>
>
> Provided FELIX-1893 is being implemented, the Maven SCR plugin must be enhanced to support
the new updated method:
>    * basically support the method if explicitly declared
>    * automatically set namespace if updated method is declared
>    * implement automatic method detection (similar to bind/unbind method detection)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message