Spring roo - jetty fails to start - java

I have Spring-Roo geerated project, that fails to start in jetty via mvn jetty:run
Caused by: java.lang.UnsupportedClassVersionError: com/roo124/domain/Company : Unsupported major.minor version 51.0
What does Unsupported major.minor version mean? And where can I see that 51.0 value?

it means that the classes, you are trying to run, were compiled with a newer version of java than the one you are currently using.
Please check the output of mvn --version and make sure you are using a current JVM.
For more information about the class file version, please check here: https://stackoverflow.com/a/11432195/435583

Related

java.lang.unsupportedclassversionerror akka/actor/Actor: unsupported major.minor version 52.0

I have a Java/Scala/Akka project that I am building in Jenkins. For it, I am getting this error:
java.lang.unsupportedclassversionerror akka/actor/Actor: unsupported major.minor version 52.0
I looked up the error and for instance here How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version, the cause is that an older version of Java is used instead of Java 8.
So I added to the Jenkins configure JAVA_HOME=/my/path/to/jdk/1.8/exec.
However, the error persists. So what could be the cause?
Please add JDK 8 in the Jenkins configuration and set the configured JDK in a job configuration. Nothing hard there.

Maven-install Unsupported Class Version Error

I have cloned a Maven repository which I wish to use and build on my machine. I used to be able to build this particular project, but now when I choose maven install, it gives me this error
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
Which is really strange. I know that this maven project uses java 6, and it shows so in the pom.xml, but my machine already has java 6 installed. In fact, the project says it's using it. What's going on?
Although your project uses Java 6, Maven version 3.3.3 (latest at this time) needs Java 7.
Either use Maven 3.2.5 (that uses Java 6) or install Java 7.
Reference:
https://maven.apache.org/docs/history.html

java.lang.UnsupportedClassVersionError: scala/collection/Seq : Unsupported major.minor version 52.0

I have two applications one is written in Java and the other is written in Scala.
The java application is using the Scala application as a library. When I build the java application against JDK 1.8 every thing works fine.
When I build the application against JDK 1.7, the application throw the following exception.
java.lang.UnsupportedClassVersionError: scala/collection/Seq :
Unsupported major.minor version 52.0
It seems that the Scala application is only compatible with JDK 1.8.
I tried to change the project compiler settings in the Scala project and set the target JVM into version 1.7 but nothing changed.
Any suggestions to have the application run against JDK 1.7 ?

EvoSuite java support for Java 7?

Which versions of Java are supported by EvoSuite?
I am running a maven build, following the instructions on the EvoSuite maven plugin page.
However, the build fails with the following message:
Failed to execute goal org.evosuite.plugins:evosuite-maven-
plugin:0.1.1:generate (default-cli) on project simple: Execution default-cli of
goal org.evosuite.plugins:evosuite-maven-plugin:0.1.1:generate failed: Unable
to load the mojo 'generate' in the plugin 'org.evosuite.plugins:evosuite-maven-
plugin:0.1.1' due to an API incompatibility:
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
org/evosuite/maven/GenerateMojo : Unsupported major.minor version 51.0
EvoSuite does support Java 7. The error message that you get seems like the Maven process you used is not using Java 7. You need to be sure that "mvn" is using the right Java version. Use mvn -version to check which one you are using.
See related post: java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0 (unable to load class frontend.listener.StartupListener)
NO,at least JAVA8.You can go to the website of Evosuite to learn more.

Unsupported major.minor version 51.0 error after moving from IntelliJ IDEA JBoss to MyEclipse Tomcat

I am getting a Unsupported major.minor version 51.0 error after moving from IntelliJ IDEA JBoss to MyEclipse Tomcat.
Everything was working great under IntelliJ IDEA and JBoss and now we are moving to MyEclipse and Tomcat 6..
I am getting:
Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141
can someone please tell me how to fix this issue
This happens when you compile the code in a higher version of the JDK than you are using at runtime.
You can set the compiler version here:
Project -> Properties -> Java Compiler
It seems that the version of JRE under tomcat is newer than the one used to compile the code.
To fix the actual problem you should try to either update your JRE pointing in Tomcat with newer version Java JRE or specify target parameter to the Java compiler to instruct the compiler to create code compatible with earlier Java versions in Eclipse.
If you did all kind of thing and it didn't work,
maybe you need to delete target in your project,
because I found if I builded them again and it would be very fast to compelete, then I relized I used old result of complier.
enter image description here

Categories

Resources