powered by Jive Software

UiThreadingViolationException

I am trying to compile my own Spark client, because I would like to rebrand it and to lock down a few things. Starting from the baseline (http://svn.igniterealtime.org/svn/repos/spark/trunk), I did a build, just changing the build.xml to allow Ant 1.9. The build goes just fine, just a bunch of deprecation warnings. When I start up the Spark client and log in, I get the following errors (among others) and the Conference tab is blank. Using a pre-compiled binary works just fine with the OpenFire server I set up. This is being compiled on a Windows 7 desktop with Ant 1.9 and JDK 1.7.0_25.

Some background, I was using these instructions http://community.igniterealtime.org/docs/DOC-1360 and got the error after doing all of the modifications, so I went all the way back to a clean copy to slowly make the changes to find where the error was introduced; however, I got the error from the clean copy.

C:\my_dev\ChatTest2\target\build\bin>java -Dappdir=… -cp …/lib/jdom.jar;…/lib/log4j.jar;…/lib/lti-civil.jar;…/

lib/fmj.jar;…/lib/startup.jar;…/lib/windows/jdic.jar;…/resources;…/lib/windo ws; -Djava.library.path="…/lib/windows"

org.jivesoftware.launcher.Startup

org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread

at org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreading Violation(SubstanceCoreUtiliti

es.java:2367)

at org.jvnet.substance.SubstancePanelUI.createUI(SubstancePanelUI.java:57)

at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.reflect.misc.Trampoline.invoke(Unknown Source)

at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.reflect.misc.MethodUtil.invoke(Unknown Source)

at javax.swing.UIDefaults.getUI(Unknown Source)

at javax.swing.UIManager.getUI(Unknown Source)

at javax.swing.JPanel.updateUI(Unknown Source)

at javax.swing.JPanel.(Unknown Source)

at javax.swing.JPanel.(Unknown Source)

at javax.swing.JPanel.(Unknown Source)

at org.jivesoftware.spark.ui.conferences.BookmarksUI.getServicePanel(BookmarksUI.j ava:447)

at org.jivesoftware.spark.ui.conferences.BookmarksUI.loadUI(BookmarksUI.java:114)

at org.jivesoftware.spark.ui.conferences.ConferenceServices$3.run(ConferenceServic es.java:166)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

UIDefaults.getUI() failed: createUI() failed for javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,alignmen

tX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=] java.lang.reflect.InvocationTargetExcept

ion

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 javax.swing.JPanel.updateUI(Unknown Source)

at javax.swing.JPanel.(Unknown Source)

at javax.swing.JPanel.(Unknown Source)

at javax.swing.JPanel.(Unknown Source)

at org.jivesoftware.spark.ui.conferences.BookmarksUI.getServicePanel(BookmarksUI.j ava:447)

at org.jivesoftware.spark.ui.conferences.BookmarksUI.loadUI(BookmarksUI.java:114)

at org.jivesoftware.spark.ui.conferences.ConferenceServices$3.run(ConferenceServic es.java:166)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

org.jvnet.substance.api.UiThreadingViolationException: Component creation must be done on Event Dispatch Thread

at org.jvnet.substance.utils.SubstanceCoreUtilities.testComponentCreationThreading Violation(SubstanceCoreUtiliti

es.java:2367)

at org.jvnet.substance.SubstanceLabelUI.createUI(SubstanceLabelUI.java:63)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.reflect.misc.Trampoline.invoke(Unknown Source)

at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.reflect.misc.MethodUtil.invoke(Unknown Source)

at javax.swing.UIDefaults.getUI(Unknown Source)

at javax.swing.UIManager.getUI(Unknown Source)

at javax.swing.JLabel.updateUI(Unknown Source)

at javax.swing.JLabel.(Unknown Source)

at javax.swing.JLabel.(Unknown Source)

at org.jivesoftware.spark.ui.conferences.BookmarksUI.getServicePanel(BookmarksUI.j ava:451)

at org.jivesoftware.spark.ui.conferences.BookmarksUI.loadUI(BookmarksUI.java:114)

at org.jivesoftware.spark.ui.conferences.ConferenceServices$3.run(ConferenceServic es.java:166)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

After doing some further testing, what I have found is that it has to do with the SubstanceBusinessBlackSteel and SubstanceBusinessBlueSteel appearance schemes. I have not tested the other Substance schemes. Switching it back, gets me the error ClassNotFoundException LunaLookAndFeel.

There is a lengthly discussion about Substance. It’s pretty buggy and the dev team tha worked on 2.6.y went to jTattoo instead. Jason was proposing fixes for Substance, but I am not aware of dates when this should be in the trunk. Personally, I would remove Substance from Spark and advise to use only jTattoo skins.