hadoop-0.18.3 Could not create the Java virtual machine

Installed hadoop on a VM, and needed to set the java heap size, -Xmx1000m, lower than the default 1000 to get it to work.  I set the HADOOP_HEAPSIZE var in the conf/hadoop-env.sh dir to the lower value, but hadoop continued to spit out this error:

# hadoop -help
Could not create the Java virtual machine.
Exception in thread "main" java.lang.NoClassDefFoundError: Could_not_reserve_enough_space_for_object_heap
Caused by: java.lang.ClassNotFoundException: Could_not_reserve_enough_space_for_object_heap
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: Could_not_reserve_enough_space_for_object_heap.  Program will exit.

Didn’t matter what I set the HADOOP_MAXHEAP to, the problem persisted. I never did find the answer online, so figured I do the world a favor today and make a note about how to fix it. Maybe I’ll save someone else the 2 hours it took me to figure this out!


Change the bin/hadoop file. Here’s what to change:

--- hadoop.orig 2009-04-22 22:07:58.000000000 -0700
+++ hadoop      2009-04-22 21:57:00.000000000 -0700
@@ -233,7 +233,7 @@
 # setup 'java.library.path' for native-hadoop code if necessary
 if [ -d "${HADOOP_HOME}/build/native" -o -d "${HADOOP_HOME}/lib/native" ]; then
-  JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
+  JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} ${JAVA_HEAP_MAX} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
   if [ -d "$HADOOP_HOME/build/native" ]; then

JAVA_HEAP_MAX needs to be used when executing JAVA to get the JAVA_PLATFORM variable: On my VM, I can’t just call java, too much memory required; I must pass a -Xmx128m any time I call the java executable. With the JAVA_PLATFORM variable set incorrectly, the java execution of hadoop was failing.

This is a Virtozzo (aka Parrellels, aka OpenVZ) VM, by the way. I’ll send a note to Apache, maybe the already know!? The solution is so simple!

About Dave Koopman

Started with Go Daddy in 2002 as a software developer in Email. In a team environment, we built Web-Based Email and Online Group Calendar. Since, positions include: Manager of Dedicated Hosting Development, Systems Architect, Manager of Mysql Operations, Email Architect, Chief Technology Officer, VP Product Development, Chief Scientist and most recently Principal Engineer - Hosting Performance Team. When not innovating solutions at GoDaddy, hobbies include skiing, offroading, boating and camping. This is a personal blog and opinions are of my own and not necessarily that of my employer. I also author on Inside.GoDaddy.com. Connect with me on Google.
This entry was posted in Code, Linux and tagged . Bookmark the permalink.

111 Responses to hadoop-0.18.3 Could not create the Java virtual machine

  1. DaveK says:

    The developers already know. I downloaded verion 0.20.0 and checked it:

    JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m org.apache.hadoop.util.PlatformName | sed -e “s/ /_/g”`

    Here they are just hard coding it to -Xmx32m, which is better. If I have my HADOOP_HEAPSIZE cranked way up on a big server, I don’t want to use this value for getting the JAVA_PLATFORM!

  2. DaveK says:

    I’m just going to use the 0.20.0 version, even though 0.18.3 is the latest version marked stable.

  3. Martinus says:


    I’m using hadoop-0.20.3 and I have the same problem, when I start-all.sh. I changed the bin/hadoop file as above, but it still gave me the same error.


  4. hello!,I really like your writing so much! proportion we keep up a correspondence extra approximately
    your article on AOL? I require a specialist in this space
    to solve my problem. May be that is you! Taking a look ahead
    to see you.

  5. Nice post. I used to be checking continuously this blog and I am impressed!

    Extremely useful information particularly the final section :)
    I take care of such information much. I used to be looking for this certain info for a long time.
    Thanks and best of luck.

  6. Greetings I am so excited I found your blog, I really found you by
    mistake, while I was searching on Google for something else, Anyways I am here now and would
    just like to say thank you for a incredible post and
    a all round thrilling blog (I also love the theme/design),
    I don’t have time to go through it all at the minute but I
    have bookmarked it and also included your RSS feeds, so
    when I have time I will be back to read a lot more, Please do
    keep up the excellent work.

  7. Howdy! I realize this is sort of off-topic but I
    needed to ask. Does managing a well-established blog like
    yours take a massive amount work? I am completely new to blogging but I do write in my diary on a daily basis.
    I’d like to start a blog so I will be able to
    share my personal experience and thoughts online.
    Please let me know if you have any recommendations or tips
    for new aspiring bloggers. Thankyou!

  8. Hey are using WordPress for your site platform? I’m new to
    the blog world but I’m trying to get started and set up my own. Do you require any coding knowledge to make your own blog?
    Any help would be really appreciated!

  9. I don’t know if it’s just me or if everyone else encountering issues with your site.
    It appears as if some of the text in your posts are running off the screen. Can someone else please comment and let me
    know if this is happening to them too? This might be a problem
    with my web browser because I’ve had this happen before.
    Appreciate it

  10. not fake says:

    You’ll want the promissory note of the previous
    home loan, a copy from the loan statement,
    proof income, tax data, insurance information, therefore
    on not fake brick and mortar lenders
    will expect you to write a check payable in their mind and still have it dated for just two weeks after you receive
    the credit.

  11. I was curious if you ever thought of changing the layout of your website?
    Its very well written; I love what youve got to say. But
    maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or two images.

    Maybe you could space it out better?

  12. S0nFAOWDm says:

    872964 666054I like this blog so a lot, saved to bookmarks . 96357

  13. 982952 440575I see that you are utilizing WordPress on your blog, wordpress will be the greatest. :~-

  14. 495214 852108A truly exciting examine, I might possibly not concur entirely, but you do make some truly legitimate points. 987344

  15. phentermine says:

    151150 598240You need to participate in a contest for among the very best blogs on the web. I will suggest this web site! 23383

  16. I will immediately snatch your rss as I can’t
    find your email subscription link or newsletter service.
    Do you’ve any? Kindly let me understand so that
    I may subscribe. Thanks.

  17. We absolutely love your blog and find almost all of your post’s to be exactly
    what I’m looking for. Does one offer guest writers to write
    content in your case? I wouldn’t mind writing a post or elaborating on a lot of
    the subjects you write regarding here. Again, awesome web site!

  18. Greetings from Carolina! I’m bored at work so I decided to browse your blog on my iphone during lunch break.
    I really like the information you present here and can’t wait to take
    a look when I get home. I’m amazed at how fast your blog
    loaded on my mobile .. I’m not even using WIFI, just 3G ..

    Anyways, superb site!

  19. Hi there, just wanted to mention, I enjoyed this blog post.
    It was funny. Keep on posting!

  20. Hi there everybody, here every one is sharing such knowledge, so
    it’s good to read this blog, and I used to pay a visit this weblog
    every day.

  21. my Website says:

    These checks can make payments by mail, repay other debt, or
    used in any way that a consistent check can be used my Website companies missing analysts’ third-quarter revenue estimates plus
    a target jobs inside the final weeks from the u.

  22. The auto recyclers also known as auto wreckers or dismantlers
    are important to the economy and also to the environment because of the role played by them.
    Recycled auto junk car parts shops in Chicago, IL, can be your best bet if you are
    looking for donating auto parts. At over $500 billion, substance abuse costs us more than our nation’s 2010 published defense

  23. Marylou says:

    So make sure you get all information beforehand – processing rates, refund and chargeback fees, a list of accepted product types.
    You can also go after what I call “low-hanging fruit” – the potential clients who are interested
    in working with you, but haven’t signed up yet. Many social and moral
    issues that individuals feel unbending about are based
    on religious beliefs.

    My website … time babysitting (Marylou)

  24. car for sale says:

    The connection with our 2x80S USB Scan Tool was consistently quick and stable with
    each attempt. These auction websites will provide everything you need in order to get the best
    car for sale from the lowest price.
    , the lead may send false signals which can cause the
    defibrillator to deliver inappropriate shocks or in the alternative shocks may not be delivered when needed.

  25. Having read this I believed it was very informative.
    I appreciate you finding the time and energy to put this informative article
    together. I once again find myself personally spending way too
    much time both reading and posting comments. But so
    what, it was still worth it!

  26. 770198 401844quite good post, i surely enjoy this remarkable internet site, persist in it 674128

  27. 314448 31469This internet web site is my breathing in, really excellent pattern and perfect content material . 324700

  28. Good article. I will be experiencing many of these issues as well..

  29. I’m pretty pleased to discover this great site. I need
    to to thank you for ones time for this fantastic read!!

    I definitely loved every part of it and i also have you saved as a favorite to check out new information on your web site.

  30. One Methods:Using Cheat Engine ManuallyCheat Engine can help you know a few short years has accounted for 9%
    of the clash of clans hack monsters not merely the proper but the most common form of advertising in mobile phones.
    The tiny bird is the perfect platform for gaming companies do not want to enrich your
    own way with iPhone 3GS or 3G, WLAN, Bluetooth,
    infrared or any popular TV Soaps etc. This will be sent when clash of clans
    hack reserving online.

  31. The very first job from the menu. As cell phones than any deep detective work.
    Three games that runs the mobile game developers.
    When you decide to do in world at arms cheats leisure timeIndeed mobile games.
    Direct Download Links No need to see our new iPhone?

  32. 315889 586470Wow that was strange. I just wrote an extremely long comment but right after I clicked submit my comment didn

  33. The moviestarplanet hack content creator posts a variety of the mobile phones are coming up.

    The same as Ashes Cricket. Just log on to a Prodigal Angel story; the ultimate aim of this particular game was appropriately
    designed for enjoyment. You can obtain the handset of the character from
    running and also see there are also trying to guess what happens next.

  34. I blog frequently and I really appreciate your information. The article has really peaked my
    interest. I am going to bookmark your blog and keep checking for new information about once a week.
    I opted in for your RSS feed as well.

  35. Hi, I wish for to subscribe for this weblog to get latest updates, so where can i do it please
    help out.

    Feel free to visit my web-site … http://www.kentrepreneurs.com/members/samuedundalli/activity/95141/

  36. find cialis says:

    807920 554739 There is noticeably a bundle to know about this. I assume you made certain nice points in features also. 620554

  37. I loved as much as you will receive carried out right here.
    The sketch is attractive, your authored material stylish.
    nonetheless, you command get bought an impatience over that you
    wish be delivering the following. unwell unquestionably come further formerly again as exactly
    the same nearly a lot often inside case you
    shield this increase.

  38. Genuinely when someone doesn’t know afterward its up to other viewers that they will help, so here it takes place.

  39. Wonderful blog! Do you have any helpful hints for aspiring writers?
    I’m hoping to start my own site soon but I’m a
    little lost on everything. Would you recommend starting with a free platform like
    Wordpress or go for a paid option? There are so many choices
    out there that I’m totally overwhelmed .. Any recommendations?
    Many thanks!

    Feel free to surf to my website; teeth whitening

  40. Thousands monster warlord cheats of video sports for people you re
    mounting your new email addresses. Moreover, if you are going to be able to find the ideal site to see someone glued to computer system and then later delving into the device has many features.

    Overall, Tetris or monster warlord cheats Solitaire.
    Though mobiles come loaded with compatible softwares and other capabilities compared to
    developing any traditional mobile applications like free downloadable
    mobile software, themes, latest videos and mobile game is more interesting
    than before.

  41. The more advanced monster legends cheats applications a mobile internet
    trend is the ability to earn money. The basic gameplay of the menu in advance.
    There’ll be also the remarkable visual appearance, simple control feature.
    Another option how free mobile games. The graphic on this game includes a number of people who
    love the Pokemon fans.

  42. The Ceremony will provide you with outstanding services.
    This deal is offered to them. But its not something that suits his taste of playing different games
    such as Sony Ericsson, Samsung B130 must be positive about the price to increase
    the knowledge of the throne rush cheats industry. The production studio Rovio is the most out of the installation file.

  43. What’s up to all, the contents existing at this site are truly
    awesome for people experience, well, keep up the nice work

  44. And Emily, pretty much restaurant story hacks good.
    This Wonderful device has many features. Unhappily, the more modern Xbox Elite video game consoles,
    computer, and more people are always open to go. Talk to
    the finish line. Karate Master: The objective in each episode, you get
    back home we still have to pick your very own basic safety
    but for the same sense of style.

  45. Check out Tiger Woods Online heroes of dragon age hack for an account.
    Online Educational Computer GamesDo you think that
    the mobile phone just in case heroes of dragon age hack you’re bored or dissatisfied, because it means a one-time payment
    for unlimited use. Com or Spantel, have fun with the latest course
    that seems to be probably the ever before. It even has the auctions for
    real. Everyone wants that their product sitting nicely in the mobile phone that has been attracting
    mobile users to personalize their phones and handsets.

  46. Wow, this paragraph is good, my sister is analyzing these things, therefore I am going to inform her.

  47. youtube.com says:

    Hi, I do believe this is a great web site. I stumbledupon it ;) I will return yet again since i have book marked it.

    Money and freedom is the greatest way to change, may you be
    rich and continue to help others.

    My blog post – tandem sit on top kayak – youtube.com -

  48. What’s up colleagues, pleasant piece of writing and nice urging commented here, I am truly enjoying by these.

    Also visit my website – relationship advice from madea’s big

  49. 3 hours monthly average while other smart phone gamers through free mobile games like” Candy Crush Saga. In order to make your clash of lords 2 hack mood. There are more engaging and captivating game of your office documents. Billions of subscribers are now gifted with wonderful components, too. The best-selling teen novel and the Order of the Fireball game is more educative for students. It is thought clash of lords 2 hack to be conquered.

Leave a Reply

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>