-
1. Re: Xaware bundle exception
jgoodyea Apr 22, 2009 8:58 AM (in response to ankit.vernekar)Hi,
How are you building this bundle? If your using the bundle plugin for maven (BND tool) then you probably need to update the import package list or bundle-classpath entry. There is some good documentation on this available on the Apache Felix BND page: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html. The way you create a bundle with BND is to tell it the content of the bundle's JAR file as a subset of the available classes. The directives you supply BND with will construct the bundle's manifest headers, which contain entires such as imports, exports, classpath, and other variables. There is a also good introduction to BND available as well on this blog.
Cheers,
Jamie
-
2. Re: Xaware bundle exception
ankit.vernekar Apr 23, 2009 1:49 AM (in response to jgoodyea)Hi Jamie,
Yes I am using maven to build the osgi bundle in eclipse.Read the article you have referred to,Its good.But there are few warnings coming in the successful build. please have a look.
Include-Resource: overriding META-INF/spring/bundle-context-osgi.xml=src/main/resources/META-INF/spring/bundle-context-osgi.xml,META-INF/spring/bundle-context.xml=src/main/resources/META-INF/spring/bundle-context.xml,log4j.properties=src/main/resources/log4j.properties,META-INF/MANIFEST.MF=META-INF/MANIFEST.MF,META-INF/readme.txt=META-INF/readme.txt with src/main/resources (add {maven-resources} if you want to include the maven resources)
Warning building bundle com.progress.pso:payments-osgi-pojo-service:bundle:0.0.1-SNAPSHOT : Instructions in Export-Package that are never used: org\.sl4j, org\.xaware\.api\..*|org\.xaware\.api
Warning building bundle com.progress.pso:payments-osgi-pojo-service:bundle:0.0.1-SNAPSHOT : Superfluous export-package instructions:
Also my manifest file shows error in Import package.The errors are
No available bundle exports package 'org.slf4j'
Unsatisfied constraint: 'Import-Package: org.springframework.beans.factory; version="2.5.0"'
Do suggest a solution if possible as I am new to this field.Thank You
Regards,
Ankit
-
3. Re: Xaware bundle exception
jgoodyea Apr 23, 2009 2:06 PM (in response to ankit.vernekar)It looks like we are going to have to work around a bit with your bundle directives. Could you post the instructions your passing the maven-bundle-plugin here?
Thanks,
Jamie
-
4. Re: Xaware bundle exception
ankit.vernekar Apr 24, 2009 1:31 AM (in response to jgoodyea)HI,
I have attached 3 files.Transformer.java uses the xaware api in the trnsform method.The bundle-context which register the Transformer bean and the Pom.xml which contains the detail about the plugins and dependencies.
Thank you in advance.
Regards,
Ankit
-
Transformer.java 932 bytes
-
pom.xml 9.7 KB
-
bundle-context.xml 865 bytes
-
-
5. Re: Xaware bundle exception
jgoodyea Apr 27, 2009 8:31 AM (in response to ankit.vernekar)Thanks Ankit, I'll post back here what I find.
Cheers,
Jamie
-
6. Re: Xaware bundle exception
jgoodyea Apr 29, 2009 1:01 PM (in response to jgoodyea)Hi Ankit,
I see that you have your Xa-server.jar referenced in your jdk lib, in the below sample I have for you would access the jar from some location where you build your application. I've labeled the two sections I'd edit and included some sample code for the entries.
dependencies
Here we add a dependency on the xa-server jar.
$/lib/Xa-server.jar</systemPath> </dependency>
maven-bundle-plugin
We place the xa-server jar directly on the classpath for this bundle. The directives for imports and exports will have to still be adjusted for your application, however this should reduce the number of errors your observing. You'll probably also want to place some resources under the Private-Package directive. Unfortunately I'm not that familiar with xaware, I hope that the below helps. <Bundle-ClassPath>.,Xa-server.jar</Bundle-ClassPath> <Embed-Dependency>*</Embed-Dependency> <Import-Package>*</Import-Package> <Export-Package> !com.progress.pso.osgi.payments_api.internal, com.progress.pso.osgi.payments_api*, org.xaware.api.*, org.sl4j </Export-Package> <Include-Resource>{maven-resources}, $/lib/Xa-server.jar</Include-Resource>Cheers,
Jamie