Page 1 of 1

Cannot get Serviio to run on Ubuntu 12.04 LTS

PostPosted: Wed Jul 18, 2012 9:26 pm
by paul_za
I went through the "how to" sections and did as instructed. Everything seemed fine - yet when I do "initctl list" I get "serviio stop/waiting". When I the do "sudo start serviio" it starts with a process number, but the initctl still shows stop/waiting.

I then went to the install directory and did "./serviio.sh" and got the following:
media@MEDIA-SERVER:~/Serviio$ ./serviio.sh
Exception in thread "main" java.lang.NoClassDefFoundError: org/serviio/MediaServer
Caused by: java.lang.ClassNotFoundException: org.serviio.MediaServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.serviio.MediaServer. Program will exit.

Please can someone help this Noob? :-)

Re: Cannot get Serviio to run on Ubuntu 12.04 LTS

PostPosted: Thu Jul 19, 2012 5:24 pm
by zip
what is your java version?

Re: Cannot get Serviio to run on Ubuntu 12.04 LTS

PostPosted: Thu Jul 19, 2012 6:27 pm
by paul_za
I just did "sudo apt-get install default-jre"

Should I install the full Java 7?

Re: Cannot get Serviio to run on Ubuntu 12.04 LTS

PostPosted: Thu Jul 19, 2012 7:18 pm
by paul_za
I installed the full Java 7 from Sun.
media@MEDIA-SERVER:~/Serviio$ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)
media@MEDIA-SERVER:~/Serviio$ ./serviio.sh
Error: Could not find or load main class org.serviio.MediaServer
media@MEDIA-SERVER:~/Serviio$

Re: Cannot get Serviio to run on Ubuntu 12.04 LTS

PostPosted: Fri Jul 20, 2012 1:03 pm
by zip
is the lib folder readable by the user?

Re: Cannot get Serviio to run on Ubuntu 12.04 LTS

PostPosted: Fri Jul 20, 2012 4:13 pm
by paul_za
The lib folder: drwxr-xr-x 21 root root 4096 May 10 19:36 lib

Re: Cannot get Serviio to run on Ubuntu 12.04 LTS

PostPosted: Fri Jul 20, 2012 5:47 pm
by zip
and serviio.jar inside that folder?

If it's ok then it should work, unless there's something wrong with the Java on your OS. In that case you'd have to change this in serviio.sh:

  Code:
SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config"


to

  Code:
SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/serviio.jar:$SERVIIO_HOME/lib/<another_jar_from_lib_folder>.jar:<all_the_other_jars>:$SERVIIO_HOME/config"


(Note instead of the wildcard /lib/* you'll have to list all jar files in the lib folder, separated by colon