java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveServerException - java

i have refer below link to connect hive through spring application.
http://noushinb.blogspot.in/2014/04/spring-hive.html
But got below exception.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/service/HiveServerException
at org.springframework.data.hadoop.hive.HiveTemplate$1.doInHive(HiveTemplate.java:267)
at org.springframework.data.hadoop.hive.HiveTemplate$1.doInHive(HiveTemplate.java:264)
at org.springframework.data.hadoop.hive.HiveTemplate.execute(HiveTemplate.java:83)
at org.springframework.data.hadoop.hive.HiveTemplate.executeScript(HiveTemplate.java:264)
at org.springframework.data.hadoop.hive.HiveTemplate.executeScript(HiveTemplate.java:252)
at org.springframework.data.hadoop.hive.HiveTemplate.query(HiveTemplate.java:142)
at org.springframework.data.hadoop.hive.HiveTemplate.query(HiveTemplate.java:115)
at com.test.hive.repository.TestRepository.showTables(TestRepository.java:17)
at com.test.hive.service.CustomService.showTables(CustomService.java:19)
at com.test.hive.App.main(App.java:30)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.service.HiveServerException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
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)
... 10 more
How to solve this exception.Thanks for giving yours valuable time.

Related

Running the test method throwing error for SoftAssert-java.lang.NoClassDefFoundError: org/testng/asserts/SoftAssert

I have written a test method by importing-import org.testng.asserts.SoftAssert;
Although the compilation is successful while running the test method through Jenkins throwing error as below.
Caused by: java.lang.ClassNotFoundException: org.testng.asserts.SoftAssert
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
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)

Disable org/springframework/core/KotlinDetector

I have a very simple spring boot project to consume from a kafak topic , but when i run i keep getting this error
Exception in thread "main" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationContextInitializer : org.springframework.boot.context.ConfigurationWarningsApplicationContextInitializer
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:423)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:402)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:393)
at org.springframework.boot.SpringApplication.initialize(SpringApplication.java:260)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:236)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
at com.stellapps.test.ota.Test.main(Test.java:11)
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/KotlinDetector
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:188)
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:419)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.springframework.core.KotlinDetector
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
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)
... 9 more
Process finished with exit code 1
why is it even trying to dectect kotlin related file or classes when everything i have is in java , i want to disable this, how can i disable this??

compile code [ApacheactiveMQ] JMS on OSx/Unix like

Hi i've installed the java libreries and ApacheActiveMQ and it works fine, I check the queues and topics on Chrome and the provider is up, but when I try to compile the code using the terminal it doesn't compile. So How can compile this kind of code?
The error is:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/jms/MessageListener
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: javax.jms.MessageListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
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)
... 7 more

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli2/Option

Mr-Protocol:bin blossommendes$ `hadoop jar /Users/blossommendes/Desktop/Project/mahout-mrlegacy-1.0-SNAPSHOT.jar org.apache.mahout.cf.taste.hadoop.similarity.item.ItemSimilarityJob -Dmapred.input.dir=/xd/hdfsImport -Dmapred.output.dir=/xd/hdfsImport/postsResults --s SIMILARITY_LOGLIKELIHOOD --booleanData`
after executing above command i am getting following exception .. i dont why .. please help me to solve this issue
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli2/Option
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.hadoop.util.RunJar.run(RunJar.java:214)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli2.Option
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
You are missing the org.apache.commons.cli2 Jar in your Classpath.

Java3D setup - MacOSx

When trying to run a basic HelloUniverse program, i get the following error.
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at javax.media.j3d.Pipeline$1.run(Pipeline.java:162)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:157)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:965)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
at HelloUniverse.init(HelloUniverse.java:55)
at com.sun.j3d.utils.applet.MainFrame.run(MainFrame.java:267)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException:
javax.media.opengl.GLCapabilitiesChooser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 10 more
I can't seem to find a solution to get Java3D working on mac.

Categories

Resources