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 130270 - XML editor for own xml file type throws Exception/Assertion
Summary: XML editor for own xml file type throws Exception/Assertion
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker with 2 votes (vote)
Assignee: Samaresh Panda
Depends on:
Reported: 2008-03-17 11:24 UTC by mgoe
Modified: 2008-07-23 19:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Module suite project showing the issue. (5.52 KB, application/x-gzip)
2008-03-17 11:26 UTC, mgoe
Module suite project which does not show the issue. (6.85 KB, application/x-gzip)
2008-03-31 08:58 UTC, mgoe

Note You need to log in before you can comment on or make changes to this bug.
Description mgoe 2008-03-17 11:24:01 UTC
I used the tutorial to add a new xml based file type 
to my module suite project. According to the tutorial the module "XML Tools API" is needed. After adding this module 
as a dependency for my module and adding the module "XML Tools API" from cluster "ide9" to my module suite project I 
only got a simple text editor when opening an xml document conforming to my schema. After adding some additional (xml) 
modules from ide9 to my module suite project (btw.: How can I find out which modules are needed for a certain 
functionality?) I got an xml editor but the exceptions/assertions below are thrown when I try to modify my document.

java.lang.IllegalArgumentException: language cannot be null
	at org.netbeans.api.lexer.LanguagePath.embedded(
	at org.netbeans.api.lexer.LanguagePath.get(
	at org.netbeans.api.lexer.LanguagePath.get(
	at org.netbeans.modules.xml.text.indent.XMLIndentTask.getFormatter(
	at org.netbeans.modules.xml.text.indent.XMLIndentTask.reindent(
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(
	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(
	at org.netbeans.modules.editor.indent.IndentImpl.reindent(
	at org.netbeans.modules.editor.indent.FormatterImpl.indentLine(
	at org.netbeans.modules.editor.indent.FormatterImpl.indentNewLine(
	at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(
	at org.netbeans.editor.BaseAction.actionPerformed(
	at javax.swing.SwingUtilities.notifyAction(
	at javax.swing.JComponent.processKeyBinding(
	at javax.swing.JComponent.processKeyBindings(
	at javax.swing.JComponent.processKeyEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.KeyboardFocusManager.redispatchEvent(
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
[catch] at java.awt.EventQueue.dispatchEvent(
	at org.netbeans.core.TimeableEventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

	at org.netbeans.modules.xml.retriever.catalog.Utilities._getDocument(
	at org.netbeans.modules.xml.retriever.catalog.Utilities.access$000(
	at org.netbeans.modules.xml.retriever.catalog.Utilities$1.getLookup(
	at org.openide.util.lookup.SimpleProxyLookup.checkLookup(
	at org.openide.util.lookup.SimpleProxyLookup.lookup(
	at org.netbeans.modules.xml.schema.completion.CompletionQuery.getCompletionItems(
	at org.netbeans.modules.xml.schema.completion.CompletionQuery.query(
	at org.openide.util.RequestProcessor$
[catch] at org.openide.util.RequestProcessor$
Comment 1 mgoe 2008-03-17 11:26:23 UTC
Created attachment 58471 [details]
Module suite project showing the issue.
Comment 2 mgoe 2008-03-17 11:36:00 UTC
In order to reproduce the problem please run the attached module suite and open the file NameListTemplate.xml via:


After the editor has opened the document can be checked and validated with the toolbar buttons without errors. But 
trying to change the document (for example by hitting "enter" or adding a character) will throw the 
exceptions/assertions mentioned above. Sometimes the exception is thrown and sometimes the assertion.

Best regards,
Martin Goettlicher
Comment 3 mgoe 2008-03-31 08:55:29 UTC
While doing some further tests I found out that the problem disappears when I add some additional modules to the 
platform and set some additional module dependencies (which are not needed for compilation). I think the problem is 
that the module "XML Tools API" has some hidden dependencies. I will attach a second version of the module suite 
project which doesn't show the problem. So that with your knowledge of the code you can surely find out which 
additional compile time dependencies have to be set in the module mentioned above.

Best regards,
Martin Goettlicher
Comment 4 mgoe 2008-03-31 08:58:06 UTC
Created attachment 59384 [details]
Module suite project which does not show the issue.
Comment 5 Samaresh Panda 2008-07-23 19:20:39 UTC
Y, it gets tricky sometimes. There are some hidden run-time dependencies.