Error when running mahout spark-itemsimilarity - ClassNotFoundException: scopt.OptionParser - java

https://mahout.apache.org/users/algorithms/intro-cooccurrence-spark.html
Using this reference, I was trying mahout spark-itemsimilarity but getting an error when running the following command
mahout spark-itemsimilarity --input in-file --output out-dir
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: scopt/OptionParser
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: scopt.OptionParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 19 more
I referred this for installing mahout:
https://github.com/apache/mahout#building-from-source
I followed the guide exactly.
What could be the possible reason for this error? Am I missing anything?

Related

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/beans/factory/ListableBeanFactory

When ever I run spring boot application this will be given. I have no idea what's wrong with the code.If anyone know the solution please comment here.
this is the error message given.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/beans/factory/ListableBeanFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.example.newsRoom.NewsRoomApplication.main(NewsRoomApplication.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.ListableBeanFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more

Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/FormatFeature in Swagger Response Validator

I am working with Atlasssian swagger-request-validator and i got the following error while running the application.
Exception :
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/FormatFeature
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.<clinit>(YAMLFactory.java:29)
at io.swagger.v3.parser.ObjectMapperFactory.createYaml(ObjectMapperFactory.java:24)
at io.swagger.v3.parser.ObjectMapperFactory.createYaml(ObjectMapperFactory.java:20)
at io.swagger.v3.parser.OpenAPIV3Parser.<clinit>(OpenAPIV3Parser.java:36)
at io.swagger.parser.OpenAPIParser.getExtensions(OpenAPIParser.java:49)
at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:18)
at com.atlassian.oai.validator.SwaggerRequestResponseValidator.<init>(SwaggerRequestResponseValidator.java:112)
at com.atlassian.oai.validator.SwaggerRequestResponseValidator.<init>(SwaggerRequestResponseValidator.java:41)
at com.atlassian.oai.validator.SwaggerRequestResponseValidator$Builder.build(SwaggerRequestResponseValidator.java:335)
at Validator.main(Validator.java:47)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.FormatFeature
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 22 more
Why am I getting this error?
I referenced this https://bitbucket.org/atlassian/swagger-request-validator/src/3d42d9c51a59b96f148df6aaa9ade8a0c216f3e4/swagger-request-validator-core/?at=master

NoClassDefFoundError. Runs fine in eclipse, but not from native package

I have a code that runs fine in Eclipse. But when I try to run through native packaging using Gradle, I get this message:
Caused by: java.lang.NoClassDefFoundError: com/embraer/rw4j/output/OutputEditorTags (wrong name: com/embraer/rw4j/view/report/OutputEditorTags)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.embraer.rw4j.output.HeaderEditor.handleAddTagContent(HeaderEditor.java:71)
... 86 more
The strange thing is that I don't have any package com/embraer/rw4j/view/report. I don't know where the JVM is getting this reference.

Hbase-Spark :Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/Logging

I am trying to get data from hbase database (1.2.5) using Spark 2.0.2 with the code in this page :
https://github.com/apache/hbase/blob/master/hbase-spark/src/main/java/org/apache/hadoop/hbase/spark/example/hbasecontext/JavaHBaseBulkGetExample.java
But I get this error :
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/spark/Logging at java.lang.ClassLoader.defineClass1(Native
Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at
java.net.URLClassLoader.access$100(URLClassLoader.java:73) at
java.net.URLClassLoader$1.run(URLClassLoader.java:368) at
java.net.URLClassLoader$1.run(URLClassLoader.java:362) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:361) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357) at
com.cloudera.spark.hbase.JavaHBaseContext.(JavaHBaseContext.scala:23)
at org.hipi.examples.Test.main(Test.java:71) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:736)
at
org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:185)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:210)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:124)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused
by: java.lang.ClassNotFoundException: org.apache.spark.Logging at
java.net.URLClassLoader.findClass(URLClassLoader.java:381) at
java.lang.ClassLoader.loadClass(ClassLoader.java:424) at
java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 22 more
I have seen on the internet that Logging class exist only in spark 1.5.2 and lower versions.
Is there is any solution to make that work even with Spark 2.0.2 ?
There are few BUGs related with this:
https://issues.apache.org/jira/browse/SPARK-13928
https://issues.apache.org/jira/browse/HBASE-16428

Using LWJGL 3 with NetBeans - linking errors

I've downloaded LWJGL 3, added the lwjgl.jar to the library list, and set the VM arguments to
-Djava.library.path="D:/Programming/lwjgl/native/windows"
I tried to run their "Hello World" application from http://www.lwjgl.org/guide, and I get this error:
java.lang.NoClassDefFoundError: org/lwjgl/glfw/GLFWKeyCallback
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
at java.lang.Class.getMethod0(Class.java:3010)
at java.lang.Class.getMethod(Class.java:1776)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.glfw.GLFWKeyCallback
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
I don't understand what I'm doing wrong. It might be because there is no /windows folder in /native, just a few .dlls.

Categories

Resources