Home
Analytics
Deploying Barcode Plugin in Application
Navjeet
Hey,
I have been working on a plugin extension that deals with barcodes. I have gotten it working properly as an eclipse plug-in. (Basically exporting the project as a deployable plug-in jar and putting in eclipse plug-in folder) However, when I go to deploy it in my application where we use the report made in birt then this plugin doesn't work, I don't get any errors either. The reports will generate fine, just without the barcode when the report being displayed. I have placed the barcode jar in my birt.war lib also but no result. Here is the manifest for the barcode plugin:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: BIRT Barcode Plug-in
Bundle-SymbolicName: com.onbarcode.barcode.birt;singleton:=true
Bundle-Version: 2.2.1
Bundle-Localization: plugin
Eclipse-LazyStart: true
Require-Bundle: org.eclipse.core.runtime.compatibility,org.eclipse.bir
t.report.designer.core;resolution:=optional,org.eclipse.birt.report.d
esigner.ui;resolution:=optional,org.eclipse.birt.report.designer.ui.v
iews;resolution:=optional,org.eclipse.birt.report.engine,org.eclipse.
birt.core.ui;resolution:=optional,org.eclipse.ui;resolution:=optional
,org.eclipse.ui.forms;bundle-version="3.4.1";resolution:=optional,org
.eclipse.birt.data;bundle-version="2.5.2"
Bundle-Activator: com.onbarcode.barcode.birt.BIRTBarcodePlugin
Export-Package: com.onbarcode.barcode.birt,com.onbarcode.barcode.birt.
i18n,com.onbarcode.barcode.birt.util,com.onbarcode.barcode.birt.views
Bundle-ClassPath: .,lib/barcode.jar
Import-Package: com.ibm.icu.util;version="4.0.1.1",org.eclipse.ui.form
s.widgets;resolution:=optional
Bundle-Vendor: OnBarcode.com
I am also attaching the jar file which i am using for barcode.
Find more posts tagged with
Comments
CBR
BIRT deployment changed with version 3.7. If you want to use your plugin in 3.7 runtime you have to export the jar files used by your plugin in addition to your plugin.jar and add them to the classpath of your application. The 3.7 runtime doesn't use OSGI so it won't interpret your MANIFEST.MF and in consequence doesn't add lib/barcode.jar to the classpath of the bundle.
Just add the barcode.jar manually to the classpath of your application that runs the report engine.
If you are using the BIRT Webviewer add barcode.jar to the lib folder of the exploded war.
CBR
When having a closer look on your manifest file i see dependencies to BIRT UI bundles. UI bundles are not part of the report engine (because you won't have a UI on the server :-))
When developing BIRT plugins you always have to make sure to separate the UI part from the non UI part. The non UI part does all the logic and should be deployed to the report engine API (this plugin must not have dependencies to any UI plugin). The UI plugin uses this core plugin and builds the UI for your barcode. If you already have the UI and core part it would be easy to separate them into two bundles. We can colaborate if you plan to make it open source.
Navjeet
Hi cbrell,
Thanks for your reply its working now. What u told me to do that thing i had already done i.e. i had already deployed com.onbarcode.barcode.birt_2.2.1.jar downloaded from
http://www.onbarcode.com/products/birt_barcode/
in classpath i.e. inside my server jboss/server/default/deploy/birt.war/WEB-INF/lib. Inside this folder i placed my barcode jar but i was getting error java.lang.ClassNotFoundException: com.onbarcode.barcode.DataMatrix. So today i downloaded another jar barcode.jar from
http://www.onbarcode.com/products/java_barcode/
and when i deployed both these jars in lib folder then i got the barcode in my application.