I checked all the manifest entries in all jar files and found no entries. But the entries I found were in pom.xml.
I think something wrong the way I launched Felix, because standalone is working fine. I'm loading bundle from a jar. It is from the simple-service-bundle sample comes with spring-osgi. -----Bundle Content--- META-INF/ META-INF/MANIFEST.MF META-INF/spring/ META-INF/spring/simpleservice-osgi.xml META-INF/spring/simpleservice.xml META-INF/maven/ META-INF/maven/org.springframework.osgi.samples/ META-INF/maven/org.springframework.osgi.samples/simple-service-bundle/ META-INF/maven/org.springframework.osgi.samples/simple-service-bundle/pom.xml META-INF/maven/org.springframework.osgi.samples/simple-service-bundle/pom.properties org/ org/springframework/ org/springframework/osgi/ org/springframework/osgi/samples/ org/springframework/osgi/samples/simpleservice/ org/springframework/osgi/samples/simpleservice/impl/ org/springframework/osgi/samples/simpleservice/impl/MyServiceImpl.class org/springframework/osgi/samples/simpleservice/MyService.class -----Manifest file---- Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: sameera Build-Jdk: 1.5.0_09 Extension-Name: simple-service-bundle Specification-Title: The Spring-OSGi project makes it easy to build Sp ring applications that run in an OSGi framework. A Spring applicati on written in this way provides better separation of modules, the a bility to dynamically add, remove, and update modules in a running system, the ability to deploy multiple versions of a module simulta neously (and have clients automatically bind to the appropriate one ), and a dynamic service model. Specification-Vendor: Spring Framework Implementation-Vendor: Spring Framework Implementation-Title: simple-service-bundle Implementation-Version: 1.0-m1 Bundle-Version: 1.0 Bundle-Vendor: Spring Framework Bundle-DocURL: http://www.springframework.org/osgi Bundle-ClassPath: .,target/classes/ Bundle-SymbolicName: org.springframework.osgi.samples.simpleservice Bundle-Name: Simple-Service-Sample Export-Package: org.springframework.osgi.samples.simpleservice ----Simpleservice.xml --- <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean name="simpleService" class=" org.springframework.osgi.samples.simpleservice.impl.MyServiceImpl" /> </beans> ----Simpleservice-OSGi.xml --- <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd"> <osgi:service id="simpleServiceOsgi" ref="simpleService" interface="org.springframework.osgi.samples.simpleservice.MyService" /> </beans> ------------------------------------------- Thank you Sameera On 4/24/07, Stuart McCulloch <[EMAIL PROTECTED]> wrote:
On 25/04/07, Sameera Withanage <[EMAIL PROTECTED]> wrote: > I'm using the Felix built from trunk. > > Here is the exception... > > java.lang.NumberFormatException: For input string: "${pom" Looks like it's using a manifest that hasn't been filtered by maven and still has the ${pom....} variable, which of course is not valid. The warnings from spring-osgi are possibly related - build issue? Are you loading this bundle from a jar or directory? Could you provide a jar / directory listing along with the manifest? > at java.lang.NumberFormatException.forInputString( > NumberFormatException.java :48) > at java.lang.Integer.parseInt(Integer.java:447) > at java.lang.Integer.parseInt(Integer.java:497) > at org.osgi.framework.Version.<init>(Version.java:127) > at org.osgi.framework.Version.parseVersion (Version.java:208) > at org.apache.felix.framework.Felix.createModule(Felix.java:3112) > at org.apache.felix.framework.Felix.createBundleInfo(Felix.java :3057) > at org.apache.felix.framework.Felix.installBundle (Felix.java:1961) > at org.apache.felix.framework.Felix.start(Felix.java:443) > at com.aeturnum.athiva.rnd.FelixHost.<init>(FelixHost.java:82) > at com.aeturnum.athiva.rnd.Main.main(Main.java:17) > org.osgi.framework.BundleException : Could not create bundle object. > at org.apache.felix.framework.Felix.installBundle(Felix.java:2012) > at org.apache.felix.framework.Felix.start(Felix.java:443) > at com.aeturnum.athiva.rnd.FelixHost.<init>( FelixHost.java:82) > at com.aeturnum.athiva.rnd.Main.main(Main.java:17) > Caused by: java.lang.NumberFormatException: For input string: "${pom" > at java.lang.NumberFormatException.forInputString( > NumberFormatException.java :48) > at java.lang.Integer.parseInt(Integer.java:447) > at java.lang.Integer.parseInt(Integer.java:497) > at org.osgi.framework.Version.<init>(Version.java:127) > at org.osgi.framework.Version.parseVersion (Version.java:208) > at org.apache.felix.framework.Felix.createModule(Felix.java:3112) > at org.apache.felix.framework.Felix.createBundleInfo(Felix.java :3057) > at org.apache.felix.framework.Felix.installBundle (Felix.java:1961) > ... 3 more > > > And additionally once I start a spring bundle it gives this warnings and not > registering services exported from it. > > WARNING: META-INF/spring.handlers ( > org.apache.felix.moduleloader.ResourceNotFoundException: > META-INF/spring.handlers) > WARNING: META-INF/spring.schemas ( > org.apache.felix.moduleloader.ResourceNotFoundException: > META-INF/spring.schemas) > > I'm still new to relate this exception to some place, but this bundle works > fine in standalone felix and it registers the services as well. > > Thank you > > Sameera > > > On 4/24/07, Richard S. Hall <[EMAIL PROTECTED]> wrote: > > > > Could you post the exception? > > > > Also, are you using Felix built from trunk or 0.8.0-incubator ? > > > > -> richard > > > > Sameera Withanage wrote: > > > Hi, > > > > > > I'm embedding Felix in a host application following the examples given > > in > > > Felix site. When I'm trying to install a bundle, for instance > > > spring-osgi, > > > it gives NumberformatException. I installed the same set of bundles > > using > > > standalone Felix console and all started successfully. I couldn't > > > figure out > > > why the same is not happening at embedded version. > > > > > > I tried removing all the META-INF/maven folders from jar bundles and > > > found > > > all bundles are starting, but it seems not practicle to always edit > > > bundles. > > > > > > Any help would be greatly appreciated. > > > > > > Sameera > > > > > > -- Cheers, Stuart