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 26151 - More graceful recovery from missing module dirs than e.g. "IOException: Unrecognized origin: user"
Summary: More graceful recovery from missing module dirs than e.g. "IOException: Unrec...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 26049
  Show dependency tree
 
Reported: 2002-07-31 15:19 UTC by Jesse Glick
Modified: 2008-12-23 08:30 UTC (History)
8 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch (6.36 KB, patch)
2002-07-31 16:31 UTC, Jesse Glick
Details | Diff
exrg.xml.sax.SAXParseException stacktrace (1.74 KB, text/plain)
2002-08-06 10:42 UTC, pzajac
Details
ide.log (2.89 KB, text/plain)
2002-08-07 13:52 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-07-31 15:19:47 UTC
Issue #26049 has all the real details. This is a
tracking issue for the core enhancement.
Comment 1 Jesse Glick 2002-07-31 16:31:07 UTC
Created attachment 6967 [details]
Proposed patch
Comment 2 Jesse Glick 2002-07-31 16:39:53 UTC
This patch should replace a thrown exception like this:

[org.netbeans.core.modules] *********** Exception occurred
************ at Fri Jul 26 13:12:03 CEST 2002
Annotation: Error encountered while reading
Modules/org-netbeans-modules-xml-tools.xml
java.io.IOException: Unrecognized origin: user
	at org.netbeans.core.modules.ModuleList.findJarByName(ModuleList.java:407)
........

with a simple warning printed to console (or only log file, in a
release build):

Warning: the module xml-tools.jar could not be found since there is no
modules area "user", ignoring...

and deleting the obsoleted org-netbeans-modules-xml-tools.xml so that
it is regenerated with the correct contents on next start if there is
such a module in the new build, or if there is no such module any more
at all, the old XML file will just be gone in the new userdir (as it
should be).
Comment 3 Jesse Glick 2002-07-31 21:00:38 UTC
Fixed in the trunk, hoping to be able to merge to 3.4:

committed   * Up-To-Date  1.4         core/manifest.mf
committed   * Up-To-Date  1.8        
core/src/org/netbeans/core/modules/Bundle.properties
committed   * Up-To-Date  1.14       
core/src/org/netbeans/core/modules/Events.java
committed   * Up-To-Date  1.31       
core/src/org/netbeans/core/modules/ModuleList.java
committed   * Up-To-Date  1.24       
core/src/org/netbeans/core/modules/NbEvents.java
Comment 4 Jesse Glick 2002-08-05 17:25:59 UTC
Has anyone from QA looked at this? Please do so if not. I am hoping to
offer this as a safe workaround so #26049 does not need to be fixed in
the branch.
Comment 5 pzajac 2002-08-06 10:39:54 UTC
NetBeans IDE Dev (Build 200208060100)
This enhancment doesn't solve the problem. But there is not so much
exceptions and warnings on startup. It throws the exception on every
startup of IDE. Ide has imported settings form Nb 332 with xml modules. 

Comment 6 pzajac 2002-08-06 10:42:29 UTC
Created attachment 7021 [details]
exrg.xml.sax.SAXParseException stacktrace
Comment 7 Jesse Glick 2002-08-06 15:35:12 UTC
Marking as FIXED again for now because I think you are seeing
something else - please confirm, or reopen. The stack trace you show
re. GlobalJarFileSystem is something else entirely, some problem with
settings and/or the form module, unrelated to this (as far as I know).

"This enhancment doesn't solve the problem. But there is not so much
exceptions and warnings on startup." - not sure what this means
exactly. This patch only claims to avoid one exception, "IOException:
Unrecognized origin: user".

Again, I am unable to test the patch exactly as reported in issue
#26049 because I never get prompted to import settings from an
existing IDE installation when I run the installer. I did try to
simulate the effect of the installer bug:

1. Use a 3.3.2 install on a fresh user dir.

2. Download XML modules from AU in 3.3.2. Install them, then shut down.

3. Copy userdir to a new user dir. Remove lib/, modules/, updates/,
and update_tracking.xml, but leave system/ etc.

4. Run Dev 200208060100 on the new user dir.

Relevant parts of console log:

Warning: the module /tmp/netbeans/modules/toolsDebugger.jar could not
be found, ignoring...
Warning: the module xml-tax.jar could not be found since there is no
modules area "user/autoload", ignoring...
Warning: the module css.jar could not be found since there is no
modules area "user", ignoring...
Warning: the module xml-tools.jar could not be found since there is no
modules area "user", ignoring...
Warning: the module xml-core.jar could not be found since there is no
modules area "user", ignoring...
Warning: the module xml-tree-edit.jar could not be found since there
is no modules area "user", ignoring...
Warning: the module xml-catalog.jar could not be found since there is
no modules area "user", ignoring...
Warning: the module xml-text-edit.jar could not be found since there
is no modules area "user", ignoring...
Warning: the module xml-syntax.jar could not be found since there is
no modules area "user", ignoring...
Warning: the module xml.jar could not be found since there is no
modules area "user", ignoring...
New modules:
	org.netbeans.modules.css/1 [0.7 200208060100]
	org.netbeans.modules.xml.core/1 [0.7 200208060100]
	org.netbeans.modules.xml.tools/1 [0.7 200208060100]
	org.netbeans.modules.xml.catalog/1 [0.7 200208060100]
	org.netbeans.modules.xml.text/1 [0.7 200208060100]
	org.netbeans.modules.xml.tax/1 [0.7 200208060100]
	org.netbeans.modules.xml.tree/1 [0.7 200208060100]
	org.netbeans.modules.xml.editor.coloring/2 [0.7 200208060100]
	org.netbeans.modules.xml/2 [0.7 200208060100]
Installing new module: TAX Library
Installing new module: XML Core
Turning on modules:
.....
	org.netbeans.api.xml/1 [1.1 200208060100]
	org.netbeans.modules.xml.tax/1 [0.7 200208060100]
	org.netbeans.modules.xml.core/1 [0.7 200208060100]
	org.netbeans.modules.xsl/1 [0.7 200208060100]
.....
Installing new module: XML Entity Catalog
Installing new module: XML Productivity Tools
Installing new module: XML Text Editor
Installing new module: XML Tree Editor
Installing new module: CSS Support
Turning on modules:
	org.netbeans.modules.xml.catalog/1 [0.7 200208060100]
	org.netbeans.modules.xml.tools/1 [0.7 200208060100]
	org.netbeans.modules.xml.text/1 [0.7 200208060100]
.....
	org.netbeans.modules.xml.tree/1 [0.7 200208060100]
	org.netbeans.modules.css/1 [0.7 200208060100]
	org.netbeans.modules.xml/2 [0.7 200208060100]
	org.netbeans.modules.xml.editor.coloring/2 [0.7 200208060100]
Comment 8 pzajac 2002-08-07 09:51:44 UTC
You right. It doesn't seem as module problem. Your fix works well. I
cannot to reproduce my previous state of IDE. It was created XML  
file in examples folder. The DataObject was opened in editor.
Exception was raised on every start on Dev 200208060100.

DataObjectNotFoundException was now thrown only at the first start of
Dev 200208060100. No exception raised on second start. I think that
you can move this patch to NB34 branch too.  
Comment 9 pzajac 2002-08-07 13:50:31 UTC
I found other problem. I think that it isn't problem of this
workeround but we need next workeround or discuss about it on NBDEV
how do import settings.

 Steps to reproduce:
Install "cpp support" to  Nb332 build by autoupdate.  CLose Nb332 Ide.
 Try import setting from Nb332 user home to (Build 200208060100). 

Exception    java.util.MissingResourceException: Can't find bundle for
base name org.netbeans.modules.cpplite.Bundle, locale en_US trown on
every startup ide. Ide.log is in attachments. Cpp-lite.jar is
installed in ide (I saw it in modules node).

Comment 10 pzajac 2002-08-07 13:52:28 UTC
Created attachment 7035 [details]
ide.log
Comment 11 Jesse Glick 2002-08-07 14:53:16 UTC
Again a totally unrelated bug, issue #26244 (matched in core by issue
#26245). Marking fixed again. Next time please open a separate bug
report for unrelated problems unless there is some reason to believe
they really have the same cause; it is distracting to keep on changing
the status of this one.
Comment 12 Jan Chalupa 2002-08-07 15:24:46 UTC
It is my understanding that Jesse's patch does solve the problem it
was supposed to fix. No side effects directly related to this patch
have been reported. I suggest that the patch be integrated into the
release34 branch for RC2.

Any objections?
Comment 13 Jesse Glick 2002-08-07 16:32:56 UTC
Yarda could I get a code review of the attached patch? Thanks in advance.
Comment 14 jrojcek 2002-08-07 17:13:21 UTC
Jesse, we would like to test the patch also with release34 build. Is
it possible to apply the patch to release34? If not could you attach
also the patch against release34? Thank you.
Comment 15 Jesse Glick 2002-08-07 18:04:10 UTC
The attached patch ought to be applicable to release34 sources. Note
that the change to core/manifest.mf was already made in this branch so
it is redundant.
Comment 16 jrojcek 2002-08-07 18:07:46 UTC
Fine, we are preparing release34 installer build with applied patch
and will test soon.
Comment 17 jrojcek 2002-08-07 18:50:35 UTC
The patch was tested by Martin Schovanek with release34 installer
build and it worked correctly. Scenario with xml modules installed to
3.3.2 from autoupdate was used and 26049 bug symptoms were not visible.
Comment 18 Jan Chalupa 2002-08-09 16:21:44 UTC
Still not in release34. It's needed for RC2.
Comment 19 Jesse Glick 2002-08-09 22:59:10 UTC
Merged:

committed   * Up-To-Date  1.7.46.1   
core/src/org/netbeans/core/modules/Bundle.properties
committed   * Up-To-Date  1.13.46.1  
core/src/org/netbeans/core/modules/Events.java
committed   * Up-To-Date  1.29.8.1   
core/src/org/netbeans/core/modules/ModuleList.java
committed   * Up-To-Date  1.23.14.1  
core/src/org/netbeans/core/modules/NbEvents.java