Lunatech Research - IT consulting, product research and software development

NederlandsEnglish
 
Peter Hilton's picture

Running Lumbermill on OS X 10.6 Snow Leopard

Écrit par Peter Hilton le Tue, 2010-02-23 10:48

Lumbermill is a log viewer that useful when you need to view and filter large quantities of java.util.logging or Log4J logging that uses the SocketAppender. Unfortunately, Lumbermill stopped working on OS X after the Snow Leopard upgrade. Here's how to get it working again.

Symptoms

If you start Lumbermill normally, with java -jar dist/lib/lumbermill.jar then there is a problem after you select the New Server Mill menu option, and enter a port number under Please enter the port to listen on

Lumbermill - attempting to create a New Server Mill

… the window doesn't open - nothing happens. Instead of opening the log output window, Lumbermill silently fails with the following NullPointerException (NPE):

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at com.traxel.lumbermill.desk.MillFrameControl.<init>(MillFrameControl.java:98)
	at com.traxel.lumbermill.Mill.<init>(Mill.java:44)
	at com.traxel.lumbermill.ServerMill.<init>(ServerMill.java:42)
	at com.traxel.lumbermill.desk.MillAction$ServerMillAction.getMill(MillAction.java:54)
	at com.traxel.lumbermill.desk.MillAction.actionPerformed(MillAction.java:131)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
	at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
	at java.awt.Component.processMouseEvent(Component.java:6348)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
	at java.awt.Component.processEvent(Component.java:6113)
	at java.awt.Container.processEvent(Container.java:2085)
	at java.awt.Component.dispatchEventImpl(Component.java:4714)
	at java.awt.Container.dispatchEventImpl(Container.java:2143)
	at java.awt.Component.dispatchEvent(Component.java:4544)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
	at java.awt.Container.dispatchEventImpl(Container.java:2129)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4544)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Cause

The problem is that Lumbermill tries to use the Aqua look and feel for Swing, which does not exist any more in the version of Java shipped with Snow Leopard. This because Aqua is 32-bit code and does not run on the 64-bit Snow Leopard Java runtime.

Solution

The solution is to specify a different Swing look and feel, by setting the swing.defaultlaf system property on the command line:

java -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -jar dist/lib/lumbermill.jar

This starts Lumbermill with Swing's 'Metal' look and feel, and the server mill window now opens normally.

New server window

Peter Hilton is a senior software developer at Lunatech Research.

Please send comments on this article to editorial@lunatech.com.

À propos de Lunatech

Fondé en 1993, Lunatech Research propose du consulting TIC, de la recherche de produits et des équipes de développement. Sous la forme d’une équipe d’experts programmeurs auto-managés travaillant avec une équipe commerciale expérimentée.

Contactez-nous

Lunatech Research B.V.
Heemraadssingel 70
3021 DD Rotterdam, Pays-Bas.

Téléphone et email

Tél : +31 10 750 2600
Fax : +31 10 243 9902
Email : contact@lunatech.fr