Could not initialize class sun.awt.X11GraphicsEnvironment

Need help? Post your questions here.

Moderator: moderators

Could not initialize class sun.awt.X11GraphicsEnvironment

Postby Pathduck » Tue Apr 20, 2010 8:40 pm

When starting Subsonic I get a lot of constant exceptions in the log like this:

[2010-04-20 22:29:25,321] WARN CoverArtController - Failed to create thumbnail for /mnt/dlink-mp3/.Elektronic/Neon Neon - Stainless Style[2008]/folder.jpg
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)


Also there very few thumbs being generated in Subsonic.

I think I did a recent java update so could it be caused by this? Running Debian squeeze/sid:
Linux debian 2.6.32-3-amd64 #1 SMP Wed Feb 24 18:07:42 UTC 2010 x86_64 GNU/Linux

java version "1.6.0_0"
OpenJDK Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)

To fix it I had to edit subsonic.sh and add: -Djava.awt.headless=true in the Java call. The server is obviously headless, but I never had to explicitly set it before to make the thumbnails generate. This should be unnecessary right?

Any ideas? I mean, I've fixed it for myself but it will break with the next update again if I have to manually edit the sh script :(

-P
Pathduck
 
Posts: 27
Joined: Wed Mar 18, 2009 10:14 pm

worked for me

Postby mr_stupid » Thu Jun 24, 2010 11:43 pm

I had the same problem. Did what Pathduck recommended and all is well.

In file /usr/share/subsonic/subsonic.sh "add: -Djava.awt.headless=true in the Java call". Looks something like this:

--------------------
${JAVA} -Xmx${SUBSONIC_MAX_MEMORY}m \
-Dsubsonic.home=${SUBSONIC_HOME} \
-Dsubsonic.host=${SUBSONIC_HOST} \
-Dsubsonic.port=${SUBSONIC_PORT} \
-Dsubsonic.contextPath=${SUBSONIC_CONTEXT_PATH} \
-Dsubsonic.defaultMusicFolder=${SUBSONIC_DEFAULT_MUSIC_FOLDER} \
-Dsubsonic.defaultPodcastFolder=${SUBSONIC_DEFAULT_PODCAST_FOLDER} \
-Dsubsonic.defaultPlaylistFolder=${SUBSONIC_DEFAULT_PLAYLIST_FOLDER} \
-Djava.awt.headless=true \
-jar subsonic-booter-jar-with-dependencies.jar > ${LOG} 2>&1 &
----------------------------------------

Tks Pathduck :D, and
Tks Sindre. :D
mr_stupid
 
Posts: 2
Joined: Fri Jun 18, 2010 8:24 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests