UIDefaults.getUI() failed: no ComponentUI class

I’ve just started playing around with inserting beans from 3rd parties into my solutions, and have come across this error: “UIDefaults.getUI() failed: no ComponentUI class…”

I am trying to use the beans from: http://common.l2fprod.com/

What happens is that I get an generic “could not load bean” error from the developer when trying to add the bean to a form, and the java console outputs the dump below.

Using WinXPsp2 and Servoy 2.2.1rc2. Tried with: J2SE 1.4.x and J2SE1.5.0x with same result.

I’ve found a post via google possibly relating to that error that says:

SNIP>>>>>>>>>>>>>>>>>>>>
The problem is most likely caused by you Loading the L&F classes in a seperate Class loader and then not telling your running thread to use that Class Loader as the Context Class Loader.

The Swing UI Code will call back into the Look and Feels UI classes but if the Look and Feel code isn’t in the System class path then there is no way for the Swing UI code to find the classes. Unless you have your running thread set the Context Class loader.
<<SNIP<<<<<<<<<<<<<<<<<<<<

If anybody has any ideas on this, I’d be very happy to listen! :)

Cheers,

Lee.

===========================
Below is the Java Console dump:

UIDefaults.getUI() failed: no ComponentUI class for: com.l2fprod.common.swing.JB
uttonBar[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumS
ize=,minimumSize=,preferredSize=]
java.lang.Error
at javax.swing.UIDefaults.getUIError(Unknown Source)
at javax.swing.MultiUIDefaults.getUIError(Unknown Source)
at javax.swing.UIDefaults.getUI(Unknown Source)
at javax.swing.UIManager.getUI(Unknown Source)
at com.l2fprod.common.swing.JButtonBar.updateUI(JButtonBar.java:82)
at com.l2fprod.common.swing.JButtonBar.(JButtonBar.java:71)
at com.l2fprod.common.swing.JButtonBar.(JButtonBar.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.servoy.j2db.n.createInstance(Unknown Source)
at com.servoy.j2db.runtime.b.createInstance(Unknown Source)
at com.servoy.j2db.develop.c.s.doIt(Unknown Source)
at com.servoy.j2db.cmd.c$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.lang.NullPointerException
java.lang.NullPointerException
at com.l2fprod.common.swing.plaf.LookAndFeelAddons.getUI(LookAndFeelAddo
ns.java:241)
at com.l2fprod.common.swing.JButtonBar.updateUI(JButtonBar.java:82)
at com.l2fprod.common.swing.JButtonBar.(JButtonBar.java:71)
at com.l2fprod.common.swing.JButtonBar.(JButtonBar.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.servoy.j2db.n.createInstance(Unknown Source)
at com.servoy.j2db.runtime.b.createInstance(Unknown Source)
at com.servoy.j2db.develop.c.s.doIt(Unknown Source)
at com.servoy.j2db.cmd.c$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)