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 245534 - GlassFish 4.0 fails to start in NetBeans (freezes)
Summary: GlassFish 4.0 fails to start in NetBeans (freezes)
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 8.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 243980 256348 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-10 05:39 UTC by Bepeck
Modified: 2016-05-05 14:05 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 Bepeck 2014-07-10 05:39:22 UTC
Product Version: NetBeans IDE 8.0 (Build 201403101706)
Java: 1.7.0_60; Java HotSpot(TM) Client VM 24.60-b09
Runtime: Java(TM) SE Runtime Environment 1.7.0_60-b19
System: Windows XP version 5.1 running on x86; Cp1251; ru_US (nb)
User directory: C:\Documents and Settings\easid\Application Data\NetBeans\8.0
Cache directory: C:\Documents and Settings\easid\Local Settings\Application Data\NetBeans\Cache\8.0

I have installed NetBeans 8.0 and all that was in the kit including the GlassFish server 4. When i first start the application server GlassFish starts correctly, but on the second and subsequent attempts to start the server process hangs on

ant -f "C:\\Documents and Settings\\easid\\Мои документы\\NetBeansProjects\\WebTest\\WebTest-ejb" -DforceRedeploy=false -Ddirectory.deployment.supported=true -Dnb.wait.for.caches=true -Dnb.internal.action.name=run run
init:
deps-jar:
compile:
library-inclusion-in-archive:
dist-directory-deploy:
pre-run-deploy:
Запуск GlassFish Server 4

and silent in GlassFish logs

after a long time I realized that if you are working with a Glassfish (and NetBeans) and it make changes to domain.xml then domain.xml changes his charset from UTF8 to ANSI. After that i am geting the problem with "freezing". 
Then if i change charset of domain.xml back to UTF8 then Glassfish begin to work normally.

CONCLUSION: wrong charset when modify domain.xml (\domains\domain*\config\domain.xml)

Seems like this problem meets only in russian version
Comment 1 Petr Hejl 2015-04-28 10:29:37 UTC
It looks like the NetBeans is not modifying domain.xml directly. Can you also test changing the domain form GF admin console? Is the domain.xml being switched to ANSI as well? Thanks in advance.
Comment 2 Petr Hejl 2015-04-28 10:30:58 UTC
Also are there any special characters in domain.xml which differs in ANSI and UTF-8?
Comment 3 Petr Hejl 2015-04-29 15:09:26 UTC
That's strange I tried really hard to reproduce this with windows-1251 being default charset for both NB and GF and no luck. Is this consistently reproducible? Is the start of GF from NB the only thing you have done?
Comment 4 Petr Hejl 2015-04-29 21:33:16 UTC
Ok, steps to reproduce on Ubuntu:
1) configure locale to ru_RU.CP1251
2) have clean installation of NB and GF4
3) start NB with -J-Dfile.encoding=windows-1251
4) create webapp in path containing folder "Мои документы"
5) run app
6) stop server
7) run app - no server response
8) in domain.xml the above folder is written as "Мои%20документы" in CP1251 charset!

So there is either bug in NetBeans communication to GF or the GF itself. Or both.
Comment 5 Bepeck 2015-04-30 07:01:32 UTC
This problem occured when i was working with GF through NB, and when NB was doing some changes in GF`s domain.xml (creating new webapp)
When i was doing the same with GF and NB separately there was no bug with charset
Comment 6 Bepeck 2015-04-30 07:02:58 UTC
(In reply to Bepeck from comment #5)
> This problem occured when i was working with GF through NB, and when NB was
> doing some changes in GF`s domain.xml (creating new webapp)
> When i was doing the same with GF and NB separately there was no bug with
> charset

So bug in NetBeans communication to GF
Comment 7 Bepeck 2015-04-30 07:08:34 UTC
(In reply to Petr Hejl from comment #3)
> That's strange I tried really hard to reproduce this with windows-1251 being
> default charset for both NB and GF and no luck. Is this consistently
> reproducible? Is the start of GF from NB the only thing you have done?

start and stop GF from NB works correctly with 1-st project(?). But when you create second, third, ... there comes this freeze-bug

(?) don't remeber exactly what it was
Comment 8 Petr Hejl 2015-04-30 10:05:49 UTC
The GF itself writes domain.xml in CP1251:
1) configure locale to ru_RU.CP1251
2) start freshly isntalled GF4
3) create simple web app using NB in (for example) /home/petr/Мои документы/WebApplication1
4) invoke curl http://localhost:4848/__asadmin/deploy?DEFAULT=/home/petr/%D0%9C%D0%BE%D0%B8%20%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1%8B/WebApplication1/build/web&force=true&name=WebApplication1&contextroot=/WebApplication1
5) app deployed ok
6) domain.xml in CP1251

OTOH
7) stop GF
8) start GF again - starts OK
Comment 9 Petr Hejl 2015-04-30 11:19:37 UTC
Seems to be long term issue in GF: https://java.net/jira/browse/GLASSFISH-16304
Comment 10 Petr Hejl 2015-04-30 11:23:14 UTC
Initial workaround - web-main dcad726cf5c3.
Comment 11 Bepeck 2015-04-30 11:29:48 UTC
i`ve found same bug here
https://netbeans.org/bugzilla/show_bug.cgi?id=231584#c30
Comment 12 Bepeck 2015-04-30 11:33:11 UTC
(In reply to Bepeck from comment #11)
> i`ve found same bug here
> https://netbeans.org/bugzilla/show_bug.cgi?id=231584#c30

seems it was fixed at 2013-08-23
sorry that i wasn`t found it early
and i had no time to download and test it again too :(
Comment 13 Quality Engineering 2015-05-01 02:54:59 UTC
Integrated into 'main-silver', will be available in build *201505010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/dcad726cf5c3
User: Petr Hejl <phejl@netbeans.org>
Log: #245534 - GlassFish 4.0 fails to start in NetBeans (freezes)
Comment 14 Petr Hejl 2015-05-04 09:41:34 UTC
This issue has been fixed. I filed separate TASK for the general GF bug. See issue #252226.
Comment 15 Petr Hejl 2015-05-12 10:18:16 UTC
*** Bug 243980 has been marked as a duplicate of this bug. ***
Comment 16 Petr Hejl 2016-05-05 14:05:15 UTC
*** Bug 256348 has been marked as a duplicate of this bug. ***