When using xstream 1.4.3 on a Mac, it simply locks up a thread.
Note that this affects Macs ONLY. Code is fine on Windows and Linux.
Debugging shows that line 38 in class com.thoughtworks.xstream.core.JVM never exists from the 'loadClass("java.awt.Color")'
Attached is the stack trace.
Further investigation shows that this is a known problem on Macs and that loading class java.awt.Color has nasty side-effects which cause threads to lock up on some cases.
either load a different class, or find a different way to test whether AWT is present.
- is related to
MWAR-295 weird icon on mac due awt toolkit setup
This change also has a side effect (even if you call Toolkit.getDefaultToolkit()) of having the "Java" icon bounce onto the Mac Dock even for applications that have no need or use for anything related to AWT.
I think I detected the change in 1.4.3 that caused the problem and found an alternative. Please test the new SNAPSHOT.
I've revisited the bug fix again and I think it was still not working. New SNAPSHOT deployed again. That one will be released, if I get no other feedback.
Hmm. No solution yet. When I try to load AWTError, it succeeds, but an installation without AWT support will fail later then. Same applies, when I try to load Color without initializing the class :-/
What happens when you call
directly before you initialize XStream?