Debugging BIRT: How do I enable logging for OSGi/Equinox?

12. July, 2010

If you ever tried to enable logging for OSGi (Equinox) because starting the BIRT engine fails for mysterious reasons, you will have noticed that BIRT removes all osgi.* options from the System.properties before it launches (see ).

Instead, it expects these options in config.ini (which must be in the current folder):

# Specify the file with the debug options. See the .options file in the org.eclipse.osgi*.jar for examples
osgi.debug=/path/to/file/with/debug.options
# Change the classloader. Possible values are: "app", "fwk", "boot" (default)
# app: Use the current SystemClassLoader
# boot: Use the boot classloader
# fwk: Use the classloader which was used to load OSGi.
#osgi.parentClassloader=fwk

Use fwk if you see errors because of missing XML parser classes. The Java runtime has a private static field which contains the XML parser factory and if you touch any XML code before you start OSGi, then that field will be set and OSGi will be forced to use this XML parser — only the default boot classloader can’t see the parser. Bummer.


Jazoon 2010, day 1, part 2

7. June, 2010

Here is the rest of day 1 (cont’d from previous post):

Construction Techniques for Domain Specific Languages by Neal Ford

I’ve seen this talk before. Maybe in 2008?

Slides aren’t on Neal’s homepage nor on his github.

Do you really get class loaders? by Jevgeni Kabanov

Nice talk with lots of exceptions you’ve never seen before. It’s a good, real-world example how something simple (like class loading which is basically just loading streams of bytes from a list of places) can turn into a nightmare if you just add one single, innocent rule (like the web guys did back then with JSP 1.0 when they decided to reverse the order of lookups).

97 Things Every Programmer Should Know by Kevlin Henney

Kevlin has been busy with a new book: 97 Things Every Programmer Should Know (link goes to a page with the ToC which links to the content which is CC’d).

Some examples:

Best of all: Many of these rules date back to the 1960’s! Time to apply some of these rules 🙂

That was day 1. On to day 2!