whenever i choose POS tagger in my .net code. it shows me unsupported major.minor error.. why? - netbeans

The complete error is something like:
Exception in thread "main" java.lang.UnsupportedClassVersionError:edu/stanford/nlp/tagger/maxent/MaxentTagger: Unsupported major.minor version 52.0`

There are two ways to solve it, Easiest way is to download and update latest version of JRE in the system which is running java code.

Related

Security Exception While Running TestNG test in Eclipse

Getting the below error while trying to run the TestNG test in Eclipse Neon . Seems like there is some sort signed content in jar dependency which is blocking this . have no idea what its though ..Any suggestions on how to fix this . Have never faced this before .
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:273)
at java.util.jar.JarVerifier.update(JarVerifier.java:228)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
at java.util.jar.JarFile.getInputStream(JarFile.java:450)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:162)
at java.net.URL.openStream(URL.java:1045)
at org.testng.remote.RemoteTestNG.getTestNGVersion(RemoteTestNG.java:84)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:39)
[ServiceLoaderHelper] More than one working implementation for 'null', we will use the first one
Exception in thread "main" java.lang.NoSuchMethodError: org.testng.internal.Utils.defaultIfStringEmpty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
at org.testng.remote.AbstractRemoteTestNG.setHost(AbstractRemoteTestNG.java:59)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:122)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)
oh, I sort of got your problem, looks like you're using an pretty old version of testng (probably the 5.x), since TestNG eclipse plugin 6.9.12.201607091356, TestNG versions below 6.5.1 are not supported: https://github.com/cbeust/testng-eclipse/blob/master/CHANGES.md#6910
So please upgrade your testng version.
Edit: since TestNG Eclipse Plugin 6.9.13.201609291640, the whole TestNG 6.x series are supported (including 6.0 to 6.5.1), while the TestNG 5.x still not be supported.

Play Framework InjectedRoutesGenerator Error

I have created new Play + Scala project using latest typesafe activator and when trying to import in IntelliJ IDE I was getting below error,
info] Loading project definition from E:\Personal\Scala Workspace\DeployZip\project
E:\Personal\Scala Workspace\DeployZip\build.sbt:18: error: not found: value routesGenerator
routesGenerator := InjectedRoutesGenerator
^
[error] Type error in expression
Consult IDE log for more details (Help | Show Log)
What are the possible reasons for this error?
I have installed jdk 1.8 and now I am able to create project successfully without any error.
But when I tried to run play application using
activator run
I was getting below error now,
java.lang.UnsupportedClassVersionError: org/webjars/WebJarExtractor$Cache : Unsupported major.minor version 51.0
According to this article, I think Unsupported major.minor version 51.0 means that your play application were compiled with Java 1.7 (version 51), but you have Java 1.8 (version 52) installed instead, so you got this error. I'd suggest that you refer to this article for how you could switch between different Java versions.
I was having the error that said Unsupported major.minor version 52.0, and after I installed the latest one (Java 1.8) it was solved.
Hope this helps.
Here is what I've done to solve the issue. Even if you install the java 1.8 it is not sufficient. You have to update the 'path' and 'JAVA_HOME'.
After you install, try to set the jdk1.8 path in the PATH of the environment variables. Also make sure that if you have other versions of the java in the PATH then put the jdk 1.8 path prior to the previous version of java. Or just in case put it in the very beginning of the paths.
I had this same issue. Everything worked after I upgraded Intellij to the latest version (maybe my outdated version used JDK1.7, while activator used 1.8?).

Start service from prunsrv and jdk8

I have simple jar which includes the class MainClass with static start and stop methods. When I use JDK6 and Prunsrv my service starts and stops successfully. When I switch to JDK I get this error when I start the service:
java.lang.UnsupportedClassVersionError: org/serv/MainClass : Unsupported major.minor version 52.0
How can I resolve this problem?
I've encountered this before.
It's usually due to the Java classes being compiled for one Java version (i.e. JSE 8) but they are ran with another (i.e. JSE 6).
Check your paths and make sure the appropriate version of the JVM is running the code.
See also:
Unsupported major.minor version 52.0
Java Unsupported major.minor version 52.0 error Minecraft

Getting IncompatibleClassChangeError while running shark-0.9.0 with hadoop 2.2.0

I am getting the following error while running shark 0.9.0.
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class scala.collection.mutable.ArrayOps, but interface was expected
at shark.SharkCliDriver$.main(SharkCliDriver.scala:82)
at shark.SharkCliDriver.main(SharkCliDriver.scala)
Any solution regarding the problem is highly appreciable.
Its a backward compatibility issue.
This exception is raised when the version of scala-library.jar is different during compilation and execution. Make sure that you use the same library version during compiling and executing.
if you are using hadoop 2.x version, do the below steps
find path to shark installation folder -name hadoop-core-1.0.4.jar
remove all the hadoop-core-1.0.4.jar
check this
http://bigdataanalyze.blogspot.com/2014/03/issues-on-shark-with-cdh5-beta2-1.html

facing issue with GWT designer mode

I'm working with Eclipse Helios 3.6 (32-bit). I installed the GWT plug-in and created a new Web application. In the Client folder I was trying to open a file with GWT designer, but unfortunately I was getting an error:
Internal Error encountered unexpected internal error. This could be caused by a bug or by a misconfiguration issue, conflict, partial update, etc.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
Stack trace:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.loadImpl
(HostedModeSupport.java:110)
at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.<init>
(HostedModeSupport.java:83)
at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupportFactory.create
(HostedModeSupportFactory.java:32)
at com.google.gdt.eclipse.designer.model.widgets.support.GwtState.getHostedModeSupport
(GwtState... (missing part here)
...org.eclipse.wb.internal.core.editor.errors.ExceptionComposite$3.widgetSelected
(ExceptionComposite.java:129)
--- etc
I have JavaCompiler in project properties 1.6 and from preferences->java->installed JDK/JRE using 1.6.
I am not sure of the specifics but most likely you are trying to run the designer with JDK 1.5. That is the cause of that error. I would recheck everything.
Also off the top of my head I would verify 32 bit versus 64 bit java sdk.
Generally when anything is wrong in JavaCompiler Project properties it will throw error of major/minor version 51.0 . So here most probably by checking the java version installed in the system and the version through which you are working are differnet. Make both of them compatible and the error will be solved.