-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not initialize class sun.awt.X11.XToolkit #86
Comments
Hi Bo, Is that the complete stack trace? As there are no references to our code, just standard Java classes. The X11 error occurs when a GUI class is used in a headless environment. Which is usually easy to fix on our side, if we know which class to change. So I'm hoping that your error message is longer..? Best regards, |
Hi Harald, |
Hi Bo, Seems like you tried to add the complete error message as an attachment to the e-mail..? But I'm afraid that does not work. You have to upload the file via the issue tracker for it to appear. Best regards, |
Hi Harald, Path configuration completed. Exception in thread "SwingWorker-pool-1-thread-2" Exception in thread "SwingWorker-pool-1-thread-1" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit Best regards! |
Hi Bo, Isn't that identical to the first error message above? There's really nothing more..? Best regards, |
Hi Bo, Ok, we'll try to reproduce it on our end and get back to you. Best regards, |
Hi Bo, I had a closer look at your error but I still don't understand why Xlib should be required as we don't use any GUI components in this part of the code. I also still find it very strange that there are no references to our own code, but only to general Java classes. The only suggestion I came across was to add "-Djava.awt.headless=true" to your command line. Maybe you can check if that helps? I will try to do some testing in a headless Linux environment later this week, but if you come across any fixes on your side please let us know. Best regards, |
Hi Harald, |
|
What is it you are trying to do? I assume you are trying to run SearchGUI? But via the command line or via the graphical user interface? If running the graphical user interface please ensure that you have a X11 compatible system. Which operating system are you using? BTW, in the future please create a new issue instead of adding to an older issue that has already been closed. As otherwise it becomes very hard for us to keep track of the currently open issues. Best regards, |
Hello, I have the same issue here but don't see where I should add this part in the command line: Thannks a lot, Ben |
Hi Ben, Can you share the command line you are trying to run? Best regards, |
Hi Harald, Here is one of the thing I tried:
But then I receive an error saying that it's not right. Thanks a lot, |
Hi Ben, If you move "-Djava.awt.headless=true" until before the "-cp" option I think it should work. That should make it into an option for the Java virtual machine and not an option for SearchGUI. Best regards, |
Yeah. That worked just fine! |
Hi,
Does anyone know how to solve the following problem?
The command line:
/home/test/software/jdk1.8.0_60/jre/bin/java -cp /home/test/software/SearchGUI-2.6.3/SearchGUI-2.6.3.jar eu.isas.searchgui.cmd.SearchCLI -spectrum_files test.mgf -id_params search.par -output_folder ./ -xtandem "1" -myrimatch "1" -ms_amanda 0 -msgf 0 -omssa 0 -comet 0 -tide 0 -andromeda 0 -temp_folder tmp
The OS information:
CentOS release 5.5 (Final)
The error message:
Path configuration completed.
Sun Feb 07 23:07:14 CST 2016 Validating MGF file: /home/test/mgf/test.mgf
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Exception in thread "SwingWorker-pool-1-thread-2" Exception in thread "SwingWorker-pool-1-thread-1" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
at java.awt.EventQueue.isDispatchThread(EventQueue.java:1041)
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1361)
at javax.swing.SwingWorker.doneEDT(SwingWorker.java:740)
at javax.swing.SwingWorker.access$100(SwingWorker.java:225)
at javax.swing.SwingWorker$2.done(SwingWorker.java:302)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:384)
at java.util.concurrent.FutureTask.setException(FutureTask.java:251)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
at java.awt.EventQueue.isDispatchThread(EventQueue.java:1041)
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1361)
at javax.swing.SwingWorker.doneEDT(SwingWorker.java:740)
at javax.swing.SwingWorker.access$100(SwingWorker.java:225)
at javax.swing.SwingWorker$2.done(SwingWorker.java:302)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:384)
at java.util.concurrent.FutureTask.setException(FutureTask.java:251)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Best regards!
Bo
The text was updated successfully, but these errors were encountered: