<Swing Dev> CSS$LengthUnit not found when running with my own AWT implementation

Clemens Eisserer linuxhippy at gmail.com
Wed Jun 29 12:38:23 UTC 2011


Hi,

I am working on a Caciocavallo-based AWT implementation which
(hopefully) will allow to run Swing-Applications server-side but
re-direct rendering/events to a Canvas5 capable browser.

However I have troubles with Swing elements which contain HTML,
initiating those widgets fails with a NoClassDefFoundError, although I
can see the class is in rt.jar - and it works when e.g. using the X11
AWT implementation.

Any ideas what could cause this? Is there some black-magic involved here? ;)

Thank you in advance, Clemens

Full stack-trace when trying to start SwingSet2:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class
javax.swing.text.html.CSS$LengthUnit
	at javax.swing.text.html.CSS$LengthValue.getValue(CSS.java:2264)
	at javax.swing.text.html.CSS$LengthValue.getValue(CSS.java:2250)
	at javax.swing.text.html.CSS.getLength(CSS.java:788)
	at javax.swing.text.html.StyleSheet$BoxPainter.getLength(StyleSheet.java:1916)
	at javax.swing.text.html.StyleSheet$BoxPainter.<init>(StyleSheet.java:1770)
	at javax.swing.text.html.StyleSheet.getBoxPainter(StyleSheet.java:920)
	at javax.swing.text.html.ParagraphView.setPropertiesFromAttributes(ParagraphView.java:102)
	at javax.swing.text.ParagraphView.<init>(ParagraphView.java:59)
	at javax.swing.text.html.ParagraphView.<init>(ParagraphView.java:54)
	at javax.swing.text.html.HTMLEditorKit$HTMLFactory.create(HTMLEditorKit.java:1150)
	at javax.swing.text.CompositeView.loadChildren(CompositeView.java:112)
	at javax.swing.text.CompositeView.setParent(CompositeView.java:139)
	at javax.swing.text.html.BlockView.setParent(BlockView.java:72)
	at javax.swing.text.html.HTMLEditorKit$HTMLFactory$BodyBlockView.setParent(HTMLEditorKit.java:1329)
	at javax.swing.text.CompositeView.replace(CompositeView.java:217)
	at javax.swing.text.BoxView.replace(BoxView.java:181)
	at javax.swing.text.CompositeView.loadChildren(CompositeView.java:114)
	at javax.swing.text.CompositeView.setParent(CompositeView.java:139)
	at javax.swing.text.html.BlockView.setParent(BlockView.java:72)
	at javax.swing.plaf.basic.BasicTextUI$RootView.setView(BasicTextUI.java:1330)
	at javax.swing.plaf.basic.BasicTextUI.setView(BasicTextUI.java:695)
	at javax.swing.plaf.basic.BasicTextUI.modelChanged(BasicTextUI.java:684)
	at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.propertyChange(BasicTextUI.java:1788)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
	at java.awt.Component.firePropertyChange(Component.java:8381)
	at javax.swing.text.JTextComponent.setDocument(JTextComponent.java:453)
	at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:1058)
	at javax.swing.JEditorPane.setContentType(JEditorPane.java:981)
	at javax.swing.JEditorPane.<init>(JEditorPane.java:292)
	at SwingSet2.initializeDemo(SwingSet2.java:272)
	at SwingSet2.<init>(SwingSet2.java:201)
	at SwingSet2.main(SwingSet2.java:223)



More information about the swing-dev mailing list