Eclipse Mars JNI Error - eclipse

Hi I am working on weka api in Eclipse Mars. Everything was fine until i wrote a class for LinearRegression, just then Eclipse started giving JNI error. Now other classes runs fine but when i try to run LinearRegression class the error pops up.
The first error is Error: A JNI error has occurred, please check you installation and try again followed by JVM launcher error "A java exception has occurred". And then a list of errors
Exception in thread "main" java.lang.NoClassDefFoundError: no/uib/cipr/matrix/Matrix
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: no.uib.cipr.matrix.Matrix
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
I will appreciate if someone could help me with this problem. Thanks.

Related

Unable to run junits in eclipse for jhipster sample app gradle

I checked out https://github.com/jhipster/jhipster-sample-app-gradle imported the project into eclipse Version: 2020-03 (4.15.0), installed gradle plugin. When I try to run the Junit test Right click -> Run as Junit I keep getting
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/junit/platform/engine/EngineDiscoveryListener
at org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.getLauncherDiscoveryListener(LauncherDiscoveryRequestBuilder.java:241)
at org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.build(LauncherDiscoveryRequestBuilder.java:235)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createUnfilteredTest(JUnit5TestLoader.java:75)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createTest(JUnit5TestLoader.java:66)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(JUnit5TestLoader.java:53)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.NoClassDefFoundError: org/junit/platform/engine/EngineDiscoveryListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 9 more
Caused by: java.lang.ClassNotFoundException: org.junit.platform.engine.EngineDiscoveryListener
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 21 more
I tried searching all over but couldn't find a solution that works, Anybody had the same issue and got it resoled please provide the solution
enthusiast,
Just add
testImplementation('org.junit.platform:junit-platform-launcher:1.5.2')
to the dependencies section in build.gradle file, refresh gradle (on eclipse, on the context menu of the project > Gradle > Refresh Gradle Project). You should be able to run tests one by one.
Happy coding

Chrome is failing to launch with Selenium 2.53.0 and Chrome driver 2.25

While I am trying to verify any test cases on chrome, it fails. The Chrome is launching but after that it is showing out of memory. As per chrome help page, I disabled all the chrome extensions and closed all the table also. Still facing the same problem. The test cases are going fine on firefox and IE Please check screen shot
Getting following exception from selenium: when using selenium 2.53.1
Starting ChromeDriver 2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed) on port 15091
Only local connections are allowed.
[2.164][SEVERE]: Unable to receive message from renderer
Code:
System.setProperty("webdriver.chrome.driver","C:\\TestWorkspace\\Resources\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.get("https://www.google.co.in/");
driver.manage().window().maximize();
Thread.sleep(500);
driver.quit();
When I am trying with updated selenium version 3.0.1 getting following error:In this case chrome not even opening itself
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/openqa/selenium/WebDriver : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

mapreduce wordcount program in horton sandbox 2.1

I am trying to execute mapreduce wordcount program in horton which works sandbox 2.1.
I got the following Error
Exception in thread "main"
java.lang.UnsupportedClassVersionErrorUnsupported major.minor version
52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
atjava.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:423)
at java.lang.ClassLoader.loadClenter code hereass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
and in eclipse i got this eroor at the time of compling..
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/logging/LogFactory at
org.apache.hadoop.conf.Configuration.(Configuration.java:169)
at first.WordCount.main(WordCount.java:51) Caused by:
java.lang.ClassNotFoundException:
org.apache.commons.logging.LogFactory at
java.net.URLClassLoader.findClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) at
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at
java.lang.ClassLoader.loadClass(Unknown Source) ... 2 more ..
A detailed answer for my approach is highly appreciated.
You error suggest that you're using a lower JVM version than the one the application was build. Try upgrading your java version

IBM HeapAnalyzer wont open

I downloaded IBM Support Assistance Workbench, Installed HeapAnalyzer 4.5.4. When I try and start the HeapAnalyzer tool I get this error:
Cannot Launch HeapAnalyzer - Could not find the main class: com.ibm.jinwoo.heap.HeapAnalyzer
Today 8:22 AM | Tags: heapanalyzer, installation, run
Unanswered question This question has not been answered yet.
I cannot seem to launch HeapAnalyzer
C:\Software\IBMHeapAnalyzer>java -Xmx1g -jar ha454.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/ibm/jinwoo/heap/HeapAnalyzer : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.ibm.jinwoo.heap.HeapAnalyzer. Program will exit.
Has anyone else experienced this and know how to fix it?
type java --version does the version agree with 51.0
refer to stackoverflow.com/questions/10382929/…
you may need to install the latest jdk, or you can export the JAVA_HOME for the IBM JDK and add $JAVA_HOME/bin to your path

Error with ClassEnhancer "ASM"

I need some help! I have re-installed Eclipse and the latest GWT SDK 2.5.1/App Engine SDK 1.8.4 and my previously working app is not working any more. I cannot find the way out.
As far as I could figure out it has something to do with the maven dependency. Can I remove it? How?
I believe it is simple. Please help!
Here is the log:
sep 10, 2013 9:40:01 PM org.datanucleus.enhancer.DataNucleusEnhancer addMessage
SEVERE: An error occured for ClassEnhancer "ASM" when trying to call the method "org.datanucleus.enhancer.asm.ASMClassEnhancer" on class "getClassNameForFileName" : class org.datanucleus.enhancer.asm.ASMClassEnhancer$MyClassVisitor has interface org.objectweb.asm.ClassVisitor as super class
java.lang.IncompatibleClassChangeError: class org.datanucleus.enhancer.asm.ASMClassEnhancer$MyClassVisitor has interface org.objectweb.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.google.appengine.tools.enhancer.EnhancerLoader.loadClass(EnhancerLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.datanucleus.enhancer.asm.ASMClassEnhancer.getClassNameForFileName(ASMClassEnhancer.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.datanucleus.enhancer.DataNucleusEnhancer.getClassNameForFilename(DataNucleusEnhancer.java:920)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:736)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:545)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1252)
I have found the solution: in the build path I had included libraries I did not really need anymore. After cleaning of the project the app was working as expected.
PS: thank you Chris for your help!
You can try changing the 'Persistence' of GAE from JPA2 to JPA1. It worked for me.