Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 151921 - template rename causes it to disappear
template rename causes it to disappear
Status: VERIFIED FIXED
Product: obsolete
Classification: Unclassified
Component: Registration
6.x
All All
: P2 (vote)
: 6.x
Assigned To: mslama
issues@platform
http://statistics.netbeans.org/except...
65fixes2-verified EXCEPTIONS_REPORT
:
: 153508 155013 155075 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-30 23:03 UTC by Marian Mirilovic
Modified: 2009-02-19 20:55 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2008-10-30 23:03:59 UTC
31 duplicates so far ... last two from 081017 ... we need to do at least evaluation for NB 6.5

Build: NetBeans IDE 6.0 (Build 200711261600)
VM: Java HotSpot(TM) Client VM, 1.5.0_14-b03
OS: Windows XP, 5.1, x86
User comments: 
STACKTRACE: (first 10 lines)
java.lang.IllegalArgumentException: Error generated in parsing
        at org.netbeans.modules.servicetag.RegistrationDocument.initializeDocument(RegistrationDocument.java:164)
        at org.netbeans.modules.servicetag.RegistrationDocument.load(RegistrationDocument.java:115)
        at org.netbeans.modules.servicetag.RegistrationData.loadFromXML(RegistrationData.java:426)
        at org.netbeans.modules.reglib.NbServiceTagSupport.getRegistrationData(NbServiceTagSupport.java:373)
        at org.netbeans.modules.reglib.NbServiceTagSupport.getNbServiceTag(NbServiceTagSupport.java:453)
        at org.netbeans.modules.reglib.NbServiceTagSupport.createNbServiceTag(NbServiceTagSupport.java:171)
        at org.netbeans.modules.registration.NbInstaller.restored(NbInstaller.java:98)
        at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:378)
        at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:297)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:933)
Comment 1 mslama 2008-11-05 14:05:32 UTC
Please when this happens check content of file $NBINSTDIR/nb6.1/servicetag/registration.xml. This exception usualy
happens when xml is empty. I want to make sure it is this case. Another issue is why it hapens ie. why incorrect content
is generated. This file is either generated by installer or by IDE on first start when registration.xml is not found.
Then I need to know if you installed IDE by installer or from zip file.

If registration.xml file is empty it could be workarounded either by skipping registration or IDE could regenerate
(incomplete) registration.xml file (as IDE does not know about another components installed with IDE). Still better than
this exception.

Simple workaround is to disable registration using command line option -J-Dnb.registration.enabled=false
Comment 2 grisu1985 2008-11-05 15:06:02 UTC
I have the followed this workaround:
The file ~/.netbeans-registration/6.5/registration.xml isempty, so I have this file erased and restarted the IDE.
After this step, the file was not regenerated, but the IDe start now without this problem.

For information: I have installed with netbens-6.5rc2-ml-javase-linux.sh but previously I had the version 6.5rc1 installed.
Comment 3 mslama 2008-11-05 15:16:27 UTC
File ~/.netbeans-registration/6.5/registration.xml is generated only if NB install dir is read only. So it is possible
IDE recreated registration.xml in NBINSTDIR/nb6.5/servicetag. You can check that. IDE first checks install dir and if
registration.xml is not found then ~/.netbeans-registration/<VERSION>/ is checked. Installer ALWAYS creates
registration.xml in NB install dir. So please check also NBINSTDIR/nb6.5/servicetag. 
Comment 4 grisu1985 2008-11-05 15:39:52 UTC
NBINSTDIR/nb6.5/servicetag/registration.xml is not empty.
I don't now of the contents, but the xml syntax is correct.
Comment 5 mslama 2008-11-05 15:53:14 UTC
I checked when empty registration.xml is in home and valid is in install dir. No exception as I expected. So empty
registration.xml had to be loaded. I will implement some workaround for this - I must handle also case when empty
registration.xml in install dir is empty but read only. Then it must be skipped. Thanks.
Comment 6 dlipin 2008-11-20 08:30:50 UTC
*** Issue 153508 has been marked as a duplicate of this issue. ***
Comment 7 mslama 2008-12-08 18:12:53 UTC
core-main #26dc478dffca

Added check for empty registration.xml file. It handles also case when install directory or registration file itself is
read only.
Comment 8 dlipin 2008-12-08 21:26:22 UTC
could someone attach the installation log (~/.nbi/log) that corresponds to the installation of the IDE which shows that 
issue?
Comment 9 dlipin 2008-12-09 11:04:26 UTC
*** Issue 155013 has been marked as a duplicate of this issue. ***
Comment 10 Quality Engineering 2008-12-09 18:30:43 UTC
Integrated into 'main-golden', will be available in build *200812091520* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/26dc478dffca
User: Marek Slama <mslama@netbeans.org>
Log: #151921: Handle empty registration xml file.
Comment 11 dlipin 2008-12-10 11:07:26 UTC
grisu1985, minashokry,

Could you please try the latest daily build?
http://bits.netbeans.org/netbeans/trunk/nightly/latest/

I`ve fixed some error handling that would not result into installer failure any more and would help us to catch the 
original issue.

Please run installer with "-J-Dservicetag.allow.create=true" argument and after installation is finished, please attach 
the last installation log from ~/.nbi/log directory.

Thanks,
Dmitry
Comment 12 Peter Pis 2008-12-10 14:09:38 UTC
*** Issue 155075 has been marked as a duplicate of this issue. ***
Comment 13 Marian Mirilovic 2009-01-12 12:19:37 UTC
verified
Comment 14 pgebauer 2009-01-12 15:10:42 UTC
The fix has been ported into the release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/ac51f2d0ed59


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo