Results 1 to 13 of 13
Thread: JVM creation failed
- 01-23-2010, 04:50 PM #1
Member
- Join Date
- Jan 2010
- Location
- UK
- Posts
- 9
- Rep Power
- 0
JVM creation failed
I've been using NB since version 4 on this computer (details below). However, just recently NB won't start; I just get "JVM creation failed".
So I set the heap space (after some experimentation) to -J-Xmx256m and it works.
But the netbeans.conf file says that the heap size is computed and you don't have to set it. It says if you want to find the current setting look in var/log/messages.log but I only have those up to version 6.7. Version hadn't produced one before I set the heap space manually.
This JVM problem has plagued my other IDEs recently but I've managed to fix those by lowering the heap space requirement (e.g. -Xmx512m).
So I have a more generic problem as well as one specific to NB. No, I haven't just lost 3/4 of my memory (although I am getting rather old).
Does anyone know why I need to change the heap space requirement?
Computer: 32bit Windows XP, SP3, 2Gb RAM, very little running by way of background tasks. Security patches up to date, Zonealarm Security Suite in constant use (I've checked "Program Security" -- JVMs are 100% trusted).
JDK/JRE version: 1.6.0_18 (latest as of this post)
Thanks,
RogerPLast edited by RogerP; 01-23-2010 at 04:57 PM.
- 01-25-2010, 08:29 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Is there any more information provided with that error?
- 01-25-2010, 12:49 PM #3
Member
- Join Date
- Jan 2010
- Location
- UK
- Posts
- 9
- Rep Power
- 0
No, the JVM is initiated as a prerequisite to NB starting. Therefore NB cannot output an informational message. The only info I have is that 256Mb seemed to work but I don't know why or what caused the situation to change. As I said, I've been running NB for years without having to specify a heap size.
- 01-25-2010, 01:24 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Do you have a Java program you could run? Any old stuff, from the command line.
Just curious if you'd get the same error if you ran it with 512M or whatever value seems to be causing the trouble.
- 01-25-2010, 09:52 PM #5
Member
- Join Date
- Jan 2010
- Location
- UK
- Posts
- 9
- Rep Power
- 0
No problem. I ran a little jar file. Doesn't need a heap space directive.
For my XML work I use an IDE called <oXygen/> that needs Xmx512m but NB wouldn't start with that setting, so I used 256.
I confess, I've never really had to think about JVMs very much. I am not exactly sure whether the heap size is just an initial "Boot strap" size to allow the JVM to get going or whether it's a restriction that caps the memory allocation and forces caching for its whole lifetime.
- 01-26-2010, 10:46 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Xmx is the maximum amount of memory the JVM is allowed to use. Xms is the start memory (not sure what the default is). The JVM will grab memory as it needs it as it goes along up to the value of Xmx. So oXygen works with 512, but Netbeans doesn't?
Have you tried an earlier (or later) version of netbeans?
- 01-26-2010, 02:06 PM #7
Member
- Join Date
- Jan 2010
- Location
- UK
- Posts
- 9
- Rep Power
- 0
Slight complication: I now do most of my NB work on either the Linux partition of my home PC or on my work laptop (also Linux). The problem I have is on my home PC under Windows XP, which I used to use all the time going through every version, almost every RC, and even betas from NB 4. I've never had a heap space issue before.
I am using NB 6.8 which is the latest version but I cannot be completely sure whether the problem existed with 6.7.1 or whether 6.8 was OK for a while before this heap space thing started. (Because I favoured Linux where there was no problem.)
Yes, under Windows XP, I couldn't start NB 6.8 with Xmx512m, only with Xmx256m, but perhaps I miss-typed something, I'll go back and retry. I may even retry all the steps up to the point where it doesn't start.
What I don't understand is why the JVM has to be so restricted when I have 2Gb for it to go at.
Tolls, you've been very kind taking an interest in this issue but in all honesty I am not completely stuck as I prefer to use Linux anyway (same PC, same NB 6.8, no such problem).
I posted the question here as I was more interested in what was causing the JVM to change its behaviour and whether others had the same issue.
Many thanks!Last edited by RogerP; 01-26-2010 at 02:09 PM.
- 01-26-2010, 02:22 PM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
No probs. The JVM needs to know how much memory it's allowed to grab. I did have it explained why, but I'm damned if I can remember...suffice to say there's a reason. Yes, you may have 2Gb of memory, but you don't want Java eating all of that. Actually, I think it's to do with how Java interacts with the underlying operating system, and the limitations imposed on the JVM.
Anyway, consequently you have to provide it with a value to work with (you'll almost never rely on the default).
As for Netbeans, I can say that 6.7.1 works fine with 1024 on XP, as that's what I'm using. And 6.8 works fine (at least chap here hasn't complained yet) with 1024 on XP...or it might be Vista. So there might be something funny going on with your particular box. Bad JDK installation, duff Netbeans installation, something else. I'm a martyr to my XP laptop here...:)
- 01-26-2010, 05:51 PM #9
Member
- Join Date
- Jan 2010
- Location
- UK
- Posts
- 9
- Rep Power
- 0
The largest I could get to work was 352 (stepping in increments of 32). Anything larger gets JVM creation failed, as before. Here's my netbeans.conf file
Notice it says:Java Code:# ${HOME} will be replaced by JVM user.home system property netbeans_default_userdir="${HOME}/.netbeans/6.8" # Options used by NetBeans launcher by default, can be overridden by explicit # command line switches: netbeans_default_options="-J-Dorg.glassfish.v3ee6.installRoot=\"C:\Program Files\sges-v3\" -J-client -J-Xverify:none -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Xmx352m" # Note that a default -Xmx is selected for you automatically. # You can find this value in var/log/messages.log file in your userdir. # The automatically selected value can be overridden by specifying -J-Xmx here # or on the command line. # If you specify the heap size (-Xmx) explicitely, you may also want to enable # Concurrent Mark & Sweep garbage collector. In such case add the following # options to the netbeans_default_options: # -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled # (see http://wiki.netbeans.org/wiki/view/FaqGCPauses) # Default location of JDK, can be overridden by using --jdkhome <dir>: netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_18" # Additional module clusters, using ${path.separator} (';' on Windows or ':' on Unix): #netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2" # If you have some problems with detect of proxy settings, you may want to enable # detect the proxy settings provided by JDK5 or higher. # In such case add -J-Djava.net.useSystemProxies=true to the netbeans_default_options.Obviously, when it doesn't get started it can't emit a log file. But now that it does, the log file has some errors that I will investigate. They don't appear to have any affect on NB once started however.E.g.:# Note that a default -Xmx is selected for you automatically.
# You can find this value in var/log/messages.log file in your userdir.
Most refer to SVN which obviously is not an issue here. I don't understand the others yet.Java Code:Compiler: HotSpot Client Compiler Heap memory usage: initial 32.0MB maximum 340.3MB Non heap memory usage: initial 32.2MB maximum 232.0MB Garbage collector: Copy (Collections=27 Total time spent=0s) Garbage collector: MarkSweepCompact (Collections=1 Total time spent=0s) Classes: loaded=6005 total loaded=6005 unloaded 0 INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 2,146,156,544 INFO [org.netbeans.libs.svnclientadapter]: Javahl client adapter is not available Failed to load JavaHL Library. These are the errors that were encountered: no libapr-1 in java.library.path no libapriconv-1 in java.library.path no libeay32 in java.library.path no libdb44 in java.library.path no ssleay32 in java.library.path no libaprutil-1 in java.library.path no intl3_svn in java.library.path no libsasl in java.library.path no libsvn_subr-1 in java.library.path no libsvn_delta-1 in java.library.path no libsvn_diff-1 in java.library.path no libsvn_wc-1 in java.library.path no libsvn_fs-1 in java.library.path no libsvn_repos-1 in java.library.path no libsvn_ra-1 in java.library.path no libsvn_client-1 in java.library.path no libsvnjavahl-1 in java.library.path no svnjavahl-1 in java.library.path no svnjavahl in java.library.path java.library.path = C:\Program Files\NetBeans 6.8\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\Support Tools\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\DISKEE~1\DISKEE~2\;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.6.0_18\binC:\Program Files\Apache Software Foundation\apache-ant-1.7.0\bin;C:\Program Files\Apache Software Foundation\axis-1_4\lib;C:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\grails-1.0.4\bin INFO [org.netbeans.modules.subversion.client.SvnClientFactory]: Could not setup subversion java bindings. Falling back on commandline. WARNING [org.netbeans.modules.java.platform.DefaultJavaPlatformProvider]: DefaultPlatformStorage: The file: Sun_Java_TM__Wireless_Toolkit_2_5_2_for_CLDC.xml has no InstanceCookie INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Resolving dependencies took: 1,203 ms INFO [org.netbeans.modules.subversion]: Finished indexing svn cache with 6793 entries. Elapsed time: 2406 ms. INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 5 binary roots took: 4204 ms INFO [org.netbeans.modules.editor.settings.storage.SettingsType]: Preferences settings should reside in 'Preferences' subfolder, see #90403 for details. Offending file 'Editors/text/x-java/properties.xml'
I'll also look at the log files of my Linux installation to see whether the errors are replicated.
When the problem first occurred, I did a full reinstall of NB (deleted old artefacts, cleaned registry) and I cleaned up my JDK's etc. This didn't have any affect as far as I could see.
RogerP
- 01-27-2010, 08:48 AM #10
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
None of those are errors, really. I think all bar the wireless one are to do with svn aren't they? All that JavaHL stuff is anyway.
I was going to suggest cleaning everything out...you beat me to it! Other than that, have you tried on another XP machine? Or had a look at the Netbeans forum? You might get someone over there that's encountered this problem, or something similar.
- 01-27-2010, 06:18 PM #11
Member
- Join Date
- Jan 2010
- Location
- UK
- Posts
- 9
- Rep Power
- 0
I'll live with it for a while. It'll keep me on Linux, which is where I prefer to be anyway.
Many thanks; I've enjoyed the discussion and learnt a lot in the process. :)
RogerP
- 02-21-2011, 11:09 AM #12
Member
- Join Date
- Jan 2011
- Posts
- 2
- Rep Power
- 0
JVM creation failed netbeans
This error occurs in my system because of Antivirus not Installed properly.
And antivirus is NP - Net Protector. This error may occur if any application is not installed properly on the machine.
I am uninstall the NP and then the error resolve. :)Last edited by SagarMohril; 02-21-2011 at 11:11 AM.
- 10-08-2011, 09:33 PM #13
Member
- Join Date
- Oct 2011
- Posts
- 1
- Rep Power
- 0
Possible solution?
Hi All,
I recently had this problem and the solution for my computer was as follows, I have indicated the values I entered [in red] to make mine work:
# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/.netbeans/7.0"
# Options used by NetBeans launcher by default, can be overridden by
explicit
# command line switches:
netbeans_default_options="-J-client -J-Xss2m -J-Xms512m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-
Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"
# Note that default -Xmx and -XX:MaxPermSize are selected for you automatically.
# You can find these values in
var/log/messages.log file in your userdir.
# The automatically selected value can be overridden by specifying -J-Xmx512m or
# -J-XX:MaxPermSize=200m here or on the command line.
# If you specify the heap size (-Xmx) explicitly, you may also want to enable
# Concurrent Mark & Sweep garbage collector. In such case add the following
# options to the
netbeans_default_options:
# -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
# (see FaqGCPauses - NetBeans Wiki)
# Default
location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="F:\Program Files (x86)\Java\jdk1.7.0"
# Additional module clusters, using ${path.separator} (';'
on Windows or ':' on Unix):
#netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"
# If you have some problems with detect of proxy settings, you may
want to enable
# detect the proxy settings provided by JDK5 or higher.
# In such case add -J-Djava.net.useSystemProxies=true to the netbeans_default_options.
Similar Threads
-
my Quicksort attempt has failed
By Jeremy8 in forum New To JavaReplies: 4Last Post: 11-16-2009, 02:56 AM -
Failed in reading xml
By gayathri_g in forum New To JavaReplies: 0Last Post: 08-27-2009, 02:07 PM -
Intial Session Factory Creation Failed.
By endx in forum Advanced JavaReplies: 3Last Post: 06-29-2008, 05:12 AM -
Initial SessionFactory creation failed
By escit in forum JDBCReplies: 1Last Post: 08-13-2007, 03:46 AM -
Loading of JSP file failed
By Heather in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 08-06-2007, 01:15 AM


LinkBack URL
About LinkBacks

Bookmarks