Page 1 of 1

[SOLVED] Serviio Won't Start After Upgrade to Ubuntu 18.04.1

PostPosted: Mon Sep 03, 2018 5:01 pm
by deus777
I just upgraded my Ubuntu server from 16.04.1 to 18.04.1. After the upgrade, the Serviio console was not responding and the server was not showing up over DLNA. Thanks to other posts, I was able to fix the issue. These are the steps that I followed:

I found this error in the log file (at /opt/serviio/serviio-1.8/log/serviio.log for me):

ERROR [MediaServer] An unexpected error occured. Ending the application. Message: javax.xml.soap.SOAPException
java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
at org.serviio.upnp.webserver.WebServer$RequestListenerThread.<init>(Web Server.java:122)
at org.serviio.upnp.webserver.WebServer.start(WebServer.java:76)
at org.serviio.MediaServer.startServer(MediaServer.java:204)
at org.serviio.MediaServer.main(MediaServer.java:155)
Caused by: java.lang.ClassNotFoundException: javax.xml.soap.SOAPException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinCla ssLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(C lassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)

I found elsewhere that the Java version could be the issue. You can check your Java version with this command:

java -version

Mine listed version 10.0.2. We want version 1.8 for Serviio, so I used this command to install it:

sudo apt-get install openjdk-8-jre

Then we need to set that version as the default version. You can see your installed java versions with this command:

sudo update-java-alternatives --list

Mine listed java-1.11.0 and java-1.8.0. You can set the default Java to 1.8 with this command:

sudo update-java-alternatives --set java-1.8.0-openjdk-amd64

Then I ran the following command to start Serviio:

sudo systemctl start serviio

I hope this is helpful to someone else.

References:
http://wiki.serviio.org/doku.php?id=how ... buntu15-04
viewtopic.php?f=5&t=23067&p=112528&hilit=javax.xml.soap#p112528
https://codeyarns.com/2015/12/01/how-to ... in-ubuntu/

Re: [SOLVED] Serviio Won't Start After Upgrade to Ubuntu 18.

PostPosted: Wed May 22, 2019 8:20 pm
by kairoh
Just change one line in serviio.sh

  Code:
case "$JAVA_VERSION" in
    \1.8*) JAVA9_OPTS="" ;;
    *) JAVA9_OPTS="--add-modules jdk.unsupported" ;;
esac


to

  Code:
case "$JAVA_VERSION" in
    \1.8*) JAVA9_OPTS="" ;;
    *) JAVA9_OPTS="--add-modules java.xml.ws" ;;
esac


This works with java 9 and should work newer version.

Explanation : starting from java 9, JVM was cut in many modules.
Some of them aren't loaded by default, like SOAP webservice (java.xml.ws).
This option force to load this module.