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.
I used the tutorial http://blogs.sun.com/geertjan/entry/integrating_the_xml_edior_for 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(LanguagePath.java:199) at org.netbeans.api.lexer.LanguagePath.get(LanguagePath.java:121) at org.netbeans.api.lexer.LanguagePath.get(LanguagePath.java:98) at org.netbeans.modules.xml.text.indent.XMLIndentTask.getFormatter(XMLIndentTask.java:75) at org.netbeans.modules.xml.text.indent.XMLIndentTask.reindent(XMLIndentTask.java:66) at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:502) at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:271) at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:232) at org.netbeans.modules.editor.indent.FormatterImpl.indentLine(FormatterImpl.java:138) at org.netbeans.modules.editor.indent.FormatterImpl.indentNewLine(FormatterImpl.java:133) at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:1141) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:290) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636) at javax.swing.JComponent.processKeyBinding(JComponent.java:2849) at javax.swing.JComponent.processKeyBindings(JComponent.java:2884) at javax.swing.JComponent.processKeyEvent(JComponent.java:2812) at java.awt.Component.processEvent(Component.java:5818) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4413) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4243) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:697) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:962) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:834) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:661) at java.awt.Component.dispatchEventImpl(Component.java:4285) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Window.dispatchEventImpl(Window.java:2440) at java.awt.Component.dispatchEvent(Component.java:4243) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimeableEventQueue.dispatchEvent(TimeableEventQueue.java:104) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) java.lang.AssertionError at org.netbeans.modules.xml.retriever.catalog.Utilities._getDocument(Utilities.java:529) at org.netbeans.modules.xml.retriever.catalog.Utilities.access$000(Utilities.java:104) at org.netbeans.modules.xml.retriever.catalog.Utilities$1.getLookup(Utilities.java:635) at org.openide.util.lookup.SimpleProxyLookup.checkLookup(SimpleProxyLookup.java:77) at org.openide.util.lookup.SimpleProxyLookup.lookup(SimpleProxyLookup.java:152) at org.netbeans.modules.xml.schema.completion.util.DefaultModelProvider.getCompletionModel(DefaultModelProvider.java:116) at org.netbeans.modules.xml.schema.completion.util.DefaultModelProvider.getModels(DefaultModelProvider.java:88) at org.netbeans.modules.xml.schema.completion.util.CompletionContextImpl.initModels(CompletionContextImpl.java:490) at org.netbeans.modules.xml.schema.completion.CompletionQuery.getCompletionItems(CompletionQuery.java:96) at org.netbeans.modules.xml.schema.completion.CompletionQuery.query(CompletionQuery.java:79) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Created attachment 58471 [details] Module suite project showing the issue.
In order to reproduce the problem please run the attached module suite and open the file NameListTemplate.xml via: Window->Favorites...suite11/NameList/src/org/yourorghere/namelist/NameListTemplate.xml 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
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
Created attachment 59384 [details] Module suite project which does not show the issue.
Y, it gets tricky sometimes. There are some hidden run-time dependencies.