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 17319 - Exceptions at startup related to DTD_JavaLibrary
Summary: Exceptions at startup related to DTD_JavaLibrary
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-06 01:25 UTC by Torbjorn Norbye
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exceptions from Javadoc and Editor module (3.05 KB, text/plain)
2001-11-07 16:52 UTC, Tomas Hurka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2001-11-06 01:25:53 UTC
Every time I start NetBeans I get this exception at the console:

Mon Nov 05 17:18:50 PST 2001: java.lang.ClassNotFoundException: DTD_JavaLibrary
java.lang.ClassNotFoundException: DTD_JavaLibrary
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at org.openide.execution.NbClassLoader.findClass(NbClassLoader.java:151)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at org.openide.loaders.InstanceSupport.findClass(InstanceSupport.java:538)
        at
org.openide.loaders.InstanceSupport.instanceClass(InstanceSupport.java:131)
        at
org.openide.loaders.InstanceDataObject$Ser.instanceClass(InstanceDataObject.java:852)
        at org.openide.loaders.InstanceSupport.instanceOf(InstanceSupport.java:164)
        at
org.openide.loaders.InstanceDataObject$Ser.instanceOf(InstanceDataObject.java:879)
        at
org.openide.loaders.InstanceDataObject.instanceOf(InstanceDataObject.java:524)
[catch] at
org.openide.loaders.InstanceDataObject.createNodeDelegate(InstanceDataObject.java:434)
        at
org.openide.loaders.DataObject$PrimaryFileListener.run(DataObject.java:1051)
        at org.openide.util.Mutex.readAccess(Mutex.java:241)
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:246)
        at org.openide.loaders.DataNode$2.run(DataNode.java:490)
        at org.openide.util.Task.run(Task.java:152)
        at
org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)

I've tried cleaning out my user directory but that does not help

The problem seems to be that library.dtd in the java module looks like this:

<!-- Document type declaration for java library items -->

<!ELEMENT Library (Archive)>
<!ELEMENT Archive EMPTY>
<!ATTLIST Archive
    name CDATA #REQUIRED
>


Note - missing DTD headers.

In addition to adding headers, can you please tell me why NetBeans
is throwing exceptions here? Does it actually try to validate the
XML file? (That seems like a bad idea for performance reasons).

Also note that a similar problem exists for the javadoc module.
Please also fix that .dtd file (or transfer the bug to the right owner)
before marking it resolved.

Please see my nbdev post for more:
http://www.netbeans.org/servlets/ReadMsg?msgId=182777&listName=nbdev

(I would really like if somebody who knows what is going on can address
the end of the e-mail - why my javadoc mounts fail, but that is not the
subject of this bug).
Comment 1 Svata Dedic 2001-11-06 15:37:15 UTC
Tor, can you tell me what version of IDE is causing you this ? Even
better, can you attach the ide.log from the last IDE session ? Thanks.
Comment 2 Torbjorn Norbye 2001-11-06 17:38:52 UTC
This is from a fresh CVS build (I did a cvs bringover this morning
9pm PDT and did a clean followed by a build. I have up to date
extra binaries).
Comment 3 Torbjorn Norbye 2001-11-06 17:39:30 UTC
Here's my log:
-------------------------------------------------------------------------------
>Log Session: Tuesday, November 6, 2001 9:35:00 AM PST
>System Info: 
  Product Version       = NetBeans IDE, Development Version (Build
200111060827)
  IDE Versioning        = IDE/1 spec=1.43 impl=200111060827
  Operating System      = SunOS version 5.8 running on sparc
  Java; VM; Vendor      = 1.3.1_01; Java HotSpot(TM) Client VM
1.3.1_01; Sun Microsystems Inc.
  Java Home             = /local/jvm/j2sdk1_3_1_01/jre
  System Locale         = en
  Home Dir; Current Dir = /home/tor; /local/ws/demo_ws
  IDE Install; User Dir = /local/ide/cvs/nbbuild/netbeans;
/home/tor/nbuser30
  CLASSPATH             =
/local/ide/cvs/nbbuild/netbeans/lib/patches/openide-compat.jar:/local/ide/cvs/nbbuild/netbeans/lib/core.jar:/local/ide/cvs/nbbuild/netbeans/lib/openide.jar:/local/ide/cvs/nbbuild/netbeans/lib/ext/crimson.jar:/local/ide/cvs/nbbuild/netbeans/lib/ext/jh.jar:/local/ide/cvs/nbbuild/netbeans/lib/ext/regexp.jar:/local/ide/cvs/nbbuild/netbeans/lib/ext/rmi-ext.jar:/local/ide/cvs/nbbuild/netbeans/lib/ext/terminalemulator.jar:/local/ide/cvs/nbbuild/netbeans/lib/ext/xerces.jar:/local/jvm/current/lib/dt.jar:/local/jvm/current/lib/htmlconverter.jar:/local/jvm/current/lib/tools.jar
-------------------------------------------------------------------------------
Existing modules:
	Ant [org.apache.tools.ant.module/2 2.7 200111060827]
	Applet [org.netbeans.modules.applet/1 1.7 200111060827]
	Auto Update [org.netbeans.modules.autoupdate/1 1.7 200111060827]
	Bean Patterns [org.netbeans.modules.beans/1 1.7 200111060827]
	Built-in CVS Client [org.netbeans.modules.cvsclient/1 1.4 200111060827]
	C, C++ and Fortran Editor Support [org.netbeans.modules.cpp.editor/1
1.0 ${buildnumber}]
	CVS Command-Line Client Support Converter
[org.netbeans.modules.vcs.cmdline.compat/1 1.0 200111060827]
	Editor [org.netbeans.modules.editor/1 1.8 200111060827]
	Editor Chooser [org.netbeans.modules.externaleditor.editorchooser/1 1.0
200110021120]
	External Editor Support [org.netbeans.modules.externaleditor 0.5
200110161106]
	External HTML Browser [org.netbeans.modules.extbrowser/1 0.3 200111060827]
	Form Editor [org.netbeans.modules.form/2 1.7 200111060827]
	Forte Developer C/C++/Fortran Support [com.sun.forte.developer.ipe/1
0.5 Forte Developer 7 C/C++/Fortran Support 1.0 Preview1 2001/11/06]
	Forte Developer C/C++/Fortran Support [org.netbeans.modules.cpp/1 1.0
200111060848]
	General Online Help [org.netbeans.modules.usersguide/1 1.8 200111060827]
	HTML [org.netbeans.modules.html/1 1.8 200111060827]
	HTTP Server [org.netbeans.modules.httpserver/1 1.7 200111060827]
	IDE Core [org.netbeans.core/1 1.1]
	Image [org.netbeans.modules.image/1 1.7 200111060827]
	Internationalization [org.netbeans.modules.i18n/1 1.9 200111060827]
	Internationalization of Form [org.netbeans.modules.i18n.form/2 1.8
200111060827]
	JAR Packager [org.netbeans.modules.jarpackager/2 1.9 200111060827]
	JNDI [org.netbeans.modules.jndi/1 1.4 200111060827]
	JPDA Debugger [org.netbeans.modules.debugger.jpda/1 1.9 200111060827]
	JSP Syntax Coloring [org.netbeans.modules.web.core.syntax/1 1.5
200111060827]
	JSP/Servlet [org.netbeans.modules.web.core/1 1.5 200111060827]
	Java Source Files [org.netbeans.modules.java/1 1.7 200111060827]
	Javadoc [org.netbeans.modules.javadoc/1 1.7 200111060827]
	New Module Wizard [org.netbeans.modules.apisupport.lite/1 0.2 200111060827]
	Projects [org.netbeans.modules.projects/1 1.7 200111060827]
	RMI [org.netbeans.modules.rmi/1 1.4 200111060827]
	Resource Bundle Syntax Coloring
[org.netbeans.modules.properties.syntax/1 1.7 200111060827]
	Resource Bundles [org.netbeans.modules.properties/1 1.7 200111060827]
	Scripting Support [org.netbeans.modules.scripting/1 1.4 200111060827]
	Sourceless Java Classes [org.netbeans.modules.clazz/1 1.8 200111060827]
	Text [org.netbeans.modules.text/1 1.7 200111060827]
	Tomcat 3.2 Server [org.netbeans.modules.web.tomcat/1 1.3 200111060827]
	Tools Debugger [org.netbeans.modules.debugger.debug/1 1.9 200111060827]
	User Utilities [org.netbeans.modules.utilities/1 1.7 200111060827]
	VCS Generic Command-Line Support [org.netbeans.modules.vcs.advanced/1
1.5 200111060827]
setDebug: false
*********** Exception occurred ************
Tue Nov 06 09:36:24 PST 2001: java.lang.ClassNotFoundException:
DTD_JavadocLibrary
java.lang.ClassNotFoundException: DTD_JavadocLibrary
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at org.openide.execution.NbClassLoader.findClass(NbClassLoader.java:151)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
	at org.openide.loaders.InstanceSupport.findClass(InstanceSupport.java:537)
	at
org.openide.loaders.InstanceSupport.instanceClass(InstanceSupport.java:131)
	at
org.openide.loaders.InstanceDataObject$Ser.instanceClass(InstanceDataObject.java:852)
	at org.openide.loaders.InstanceSupport.instanceOf(InstanceSupport.java:164)
	at
org.openide.loaders.InstanceDataObject$Ser.instanceOf(InstanceDataObject.java:879)
	at
org.openide.loaders.InstanceDataObject.instanceOf(InstanceDataObject.java:524)
[catch] at
org.openide.loaders.InstanceDataObject.createNodeDelegate(InstanceDataObject.java:434)
	at
org.openide.loaders.DataObject$PrimaryFileListener.run(DataObject.java:1051)
	at org.openide.util.Mutex.readAccess(Mutex.java:241)
	at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:246)
	at org.openide.loaders.DataNode$2.run(DataNode.java:490)
	at org.openide.util.Task.run(Task.java:152)
	at
org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)
*********** Exception occurred ************
Tue Nov 06 09:36:33 PST 2001: java.lang.ClassNotFoundException:
DTD_JavaLibrary
java.lang.ClassNotFoundException: DTD_JavaLibrary
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at org.openide.execution.NbClassLoader.findClass(NbClassLoader.java:151)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
	at org.openide.loaders.InstanceSupport.findClass(InstanceSupport.java:537)
	at
org.openide.loaders.InstanceSupport.instanceClass(InstanceSupport.java:131)
	at
org.openide.loaders.InstanceDataObject$Ser.instanceClass(InstanceDataObject.java:852)
	at org.openide.loaders.InstanceSupport.instanceOf(InstanceSupport.java:164)
	at
org.openide.loaders.InstanceDataObject$Ser.instanceOf(InstanceDataObject.java:879)
	at
org.openide.loaders.InstanceDataObject.instanceOf(InstanceDataObject.java:524)
[catch] at
org.openide.loaders.InstanceDataObject.createNodeDelegate(InstanceDataObject.java:434)
	at
org.openide.loaders.DataObject$PrimaryFileListener.run(DataObject.java:1051)
	at org.openide.util.Mutex.readAccess(Mutex.java:241)
	at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:246)
	at org.openide.loaders.DataNode$2.run(DataNode.java:490)
	at org.openide.util.Task.run(Task.java:152)
	at
org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:622)
Comment 4 Torbjorn Norbye 2001-11-06 17:44:52 UTC
Note by the way that the javadoc library warning is because my
layer file contains a Javadoc mount (as described in the e-mail
referenced earlier in this bug report) - however, the javalibrary
warning occurs even if I remove my own javadoc mount.
Comment 5 Tomas Hurka 2001-11-07 16:52:50 UTC
Created attachment 3301 [details]
Exceptions from Javadoc and Editor module
Comment 6 Tomas Hurka 2001-11-07 17:29:58 UTC
I don't understand, why this is P2 issue.

Tor, to answer your questions:
1. AFAIK DTD header is not mandatory 
2. XML files are not validated

Comment 7 Torbjorn Norbye 2001-11-07 18:13:55 UTC
I was under the impressions that exceptions thrown at startup
are really bad, that's why I filed it as a P2 bug. 

If we -don't- validate the XML files, why is it looking at the
DTD file at all???  That still seems like a bad thing to do
for performance reasons. It shouldn't care about the DTD at all
- it shouldn't have to exist! The fact that it's reading it means
we're doing unnecessary work. Since XML files are all over NetBeans,
this seems like a significant thing to look into for performance
work.

Who can I talk to about the javadoc problem (the directory not
getting mounted) ?  Should I just file a bug?
Comment 8 Tomas Hurka 2001-11-07 18:18:42 UTC
exception fixed in trunk for java, javadoc, editor modules
Comment 9 Tomas Hurka 2001-11-09 17:37:04 UTC
The exception is thrown only with your C, C++ and Fortran Editor
Support installed. So it only affect few people and AFAIK does not
affect functionality of IDE.  I don't know why this exception occurs
only with your module. 
It does not look for DTD file at all. How do you came to this
concussion? 
For your javadoc problem, see issue #17355 - now you should get more
information, why your directory was not mounted.
Comment 10 Svata Dedic 2001-11-09 17:50:10 UTC
Oops, I promised to comment on this issue :-( sorry, Tomas.
The assumption that the exception comes from XML processing is wrong
:-) The parser the IDE uses is really non-validating. What happened
is, that somehow a setting for "show files extensions" in system
settings was touched (maybe it was just read from the disk) The setter
locates all live DataObjects, grabs their nodes - and tries to update
their appearance.
BUT there was an error in the XML layer - instanceCreate attribute was
there, which allowed to create instance of DTD_JavaLibrary handler,
but instanceClass attribute, which would yield type of the
to-be-created object was not there. In that case, InstanceDataObject
derives the desired class name from the filename.
And that's it. We've added the instanceClass attribute.
Comment 11 Jan Becicka 2002-01-09 12:31:47 UTC
V
Comment 12 Quality Engineering 2003-07-01 13:19:32 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.