You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by nroduit <Ni...@jmicrovision.com> on 2009/07/08 23:17:32 UTC

SCR xml Shema issue

When I am using the configuration file below with SCR 1.0.8, I get errors. If
I remove the "src:" part, it works, but it will not work anymore with the
equinox ds 1.1. Is there a standard way to write this file for felix and
equinox ?

Thanks in advance,

Nicolas

<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
immediate="false" name="Viewer">
   <implementation class="org.weasis.viewer2d.View2dFactory"/>
   <property name="pluginName" type="String" value="2D Viewer"/>
   <service>
      <provide interface="org.weasis.plugin.service.SeriesViewerFactory"/>
   </service>
</scr:component>

22:50:23.896 [Thread-0] ERROR org.weasis.viewer2d - General problem with
descriptor entry 'OSGI-INF/viewerFactory.xml'
org.apache.felix.log.LogException: org.xmlpull.v1.XmlPullParserException:
undefined prefix: scr (position:START_TAG <{null}scr:component
immediate='false' name='2D Viewer factory'>@2:59 in
java.io.BufferedReader@720f6c) 
	at org.kxml2.io.KXmlParser.exception(Unknown Source) [na:na]
	at org.kxml2.io.KXmlParser.error(Unknown Source) [na:na]
	at org.kxml2.io.KXmlParser.adjustNsp(Unknown Source) [na:na]
	at org.kxml2.io.KXmlParser.parseStartTag(Unknown Source) [na:na]
	at org.kxml2.io.KXmlParser.nextImpl(Unknown Source) [na:na]
	at org.kxml2.io.KXmlParser.next(Unknown Source) [na:na]
	at
org.apache.felix.scr.impl.parser.KXml2SAXParser.parseXML(KXml2SAXParser.java:62)
[na:na]
	at
org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:154)
[na:na]
-- 
View this message in context: http://www.nabble.com/SCR-xml-Shema-issue-tp24399586p24399586.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: SCR xml Shema issue

Posted by nroduit <Ni...@jmicrovision.com>.
Thanks Felix,

It works with SCR 1.0.9.


Felix Meschberger-2 wrote:
> 
> Hi Nicolas,
> 
> You seem to be using the R4.2 namespace definition .../v1.1.0, which is
> not supported by SCR 1.0.8 yet.
> 
> I suggest you refer to .../v1.0.0 unless you need any newer features.
> This will also work with SCR 1.0.8.
> 
> Otherwise try the latest 1.0.9-SNAPSHOT which might already support this
> namespace.
> 
> HTH
> 
> Regards
> Felix
> 
> nroduit schrieb:
>> When I am using the configuration file below with SCR 1.0.8, I get
>> errors. If
>> I remove the "src:" part, it works, but it will not work anymore with the
>> equinox ds 1.1. Is there a standard way to write this file for felix and
>> equinox ?
>> 
>> Thanks in advance,
>> 
>> Nicolas
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
>> immediate="false" name="Viewer">
>>    <implementation class="org.weasis.viewer2d.View2dFactory"/>
>>    <property name="pluginName" type="String" value="2D Viewer"/>
>>    <service>
>>       <provide
>> interface="org.weasis.plugin.service.SeriesViewerFactory"/>
>>    </service>
>> </scr:component>
>> 
>> 22:50:23.896 [Thread-0] ERROR org.weasis.viewer2d - General problem with
>> descriptor entry 'OSGI-INF/viewerFactory.xml'
>> org.apache.felix.log.LogException: org.xmlpull.v1.XmlPullParserException:
>> undefined prefix: scr (position:START_TAG <{null}scr:component
>> immediate='false' name='2D Viewer factory'>@2:59 in
>> java.io.BufferedReader@720f6c) 
>> 	at org.kxml2.io.KXmlParser.exception(Unknown Source) [na:na]
>> 	at org.kxml2.io.KXmlParser.error(Unknown Source) [na:na]
>> 	at org.kxml2.io.KXmlParser.adjustNsp(Unknown Source) [na:na]
>> 	at org.kxml2.io.KXmlParser.parseStartTag(Unknown Source) [na:na]
>> 	at org.kxml2.io.KXmlParser.nextImpl(Unknown Source) [na:na]
>> 	at org.kxml2.io.KXmlParser.next(Unknown Source) [na:na]
>> 	at
>> org.apache.felix.scr.impl.parser.KXml2SAXParser.parseXML(KXml2SAXParser.java:62)
>> [na:na]
>> 	at
>> org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:154)
>> [na:na]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/SCR-xml-Shema-issue-tp24399586p24417517.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: SCR xml Shema issue

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Nicolas,

You seem to be using the R4.2 namespace definition .../v1.1.0, which is
not supported by SCR 1.0.8 yet.

I suggest you refer to .../v1.0.0 unless you need any newer features.
This will also work with SCR 1.0.8.

Otherwise try the latest 1.0.9-SNAPSHOT which might already support this
namespace.

HTH

Regards
Felix

nroduit schrieb:
> When I am using the configuration file below with SCR 1.0.8, I get errors. If
> I remove the "src:" part, it works, but it will not work anymore with the
> equinox ds 1.1. Is there a standard way to write this file for felix and
> equinox ?
> 
> Thanks in advance,
> 
> Nicolas
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
> immediate="false" name="Viewer">
>    <implementation class="org.weasis.viewer2d.View2dFactory"/>
>    <property name="pluginName" type="String" value="2D Viewer"/>
>    <service>
>       <provide interface="org.weasis.plugin.service.SeriesViewerFactory"/>
>    </service>
> </scr:component>
> 
> 22:50:23.896 [Thread-0] ERROR org.weasis.viewer2d - General problem with
> descriptor entry 'OSGI-INF/viewerFactory.xml'
> org.apache.felix.log.LogException: org.xmlpull.v1.XmlPullParserException:
> undefined prefix: scr (position:START_TAG <{null}scr:component
> immediate='false' name='2D Viewer factory'>@2:59 in
> java.io.BufferedReader@720f6c) 
> 	at org.kxml2.io.KXmlParser.exception(Unknown Source) [na:na]
> 	at org.kxml2.io.KXmlParser.error(Unknown Source) [na:na]
> 	at org.kxml2.io.KXmlParser.adjustNsp(Unknown Source) [na:na]
> 	at org.kxml2.io.KXmlParser.parseStartTag(Unknown Source) [na:na]
> 	at org.kxml2.io.KXmlParser.nextImpl(Unknown Source) [na:na]
> 	at org.kxml2.io.KXmlParser.next(Unknown Source) [na:na]
> 	at
> org.apache.felix.scr.impl.parser.KXml2SAXParser.parseXML(KXml2SAXParser.java:62)
> [na:na]
> 	at
> org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:154)
> [na:na]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org