... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)


BIRT vs Script Extensions vs jTDS vs Eclipse Plug-ins

BIRT permits developers to create script extensions in Java.  These extensions can be called from a report's script to perform customized processing.  However, BIRT will not find such extensions unless you manage the classpath yourself manually.  The problem can be corrected by editing the MANIFEST.MF in the plug-in org.eclipse.birt.report.engine and adding the directive Eclipse-BuddyPolicy: dependent to the end.  This allows BIRT to find extensions in your plug-ins.

BIRT also allows you to add JDBC drivers to the report engine by dropping files into a directory in the plugin org.eclipse.birt.report.data.oda.jdbc.  This does not work, however, for drivers that require native libraries (such as ntlmauth.dll that supports the jTDS driver).  You can work around that problem by creating a plugin that contains your driver and its native library, and then adding a reference to that plugin in the manifest of BIRT's JDBC plugin.  It is not sufficient to copy the native library into BIRT's plugin if your application uses it itself because native libraries can be loaded from exactly one plugin.

This all seems nice and neat, but here is a problem.  A developer experienced a problem where the jTDS driver class could not be loaded by BIRT (even though it had been successfully loaded by the main application).  Checking the application's plug-in registry, the jTDS plug-in had been successfully resolved.  I had run into a similar problem when I had switched into a branch that lacked the jTDS plug-in and then switched back.  I found that I could fix the problem by touching the MANIFEST.MF in BIRT's org.eclipse.birt.report.data.oda.jdbc plug-in.  I chalked it up to some sort of stale plug-in cache in Eclipse.  But the other developer did no such branch switch -- Eclipse just stopped respecting the updated manifest directive.  The 'touch' trick fixed it, however.  Puzzling...

This entry was updated on 2007-02-13: the plug-in to patch with Eclipse-BuddyPolicy is org.eclipse.birt.report.engine, not org.eclipse.birt.report.viewer.  If you change only the latter, then only the BIRT viewer component will see your extensions.  If the change the former, both in-memory and viewer applications will see them.

Blog Archive