Shell$ExitCodeException - Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService

1,290 views
By Abhijit Ghosh on Feb 28, 2014 1:43:45 PM

If you are getting "Exception from container-launch:org.apache.hadoop.util.Shell$ExitCodeException" in FAILED application's Diagnostics (or Command prompt) and "java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService" in 'stderr' containerlogs while running any Hadoop example on Windows, then add all the required Hadoop jars to the property 'yarn.application.classpath' in yarn-site.xml configuration file.

Tags:

Run Hadoop wordcount MapReduce Example on Windows

3,456 views
By Abhijit Ghosh on Feb 3, 2014 12:21:12 PM

In this post, we'll use HDFS command 'bin\hdfs dfs' with different options like mkdir, copyFromLocal, cat, ls and finally run the wordcount MapReduce job provided in %HADOOP_HOME%\share\hadoop\mapreduce\hadoop-mapreduce-examples-2.2.0.jar. On successful execution of the job in the Single Node (pseudo-distributed mode) cluster, an output (contains counts of the occurrences of each word) will be generated.

Tags:

AttachNotSupportedException: Unable to enqueue operation: the target VM does not support attach mechanism

2,395 views
By Abhijit Ghosh on Jan 10, 2014 10:12:37 AM

Following exception occurs in Windows for IBM JDK 6 while executing a JUnit testcase which uses JMockit framework, in-spite of enabling the Attach API "-Dcom.ibm.tools.attach.enable=yes" - java.lang.RuntimeException: com.sun.tools.attach.AttachNotSupportedException: Unable to enqueue operation: the target VM does not support attach mechanism

Tags:

Maven Build Failure - Hadoop 2.2.0 - [ERROR] class file for org.mortbay.component.AbstractLifeCycle not found

2,728 views
By Abhijit Ghosh on Dec 22, 2013 1:39:42 AM

In the previous post on Build, Install, Configure and Run Apache Hadoop 2.2.0 in Microsoft Windows OS, many people have encountered Maven build failure issue ("[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found") for Apache Hadoop Auth project. So thought of sharing the fix as a separate post.

Tags:

Configure SSL/HTTPS support on Apache Tomcat 7

4,101 views
By Abhijit Ghosh on Nov 27, 2013 2:08:21 PM

By default, HTTPS / SSL is not configured and enabled in Tomcat Web server. SSL setup is required to make your web application accessible over HTTPS protocol. This post will guide you to configure SSL in Tomcat 7 Web server.

Tags:

Get Redirections of a URL using Apache HttpComponents HttpClient

2,985 views
By Abhijit Ghosh on Nov 25, 2013 2:08:10 PM

Many websites use URL redirection technique to forward the original request from one location to another several times for different reasons (Domain forwarding, URL shortening, Privacy protection, Maintaining similar domain names referring single website, etc.). In this post, I'll try to demonstrate how to get all the redirections of a URL using Apache HttpComponents HttpClient. A live demo will be a bonus here.

Tags:

Determine Click Position (Row and Column Number) on click of a table cell

1,709 views
By Pavan Deshpande on Nov 24, 2013 9:16:28 AM

This example shows how to determine click position (row and column number) on click of a table cell using jQuery.

Tags:

ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path

4,755 views
By Abhijit Ghosh on Nov 3, 2013 3:20:52 PM

If we directly take the binary distribution of Apache Hadoop 2.2.0 release and try to run it on Microsoft Windows, then we'll encounter ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path.In the previous post - Build, Install, Configure and Run Apache Hadoop 2.2.0 in Microsoft Windows OS, I have already described how to build Windows distribution of Apache Hadoop 2.2.0. But if you are feeling little bit lazy to perform all the lengthy steps described there and want to get started with Hadoop quickly by-passing those steps, then this is the post worth looking into.

Tags:

Build, Install, Configure and Run Apache Hadoop 2.2.0 in Microsoft Windows OS

26,594 views
By Abhijit Ghosh on Nov 3, 2013 1:56:41 PM

Good news for Hadoop developers who want to use Microsoft Windows OS for their development activities. Finally Apache Hadoop 2.2.0 release officially supports for running Hadoop on Microsoft Windows as well. But the bin distribution of Apache Hadoop 2.2.0 release does not contain some windows native components (like winutils.exe, hadoop.dll etc). As a result, if we try to run Hadoop in windows, we'll encounter ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path.

In this article, I'll describe how to build bin native distribution from source codes, install, configure and run Hadoop in Windows Platform.

Tags:

Expand Shortened Link using Java

2,620 views
By Abhijit Ghosh on Oct 22, 2013 11:32:36 AM

Nowadays we use different URL shortening services (like bit.ly, TinyURL, Google URL Shortener etc.) to shorten long URL to fit in micro-blogging sites (like Twitter), to beautify a link, view analytics on link clicks, make a link manageable for sharing (in SMS or printed hard copy, book, magazine etc.) or obscure the underlying address. But large portion of shortened links are used just to disguise spam or bad-sites containing malware, spyware, XSS attacks etc. So for safe browsing, sometimes revealing the destination of shortened link is necessary too.

Here, we'll discuss one programmatic approach (using java.net.HttpURLConnection) to expand shortened links.

Tags:

About this 'Hello World' site

This site is mainly developed to share coding and technology learning experiences on java / j2ee based technologies.

Simple tutorials / codes have been shared to learn a new technology. Full source code is also available for download.