1-844-696-6465 (US)        +91 77600 44484        help@dezyre.com

Error when running Module 4 assignment 1



0
Getting error below when trying to run below:
clo
udera@cloudera-vm:~/nasdaqstockexchange$ hadoop jar nasdaq_1.jar com.dezyre.nasdaq.Nasdaq_1 /nasdaqstockexchange/input/NASDAQ_daily_prices_A.csv /nasdaqstockexchange/output
Exception in thread "main" java.lang.NoSuchMethodException: com.dezyre.nasdaq.Nasdaq_1.main([Ljava.lang.String;)
at java.lang.Class.getMethod(Class.java:1605)
at org.apache.hadoop.util.RunJar.main(RunJar.java:180)

Let me know how we can attach files for you.

4 Answer(s)


0

Hi Neeraja,
Do you have the main method in Nasdaq_1 class ?

Thanks,
Preethi

0

It says "NoSuchMethodException: com.dezyre.nasdaq.Nasdaq_1.main". You should check if

1. all your package names are correct
2. your source folders are organized as com->dezyre->nasdaq
3. Do you have a main method in the Nasdaq_1 class?

0

Hi Neeraja,

Have you added Hadoop-core JAR to the build path of your project ? It seems like JAR is missing from the build path.

Thanks
Amrit

0

Execute following commands:
1. jar -tf | grep 'Nasdaq_1'
2. Check the result. It should be : com/dezyre/nasdaq/Nasdaq_1
3. If there is no result from step1, then the jar is not created properly and needs modifications.
4. If result on't matches with step2, then the class Nasdaq_1 is not under package com.dezyre.nasdaq.
You can check this from the very first line of the class: Nasdaq_1

Please post, if above options don't help.

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password