This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231624 - Build on New install FAILS with JVM Failed ERROR
Summary: Build on New install FAILS with JVM Failed ERROR
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-21 10:31 UTC by eatc7402
Modified: 2013-07-08 09:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (50.75 KB, text/plain)
2013-06-21 10:32 UTC, eatc7402
Details
JVM creation error (114.07 KB, image/png)
2013-06-27 08:13 UTC, Martin Kozeny
Details
JVM build error (314.01 KB, image/jpeg)
2013-06-28 00:25 UTC, eatc7402
Details
My WordProcessor App (456 bytes, application/octet-stream)
2013-07-02 00:35 UTC, eatc7402
Details
WordProcessor sample app (2.95 MB, application/zip)
2013-07-02 06:56 UTC, Martin Kozeny
Details
WordProcessor Project (790.23 KB, application/octet-stream)
2013-07-02 12:34 UTC, eatc7402
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eatc7402 2013-06-21 10:31:59 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_22
Runtime = Java HotSpot(TM) Client VM 17.1-b03
Comment 1 eatc7402 2013-06-21 10:32:07 UTC
Created attachment 136131 [details]
IDE log
Comment 2 eatc7402 2013-06-21 10:37:45 UTC
I am following https://platform.netbeans.org/tutorials/nbm-quick-start.html EXACTLY. It seems to compile ok
but ends with a JVM Failed to be created error. I read some possible solutions, but none seem to wor.
Here is line from my C:\Program Files\NetBeans 7.3\etc\netbeans.conf file...

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dsun.awt.disableMixing=true"


eatc7402
Comment 3 eatc7402 2013-06-25 01:17:41 UTC
Awaiting some action... Thanks
Comment 4 Martin Kozeny 2013-06-25 13:59:54 UTC
I am using almost same environment as you:

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
Runtime: Java(TM) SE Runtime Environment 1.6.0_22-b04
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)

and creating, building and running app work fine. I can't see any trouble in log you provided. JVM Failed to be created error is not connected with creating NBM platform app. It could be connected with parameter XX:MaxPermSize or some other one.
Comment 5 Martin Kozeny 2013-06-25 14:45:14 UTC
Please check your project.properties file in your app. If I add property about PermSize 'run.args.extra=-J-XX:PermSize=384m -J-XX:MaxPermSize=1024M' in that file, I get the JVM creation failed error. In app log I can see following:

Error occurred during initialization of VM
Could not reserve enough space for object heap

Probably you have similar problem.
Comment 6 eatc7402 2013-06-26 00:53:21 UTC
I  did a global search for the text "Error occurred during initialization of VM"
in my ENTIRE Netbeans Projects folder. The text was not found. Either it
does not exist, or I'm searching in the wrong location.

I am unclear of the next steps I should be taking.

Also to clarify... this  is a new install pf NB 7.3. The creation of the
JVM has NEVER successfully wotked. This seems to be an 'error on out
of the box'.

eatc7402
Comment 7 eatc7402 2013-06-27 07:10:59 UTC
Now what... I would like to program in Java but NB won't work OUT OF THE
BOX! there must be  SOME steps to take.
Comment 8 Martin Kozeny 2013-06-27 08:13:07 UTC
Created attachment 136377 [details]
JVM creation error

You should look at your app log in the IDE, not search through project, and message 'JVM Failed to be created' appeared in the pop up window (see attachment). 

> The creation of the
> JVM has NEVER successfully worked

Does it mean you get same error as presented above or you get JVM Failed to be created error when NB starting?
Comment 9 eatc7402 2013-06-27 11:21:18 UTC
What app log?

I only get the error at the end of a compile of the (your) app.

eatc7402
Comment 10 Martin Kozeny 2013-06-27 11:39:25 UTC
Actually, I don't understand now. So you get the error at compile time or at runtime? Could you provide some screen shot or whatever? App log I mean log on the Output tab from running application.
Comment 11 eatc7402 2013-06-28 00:25:59 UTC
Created attachment 136439 [details]
JVM build error
Comment 12 eatc7402 2013-06-28 00:27:37 UTC
Here's the log from the output window....



ant -f C:\\Users\\David\\Documents\\NetBeansProjects\\WordProcesso\\WordEditorCore -Dcontinue.after.failing.tests=true run
taskdefs:
common-init:
projectized-common.basic-init:
basic-init:
files-init:
nbm-license-init:
build-init:
Scanning for modules in C:\Program Files\NetBeans 7.3\platform
Scanning for modules in suite C:\Users\David\Documents\NetBeansProjects\WordProcesso
init:
up-to-date:
compile:
jar-prep:
jar:
netbeans-extra:
javahelp:
module-auto-deps:
release:
module-xml-regular:
module-xml-autoload:
module-xml-eager:
chmod-executables:
verify-class-linkage:
0 file(s) have been successfully validated.
netbeans:
Generating Auto Update information for org.word.editor.core
platform.download:
run:
run.run:
Error occurred during initialization of VM
Could not reserve enough space for object heap
BUILD SUCCESSFUL (total time: 53 seconds)
Comment 13 Martin Kozeny 2013-06-28 07:36:08 UTC
Great. That's what I need to know. You should deal with following property in project.properties file:

run.args.extra=-J-Xms32m -J-Xmx512M -J-XX:PermSize=32m -J-XX:MaxPermSize=512M

Argument PermSize means initial size of memory for generated codebase and MaxPermSize stands for maximum size of that portion of memory. Param Xms is initilal size of heap for objects created by our app and Xmx is maximum size of heap which can be allocated for those objects. Try to use above presented setting or slightly modify it. Please let me know if it works.
Comment 14 eatc7402 2013-06-28 13:16:55 UTC
I'll be happy to try it. Can you steer me towards the correct dir that
contains the project.properties file,

Thanks.
Comment 15 Martin Kozeny 2013-06-28 13:43:16 UTC
It is located in suite's Important Files node or in Files view, you can see it under nbproject folder.
Comment 16 eatc7402 2013-06-29 00:41:12 UTC
I ADDED the line of code you suggested. Such a line DID NOT exist before.
Did I add it to the correct file??

I added it to the projects 'important files' location.

However doing so, and playing with the values up to 512m
like this...
app.name=${branding.token}
app.title=WordProcesso
modules=\
    ${project.org.word.editor.core}
project.org.word.editor.core=WordEditorCore

// by dbf
run.args.extra=-J-Xms512m -J-Xmx512M -J-XX:PermSize=512m -J-XX:MaxPermSize=512M

Did NOT remove the error.... still "JVM failed to be created".

Error occurred during initialization of VM
Could not reserve enough space for object heap
BUILD SUCCESSFUL (total time: 4 seconds)


eatc7402
Comment 17 Martin Kozeny 2013-07-01 05:38:48 UTC
Yes, that's the correct file. You should modify those values to get the appropriate settings. Also according to size of your memory.
Comment 18 eatc7402 2013-07-01 06:45:31 UTC
Well I tried  the values you sent, and increased all the way up to the max 
(512m). NONE f them worked..... the same JVM failed error. I did not try
DECREASING the values.

I have 2gbye of free memory at the time I run NB, out of a system total
pf 4gbye.

Now what?
Comment 19 Martin Kozeny 2013-07-01 08:04:14 UTC
E.g. for me it works with following arguments:

run.args.extra=-J-XX:PermSize=384m -J-XX:MaxPermSize=512M
Comment 20 eatc7402 2013-07-01 10:02:56 UTC
I re-tried your suggested code line. I still get the SAME error.

JVM failed to be created.

Should there be a reference to Java in the  system path?
Comment 21 eatc7402 2013-07-01 10:04:36 UTC
Mine has C:\Program Files (x86)\Java\jdk1.6.0_22\bin;
Comment 22 Martin Kozeny 2013-07-01 11:07:45 UTC
No, according to your log there is a problem with reserving space for heap - Could not reserve enough space for object heap. Ok could you upload here your WordProcessor app? I try to observe whether there is no problem with some configuration file.
Comment 23 eatc7402 2013-07-02 00:35:41 UTC
Created attachment 136570 [details]
My WordProcessor App

My WordProcessor App
Comment 24 eatc7402 2013-07-02 00:37:04 UTC
I hope I uploaded that Directory full of code correctly.

eatc7402
Comment 25 Martin Kozeny 2013-07-02 06:56:52 UTC
Created attachment 136572 [details]
WordProcessor sample app

No it's not the app, you've just uploaded only generated build script. I attach whole app which works for me. Please try it!
Comment 26 eatc7402 2013-07-02 07:08:47 UTC
Im not sure ho to attatch the WHOLE app.
Comment 27 Martin Kozeny 2013-07-02 07:21:12 UTC
Hold the mouse above the project in NetBeans and pop up window shows you the path.
Comment 28 eatc7402 2013-07-02 08:50:17 UTC
Yes I have no problem finding the path to the project, but I can't seem to
find a way to get the bug attachment to accept that path into  the textbox for files into the bug attachment . 

Perhaps THST is not the method for attaching a whole project.

 In that case I need more of an explanation how to send you the project.

eatc7402
Comment 29 Martin Kozeny 2013-07-02 10:28:17 UTC
Just zip or somehow else pack project folder...
Comment 30 eatc7402 2013-07-02 12:34:03 UTC
Created attachment 136598 [details]
WordProcessor Project
Comment 31 Martin Kozeny 2013-07-03 14:17:12 UTC
Your app works fine for me. Do you still get 'Could not reserve enough space for object heap' error or some other? Don't understand, because you use exactly same netbeans.conf settings as me. Does mine app works for you?

Here are some info about JVM switches https://performance.netbeans.org/howto/jvmswitches/. Hope this helps.
Comment 32 eatc7402 2013-07-04 01:54:06 UTC
Well all I can tell you is this what I get when I attempt to run the project...
================
ant -f C:\\Users\\David\\Documents\\NetBeansProjects\\WordProcesso\\WordEditorCore -Dcontinue.after.failing.tests=true run
taskdefs:
common-init:
projectized-common.basic-init:
basic-init:
files-init:
nbm-license-init:
build-init:
Scanning for modules in C:\Program Files\NetBeans 7.3\platform
Scanning for modules in suite C:\Users\David\Documents\NetBeansProjects\WordProcesso
init:
up-to-date:
compile:
jar-prep:
jar:
netbeans-extra:
javahelp:
module-auto-deps:
release:
module-xml-regular:
module-xml-autoload:
module-xml-eager:
chmod-executables:
verify-class-linkage:
0 file(s) have been successfully validated.
netbeans:
Generating Auto Update information for org.word.editor.core
platform.download:
run:
run.run:
Error occurred during initialization of VM
Could not reserve enough space for object heap
===================================

eatc7402
Comment 33 eatc7402 2013-07-04 02:02:40 UTC
And heres my netbeans.conf
==========
# Default locations of userdir and cachedir:
# (http://wiki.netbeans.org/FaqWhatIsUserdir)
#
# On Windows ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
# with "<AppData>\NetBeans" where <AppData> is user's
# value of "AppData" key in Windows Registry under
# "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
# and ${DEFAULT_CACHEDIR_ROOT} will be replaced by the launcher
# with "<Local AppData>\NetBeans\Cache" where <Local AppData> is user's
# value of "Local AppData" key in Windows Registry under
# "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
#
# On Mac ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
# with "~/Library/Application Support/NetBeans" and
# ${DEFAULT_CACHEDIR_ROOT} with "~/Library/Caches/NetBeans"
#
# On other systems ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
# with "~/.netbeans" and ${DEFAULT_CACHEDIR_ROOT} with "~/.cache/netbeans"
#
# You can also use ${HOME} variable which will be replaced with
# user.home JVM system property value. This variable is valid only in
# netbeans_default_userdir and netbeans_default_cachedir properties.
#
# NOTE: If you specify a non-default userdir path on command line
# (--userdir option) and don't specify a cachedir path (--cachedir option),
# cachedir will be in "<userdir>/var/cache".
#
# Cachedir must be different from userdir. The same cachedir and userdir
# would cause problems.
#
netbeans_default_userdir="${DEFAULT_USERDIR_ROOT}/7.3"
netbeans_default_cachedir="${DEFAULT_CACHEDIR_ROOT}/7.3"

# Options used by NetBeans launcher by default:
# (can be overridden by explicit command line switches)
#
# 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-Xmx or
# -J-XX:MaxPermSize= here or on the command line.
#
# If you specify the heap size explicitly, you may also want to enable
# Concurrent Mark & Sweep garbage collector.
# (see http://wiki.netbeans.org/FaqGCPauses)
#
# following line commented out by dbf
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dsun.awt.disableMixing=true"

# added by dbf
#netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=128m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"

# Default location of JDK:
# (set by installer or commented out if launcher should decide)
#
# It can be overridden on command line by using --jdkhome <dir>
# Be careful when changing jdkhome.
# There are two NetBeans launchers for Windows (32-bit and 64-bit) and
# installer points to one of those in the NetBeans application shortcut 
# based on the Java version selected at installation time.
#
netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.6.0_22"

# Additional module clusters:
# using ${path.separator} (';' on Windows or ':' on Unix):
#
#netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"
Comment 34 Martin Kozeny 2013-07-08 06:15:17 UTC
Ok try to uncomment and modify in netbeans.conf file following two lines according to this description:

-J-XX:MaxPermSize=1024

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m
-J-XX:MaxPermSize=384m -J-Dapple.laf.useScreenMenuBar=true
-J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"

If this not helps, try to use latest Dev version of NetBeans IDE.
Comment 35 eatc7402 2013-07-08 08:41:42 UTC
I made the changes you suggested to my NB7.3 instalation, amd they DID NOT fix
the issue.

Next I downloaded jdk-7u25-nb-7_3_1-windows-x64.exe and installed the 7.3.1 and
the updated jdk.....

THAT SOLVED THE PROBLEM!

The apps now compile and run.

Thanks

eatc7402