I am using the latest version of Emma i.e. 2.0.5312 and Java 7.
If I run the following command to get the coverage.ec on the fly, I get an error.
java emma ctl -connect localhost:47653 -command coverage.get,coverage.ec
*Exception in thread "main" java.lang.IllegalArgumentException: unknown command:
[ctl]
at com.vladium.emma.Command.create(Command.java:51)
at emma.main(emma.java:39)*
This error is usually seen if an older version of Emma is used but I believe build 5312 is the latest build of Emma. Also, this error is not seen in Java 6.
Has someone come across this issue and been able to resolve it? Any pointers will be very much appreciated.
The latest and last version of Emma is 2.1.5320. I downloaded this version and was able to overcome the above mentioned error.
Related
folks!
I have 2 separate servers on Linux for Jenkins and Sonarqube. The code is written in Java 1.8 and can be compiled using Jenkins. Everything works fine.
It fails at the SonarQube step because our SonarQube uses Java 11, and it fails with this error.
ERROR: Error during SonarScanner execution java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
How can I fix this?
You have to run the sonar scanner with at least Java 11, no matter what version of Java your application supports.
Two years ago I had a similar issue. I don't know if your app and sonarqube should run on the same machine (as it was in my case).
If yes, just install both versions of java and set the path of Java 11 to SonarQube settings.
According to sonarqube community, you should do the following:
Edit conf\wrapper.conf, specifically the wrapper.java.command to following:
wrapper.java.command=C:\Program Files\Java\open jdk-11.0.2\bin\java
#wrapper.java.command=java
I tried to use cmd prompt to execute my java file but I got this error that says
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: MovingObject has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0
but when I tried executing my java file on eclipse it works perfectly fine, its just that I want to try and run it to the command prompt to see if both ways works. Tried searching about the problem but most of the other problems is way back from long ago.
The problem was that my computer was confused as to what JRE to use. I have manually installed JDK and JRE 8 before.
So when I tried checking it through cmd.
javac -version is Java 16
while, java -version is Java 8
So, I uninstalled my Java 8 since I have installed JDK 16 and JRE version 16 on my eclipse which confuses my computer as to what version to use. That's pretty much it.
I was trying to compile and run a java file using command prompt, first used "javac main.java" then ran the class file with "java main"
Upon running the class file, I'm hit with an error:
"Error: A JNI error has occurred, please check your installation and
try again Exception in thread "main"
java.lang.UnsupportedClassVersionError: main has been compiled by a
more recent version of the Java Runtime (class file version 61.0),
this version of the Java Runtime only recognizes class file versions
up to 52.0"
I then found this possible solution, and updated my User Variables "Path" to jdk17.0.1\bin, and my System Variables "Path" to jre1.8.0_311\bin. I was a bit confused on which Path I was to updated/change so I just updated both...? Not sure if this was the correct thing to do.
In addition, both java -version and javac -version output the latest version "17.0.1" and "jre1.8.0_311".
java -version and javac -version :
Error Message :
What confuses me is that running code in eclipse works fine, so I'm not quite sure that it's an issue with Path so I'm not sure what the issue is.
We are using sonar 4.5.1 and sonar-pmd-plugin is 2.3. From last few days , I am facing issue of "too many open files " Fail to execute PMD. Following file is ignored. I found that issue is fixed in 2.4 but we cannot upgrade the plugin as it would also need upgrade to Sonar 4.5.2 version. Is there any fix or workaround for the issue ? Kindly help. We use Jenkins 1.580, Sonar 4.5.1,Maven 3.0.4.
I have upgraded my Grails project from version 2.1.2 to 2.2.3. Before the upgrade, the project worked flawlessly. However, I am not able to run the project now. I get a strange error :
| Compiling 143 source files.....
| Error Error generating web.xml file (Use --stacktrace to see the full trace)
and the compilation stops.
I thought that the "--stacktrace" option would provide some useful information. However, I am not able to decipher the error.
Error here > http://pastebin.com/zwR4YzXS
Googling / searching this problem did not help. I hope I am not the only one, who is getting this error.
Thank you for your advices !
Some useful info :
Grails 2.2.3
Java version :
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.10.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
OS: Ubuntu 12.04 x64
Faced the same issue while working with grails 2.3.2. Actually, I added and then removed clojure plugin. Right after got such problem.
$ grails clean just worked for me.
Same problem i was facing i used the below command :
grails clean
grails refresh-dependencies
and that worked for me
If you are using Intellij the problem is that:
the reason for this is that IDEA adds classpath by default on creating integration test run configuration. So if you run tests you might cause that error
Open Run → Edit Configurations... (or press Alt-Shift-F10)
Select your configuration that fails
Uncheck Add --classpath checkbox
You are done! Run.