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 157599 - IllegalStateException: The model is not initialized or is broken.
Summary: IllegalStateException: The model is not initialized or is broken.
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: XDM (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ alexpetrov
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on: 190041
Blocks:
  Show dependency tree
 
Reported: 2009-01-29 10:38 UTC by Jaromir Uhrik
Modified: 2011-03-29 14:48 UTC (History)
13 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 145664


Attachments
stacktrace (1.84 KB, text/plain)
2009-01-29 10:38 UTC, Jaromir Uhrik
Details
stacktrace (1.84 KB, text/plain)
2009-03-15 18:16 UTC, sgtgarcia
Details
stacktrace (1.84 KB, text/plain)
2009-03-15 18:21 UTC, sgtgarcia
Details
stacktrace (3.27 KB, text/plain)
2009-10-23 18:04 UTC, neilg
Details
stacktrace (560 bytes, text/plain)
2009-11-01 00:34 UTC, _ tboudreau
Details
stacktrace (1.90 KB, text/plain)
2009-12-02 02:58 UTC, Alexander Permyakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2009-01-29 10:38:13 UTC
Build: NetBeans IDE Dev (Build 200901290450)
VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284
OS: Mac OS X, 10.5.6, i386

User Comments:
juhrik: Creating Maven Enterprise Application caused that the exception appeared.



Stacktrace: 
java.lang.IllegalStateException: The model is not initialized or is broken.
        at org.netbeans.modules.xml.xdm.XDMModel.checkStableOrParsingState(XDMModel.java:987)
        at org.netbeans.modules.xml.xdm.XDMModel.getDocument(XDMModel.java:829)
        at org.netbeans.modules.xml.xdm.nodes.NodeImpl.getNamespaceURI(NodeImpl.java:601)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.getQName(POMComponentFactoryImpl.java:63)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:81)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:51)
Comment 1 Jaromir Uhrik 2009-01-29 10:38:17 UTC
Created attachment 76333 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-03-15 18:13:28 UTC
This issue has already 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=145664
Comment 3 sgtgarcia 2009-03-15 18:16:10 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.27-13-generic, i386

User Comments: 
Editing Maven pom.xml file

Stacktrace: 
java.lang.IllegalStateException: The model is not initialized or is broken.
        at org.netbeans.modules.xml.xdm.XDMModel.checkStableOrParsingState(XDMModel.java:987)
        at org.netbeans.modules.xml.xdm.XDMModel.getDocument(XDMModel.java:829)
        at org.netbeans.modules.xml.xdm.nodes.NodeImpl.getNamespaceURI(NodeImpl.java:601)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.getQName(POMComponentFactoryImpl.java:63)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:81)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:51)
Comment 4 sgtgarcia 2009-03-15 18:16:32 UTC
Created attachment 78200 [details]
stacktrace
Comment 5 sgtgarcia 2009-03-15 18:21:00 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.27-13-generic, i386

User Comments: 
Editing Maven pom.xml with errors in it (file is not valid)

Stacktrace: 
java.lang.IllegalStateException: The model is not initialized or is broken.
        at org.netbeans.modules.xml.xdm.XDMModel.checkStableOrParsingState(XDMModel.java:987)
        at org.netbeans.modules.xml.xdm.XDMModel.getDocument(XDMModel.java:829)
        at org.netbeans.modules.xml.xdm.nodes.NodeImpl.getNamespaceURI(NodeImpl.java:601)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.getQName(POMComponentFactoryImpl.java:63)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:81)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:51)
Comment 6 sgtgarcia 2009-03-15 18:21:13 UTC
Created attachment 78201 [details]
stacktrace
Comment 7 _ alexpetrov 2009-07-15 20:41:25 UTC
I'm not able to reproduce this bug on NB release:

Product Version: NetBeans IDE Dev (Build 200907140201)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86

Editing of an invalid Maven pom.xml doesn't cause any exception now.
Comment 8 Jaromir Uhrik 2009-08-11 16:51:33 UTC
Verified in:
Product Version: NetBeans IDE Dev (Build 200908110201)
Java: 1.5.0_19; Java HotSpot(TM) Client VM 1.5.0_19-137
System: Mac OS X version 10.5.8 running on i386; MacRoman; en_US (nb)
Comment 9 neilg 2009-10-23 18:04:11 UTC
Build: NetBeans IDE 6.8 Beta (Build 200910212001)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.28-15-generic, amd64

User Comments: 


Stacktrace: 
java.lang.IllegalStateException: The model is not initialized or is broken.
        at org.netbeans.modules.xml.xdm.XDMModel.checkStableOrParsingState(XDMModel.java:987)
        at org.netbeans.modules.xml.xdm.XDMModel.getDocument(XDMModel.java:829)
        at org.netbeans.modules.xml.xdm.nodes.NodeImpl.getNamespaceURI(NodeImpl.java:601)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.getQName(POMComponentFactoryImpl.java:63)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:81)
        at org.netbeans.modules.maven.model.pom.impl.POMComponentFactoryImpl.create(POMComponentFactoryImpl.java:51)
Comment 10 neilg 2009-10-23 18:04:16 UTC
Created attachment 89998 [details]
stacktrace
Comment 11 neilg 2009-10-23 18:15:15 UTC
Re-opening as I got this exception in 6.8 beta when editing an invalid pom. It is an intermittent error.
Comment 12 Sergey Lunegov 2009-10-26 10:12:34 UTC
Please provide more exact steps to CONSTANTLY reproduce the problem.
Comment 13 neilg 2009-10-28 19:18:52 UTC
It is an intermittent problem so I'm not sure I can consistently reproduce it. Using mercurial to revert an invalid pom
file seems to have a reasonably high chance of triggering it in 200910260201.
Comment 14 _ tboudreau 2009-11-01 00:34:47 UTC
Build: NetBeans IDE Dev (Build 200910170201)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows Vista, 6.0, x86

User Comments: 
Expanded a layer.xml file inside an NBM in the files tab

Stacktrace: 
java.lang.AssertionError: AbstractFileObject@144ef7b[org/netbeans/modules/javacard/ri/platform/layer.xml]
        at org.netbeans.modules.apisupport.project.layers.LayerNode$LayerChildren$1.run(LayerNode.java:148)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 15 _ tboudreau 2009-11-01 00:34:52 UTC
Created attachment 90367 [details]
stacktrace
Comment 16 Exceptions Reporter 2009-11-30 08:55:57 UTC
This bug already has 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=145664
Comment 17 Sergey Lunegov 2009-12-01 06:30:03 UTC
I think the root cause of the problem is incorrect work of maven with XAM/XDM.
Comment 18 Milos Kleint 2009-12-01 07:38:45 UTC
sergey, can you be more specific what the incorrect use is? and what the message actually means?
is xam/xdm supposed to work on broken xml? how broken? how to figure up front the xml is broken and won't work?
Comment 19 Sergey Lunegov 2009-12-01 07:46:07 UTC
Milos, I don't have answers to your questions now. Hope to provide you some information soon.
Comment 20 _ alexpetrov 2009-12-01 09:45:15 UTC
The following fact is not quite clear to me :
the original bug is related to  IllegalStateException, but Comment #14 From _tboudreau   2009-11-01 00:34:47 says about java.lang.AssertionError.

In my opinion these exceptions/errors are different.
Why AssertionError was added to this issue?
Comment 21 Alexander Permyakov 2009-12-02 02:58:06 UTC
Created attachment 91976 [details]
stacktrace
Comment 22 Marian Mirilovic 2009-12-02 09:19:31 UTC
we are going to fix it in NB 6.8
Comment 23 Antonin Nebuzelsky 2009-12-03 03:02:20 UTC
> we are going to fix it in NB 6.8

Actually after an offline discussion of the issue, we agreed that this will be fixed only to trunk now and we will be watching for any regressions the fix might introduce. For 6.8 it is too risky and given the 50 duplicate reports were accumulated over long period of time, this is not considered a 6.8 stopper.
Comment 24 Quality Engineering 2009-12-03 04:52:07 UTC
Integrated into 'main-golden', will be available in build *200912030200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3dfb067533e2
User: Alex Petrov <alexpetrov@netbeans.org>
Log: Fix for issue [#157599]. IllegalStateException: The model is not initialized or is broken.
Comment 25 Sergey Lunegov 2009-12-03 05:01:59 UTC
Fixed in trunk