Page 1 of 1

[Solved] Ubuntu 12.04 - Unsupported major.minor version 52.0

PostPosted: Sat Jan 17, 2015 7:04 pm
by fridsten
Hi,

I've been running Serviio on my Windows 7 computer for quite some time, and it has never been any problems with it.
Recently I upgraded my Ubuntu machine that I'm running as a home server and installed a 4TB disc. The thought was to put all my media on it and, of course, run Serviio.

I followed the installation guide in the wiki, but when I try to run serviio-console.sh I get an error message:
  Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/serviio/console/ServiioConsole : Unsupported major.minor version 52.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.serviio.console.ServiioConsole. Program will exit.


I get a similar error message when I try to run serviio.sh:
  Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/serviio/MediaServer : Unsupported major.minor version 52.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.serviio.MediaServer. Program will exit.


I've come to the conclusion that it has to do with the installed Java version and how Serviio was compiled, but Google gives me no answer on how to solve it.

Do you guys have any idea?

Best regards,
Fredrik

Re: Ubuntu 12.04 - Unsupported major.minor version 52.0

PostPosted: Sat Jan 17, 2015 8:16 pm
by will
Serviio 1.5 requires Java 8, what version of Java do you have installed?

e.g.
  Code:
java -version

Re: Ubuntu 12.04 - Unsupported major.minor version 52.0

PostPosted: Sat Jan 17, 2015 9:16 pm
by fridsten
will wrote:Serviio 1.5 requires Java 8, what version of Java do you have installed?

e.g.
  Code:
java -version


Currently Java 7, since I removed a lot of stuff when it didn't work.. I tried installing Oracle Java 8, and I didn't get the same error, but there was some kind of nullpointerexception that made it crash anyway...

Re: Ubuntu 12.04 - Unsupported major.minor version 52.0

PostPosted: Sat Jan 17, 2015 9:20 pm
by will
fridsten wrote:Currently Java 7, since I removed a lot of stuff when it didn't work.. I tried installing Oracle Java 8, and I didn't get the same error, but there was some kind of nullpointerexception that made it crash anyway...


Can you go back to Java 8 and post the exception that you get?

Re: Ubuntu 12.04 - Unsupported major.minor version 52.0

PostPosted: Sun Jan 18, 2015 9:52 am
by fridsten
will wrote:
fridsten wrote:Currently Java 7, since I removed a lot of stuff when it didn't work.. I tried installing Oracle Java 8, and I didn't get the same error, but there was some kind of nullpointerexception that made it crash anyway...


Can you go back to Java 8 and post the exception that you get?

I'm afraid I can not. Because all of a sudden it's working! :D

Re: [Solved] Ubuntu 12.04 - Unsupported major.minor version

PostPosted: Wed Feb 04, 2015 9:09 am
by ehrepli
Having the same issue with 1.5

java -version
  Code:
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~trusty1)
OpenJDK Client VM (build 24.75-b04, mixed mode, sharing)

Re: [Solved] Ubuntu 12.04 - Unsupported major.minor version

PostPosted: Wed Feb 04, 2015 9:43 am
by ehrepli
And solved by installing java 8, although i had to install Oracle's, didn't feel like compiling Openjdk and there are no packages available apparently. Maybe I'll do soon.
Thanks

Re: [Solved] Ubuntu 12.04 - Unsupported major.minor version

PostPosted: Sun Feb 22, 2015 9:53 pm
by tho6389
I have the exact same problem and I am on ubuntu 14.04.1 with java version 8, how can I fix that?

java -version
  Code:
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)