Errors running on linux

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Errors running on linux

russell
Hello all,

I am recently having errors running our broker on our linux cluster and wondering if I could get some help. I am able to compile fine, `mvn clean compile`, but at execution, `mvn exec:exec` I get the following errors:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/powertac/samplebroker/core/BrokerMain : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.758 s
[INFO] Finished at: 2016-11-17T12:58:20-07:00
[INFO] Final Memory: 26M/1932M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default-cli) on project spot-broker: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

We have recently converted to the 1.4 line and neither that or the older 1.3.2 lines work.

The servers are set to run with the following:
$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T09:41:47-07:00)
Maven home: /home/rfolk/research_dependencies/apache-maven-3.3.9
Java version: 1.8.0_102, vendor: Oracle Corporation
Java home: /home/rfolk/research_dependencies/jdk1.8.0_102/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.11.2.el6.x86_64", arch: "amd64", family: "unix"

Thank you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errors running on linux

russell
As a follow up, this is also an issue if I package on a good machine that it already runs on and try to run the jar on these servers.

version 1.3 gives this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/powertac/samplebroker/core/BrokerMain : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

version 1.4 gives this error:
no main manifest attribute, in spot-broker.jar

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errors running on linux

grampajohn
Administrator
In reply to this post by russell
Hello, Russell -
russell wrote
I am recently having errors running our broker on our linux cluster and wondering if I could get some help. I am able to compile fine, `mvn clean compile`, but at execution, `mvn exec:exec` I get the following errors:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/powertac/samplebroker/core/BrokerMain : Unsupported major.minor version 52.0
...

We have recently converted to the 1.4 line and neither that or the older 1.3.2 lines work.

The servers are set to run with the following:
$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T09:41:47-07:00)
Maven home: /home/rfolk/research_dependencies/apache-maven-3.3.9
Java version: 1.8.0_102, vendor: Oracle Corporation
Java home: /home/rfolk/research_dependencies/jdk1.8.0_102/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.11.2.el6.x86_64", arch: "amd64", family: "unix"
Everything I can see here looks OK. Here's what I get:
jcollins@hazel:~/development/powertac/powertac-server$ mvn -v
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_101, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-45-generic", arch: "amd64", family: "unix"

Your linux version looks a lot older, but that should not be an issue. The deployed code (downloaded by maven on demand) was all compiled on my machine.

My guess is that you have a problem in your pom.xml. The major.minor version info is for Java 1.8. I suppose it's possible you are specifying compatibility with an older Java version in your pom.xml or possibly in your login environment. There's some discussion of this error on stackoverflow. I suggest you try building/running the current sample-broker and see if the behavior changes. If not, then look carefully at your login env.

Hope this helps.

John

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errors running on linux

russell
In reply to this post by russell
If I go back to a much older version of our broker (on the 1.2 line), things work fine.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errors running on linux

grampajohn
Administrator
russell wrote
If I go back to a much older version of our broker (on the 1.2 line), things work fine.
That suggests that you somehow have the java runtime on that machine set up to emulate an older version, because we switched to Java 1.8 with the 1.3 line.

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errors running on linux

gbuijs
Also check if the versions of the compiler and runtime are the same.

Compare
javac -version
to
java -version
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Errors running on linux

russell
Thanks all, forgot to report back that in certain scenarios the java version being used was the servers (1.7) instead of mine (1.8) which was causing the issues.
Loading...