felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Köhler <kristian.koeh...@googlemail.com>
Subject Exception while using obr repository file generated by the bundleplugin
Date Tue, 03 Mar 2009 13:24:39 GMT
Hi

I'm trying to add/install some local jar files to my local OBR repository
and then use these jar-files within felix via the bundle repository. For
most of the files this seems to work fine but some files are corrupting my
repository (file). The following 'require' element is generated within the
obr repository file for the spring-core-2.5.6.jar file for example:

--- 8< ---

<require extend="false"
filter="(&amp;(package=org.eclipse.core.runtime)(version&gt;=0.0.0)(common=split)(mandatory:&lt;*common))"
multiple="false" name="package" optional="true">Import package
org.eclipse.core.runtime</require>

--- 8< ---

This elements causes the parser to throw the following exception when
invoking 'obr list' via the felix shell:

--- 8< ---

ERROR: Error parsing repository metadata
org.osgi.framework.InvalidSyntaxException: expected ~=|>=|<=
    at org.apache.felix.framework.FilterImpl.<init>(FilterImpl.java:81)
    at
org.apache.felix.framework.BundleContextImpl.createFilter(BundleContextImpl.java:102)
    at
org.apache.felix.bundlerepository.RequirementImpl.setFilter(RequirementImpl.java:57)
    at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.apache.felix.bundlerepository.metadataparser.XmlCommonHandler.startElement(XmlCommonHandler.java:490)
    at
org.apache.felix.bundlerepository.metadataparser.kxmlsax.KXml2SAXParser.parseXML(KXml2SAXParser.java:67)
    at
org.apache.felix.bundlerepository.RepositoryImpl.parseRepositoryFile(RepositoryImpl.java:256)
    at
org.apache.felix.bundlerepository.RepositoryImpl.access$000(RepositoryImpl.java:44)
    at
org.apache.felix.bundlerepository.RepositoryImpl$1.run(RepositoryImpl.java:75)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.apache.felix.bundlerepository.RepositoryImpl.<init>(RepositoryImpl.java:71)
    at
org.apache.felix.bundlerepository.RepositoryImpl.<init>(RepositoryImpl.java:60)
    at
org.apache.felix.bundlerepository.RepositoryAdminImpl.initialize(RepositoryAdminImpl.java:206)
    at
org.apache.felix.bundlerepository.RepositoryAdminImpl.discoverResources(RepositoryAdminImpl.java:126)
    at
org.apache.felix.bundlerepository.ObrCommandImpl.list(ObrCommandImpl.java:210)
    at
org.apache.felix.bundlerepository.ObrCommandImpl.execute(ObrCommandImpl.java:104)
    at
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:276)
    at
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:167)
    at java.lang.Thread.run(Thread.java:619)
WARNING: RepositoryAdminImpl: Exception creating repository
file:/home/kkoehler/repository.xml. Repository is skipped.
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.apache.felix.bundlerepository.metadataparser.XmlCommonHandler.startElement(XmlCommonHandler.java:490)
    at
org.apache.felix.bundlerepository.metadataparser.kxmlsax.KXml2SAXParser.parseXML(KXml2SAXParser.java:67)
    at
org.apache.felix.bundlerepository.RepositoryImpl.parseRepositoryFile(RepositoryImpl.java:256)
    at
org.apache.felix.bundlerepository.RepositoryImpl.access$000(RepositoryImpl.java:44)
    at
org.apache.felix.bundlerepository.RepositoryImpl$1.run(RepositoryImpl.java:75)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.apache.felix.bundlerepository.RepositoryImpl.<init>(RepositoryImpl.java:71)
    at
org.apache.felix.bundlerepository.RepositoryImpl.<init>(RepositoryImpl.java:60)
    at
org.apache.felix.bundlerepository.RepositoryAdminImpl.initialize(RepositoryAdminImpl.java:206)
    at
org.apache.felix.bundlerepository.RepositoryAdminImpl.discoverResources(RepositoryAdminImpl.java:126)
    at
org.apache.felix.bundlerepository.ObrCommandImpl.list(ObrCommandImpl.java:210)
    at
org.apache.felix.bundlerepository.ObrCommandImpl.execute(ObrCommandImpl.java:104)
    at
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:276)
    at
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:167)
    at java.lang.Thread.run(Thread.java:619)
Caused by: org.osgi.framework.InvalidSyntaxException: expected ~=|>=|<=
    at org.apache.felix.framework.FilterImpl.<init>(FilterImpl.java:81)
    at
org.apache.felix.framework.BundleContextImpl.createFilter(BundleContextImpl.java:102)
    at
org.apache.felix.bundlerepository.RequirementImpl.setFilter(RequirementImpl.java:57)
    ... 18 more

--- 8< ---

The parser expects "~=|>=|<=" but found "mandatory:<*common" ('explicit'
generated by the org.osgi.impl.bundle.obr.resource.BundleInfo class).

So I'm not sure what's going wrong here ;-) and how to fix this.
Is this the wrong syntax or is it a parser problem?

I'm using trunk versions of the bundle repository and the bundleplugin by
the way...

Thanks

Kristian

-- 
http://www.kkoehler.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message