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 236466 - Glassfish startup failed with wrong JVM parameter
Summary: Glassfish startup failed with wrong JVM parameter
Status: RESOLVED INVALID
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.4
Hardware: Macintosh (x86) Mac OS X
: P1 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-27 12:53 UTC by lanthale
Modified: 2013-10-02 14:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lanthale 2013-09-27 12:53:23 UTC
My web application was running fine on the local glassfish. I have then realized that I am using the standard glassfish JVM properties and changed two parameters to the values I am using on my production server:

Parameters changed:
<jvm-options>-Xmx3072m</jvm-options>
<jvm-options>-Xms3072m</jvm-options>

Then I tried to start Glassfish from the command line and all was fine. Stopped the server on the command line and started Netbeans.

Then I tried to start Glassfish from Netbeans and not status at all. It takes 1 minutes before the GUI status is updated in the right manner (error occurs -> GUI thinks the startup of glassfish is running at least for 1 minute).

Here is now the error message from Netbeans:
Improperly specified VM option 'LogFile=/Applications/NetBeans/glassfish-3.1/glassfish/domains/wistdomain/logs/jvm.log'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

At last point I tried to undo the changes, tried it with Netbeans again -> same error message. For now I have to start the app server always manually and than netbeans knowing that the server is running and I can operate (deploy, debug, ...) without any issues. Only the startup is the problem.
Comment 1 TomasKraus 2013-09-27 13:05:35 UTC
Did you use glassfish admin console to modify server JVM options?
Comment 2 lanthale 2013-09-30 07:20:14 UTC
No. I did this edition the domain.xml with jEdit
Comment 3 lanthale 2013-09-30 07:21:03 UTC
I mean I have used an editor to modify the domain.xml
Comment 4 TomasKraus 2013-09-30 10:55:06 UTC
Yes, this is known to cause problems.
Try to initialize server domain (asadmin delete/create-domain) to get it into working state and add those JVM options using GF admin console. This is the supported way and it should work fine.
Comment 5 Petr Jiricka 2013-10-02 14:10:58 UTC
So why does the user say:

> Then I tried to start Glassfish from the command line and all was fine.

Is it really true that it works from the command line? If not (and the problem is the same from cmdline and NetBeans), then this would be INVALID. Closing as INVALID for now, please let us know if things work for you when editing through admin console.
Comment 6 TomasKraus 2013-10-02 14:55:17 UTC
I remember similar issue with identical symptoms. Problem was in manual domain.xml modification which introduced some non us-ascii characters causing domain.xml parser in GlassFish plugin to throw an exception.

There is no way to switch this 3rd party XML parser into some foolproof mode to ignore unknown characters. Unfortunately this domain.xml parser on NetBeans side is not as good as the ine in GlassFish and we have to live with this as a fact.

I know that most of domain.xml modifications from GlassFish admin console are safe. But try to not use international character sets anyway.

Also at the beginning of V3 something like 'java -jar glassfish.jar' was fully supported way to start server and that's why plugin is executing GF dirrectly. But this was made illegal and unsupported with GlassFish 3.1 and since that we are facing some issues.

I have some plans to replace current process startup code from direct Java VN execution to using asadmin for normal and debug mode. But those changes were made too late and were too large to activate them in 7.4. There is already fully working and tested asadmin execution support in GF Tooling Library.

Unfortunately I have no idea how to start GlassFish in profiling mode using asadmin. :(