users@woodstock.java.net

Re: Missing Body Element errors with 6.1 RC1

From: tonyweb <tonyweb_mail_at_yahoo.it>
Date: Sun, 13 Apr 2008 00:10:41 -0700 (PDT)

Felipe Jaekel (FkJ) wrote:
>
> I'm getting Missing Body Element errors with 6.1 RC1.
>
> The workaround mentioned
> here<http://www.netbeans.org/community/releases/61/relnotes.html#known_issues-web-java>is
> switch to default theme, but I'm not using a custom theme, the page
> was
> created with 6.0 using the default theme.
>
> Also, when I try to edit the JSP file of these pages, I get the following
> exception:
>
>> java.lang.IllegalStateException: Illegal source modification with dirty
>> model
>> /home/fkj/NetBeansProjects/PortalTecnico/web/pages/contatim/ImportacaoContaTIM.jsp
>> at
>> org.netbeans.modules.visualweb.insync.SourceUnit.setSourceDirty(SourceUnit.java:304)
>> at
>> org.netbeans.modules.visualweb.insync.SourceUnit.insertUpdate(SourceUnit.java:379)
>> at
>> org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:70)
>> at
>> javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
>> at
>> org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1398)
>> at
>> org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:645)
>> at
>> org.netbeans.editor.BaseKit$DefaultKeyTypedAction.insertString(BaseKit.java:1066)
>> at
>> org.netbeans.modules.web.core.syntax.JSPKit$JspDefaultKeyTypedAction.insertString(JSPKit.java:482)
>> at
>> org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1030)
>> at
>> org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1002)
>> at
>> org.netbeans.modules.web.core.syntax.JSPKit$JspDefaultKeyTypedAction.actionPerformed(JSPKit.java:454)
>> 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:5815)
>> at java.awt.Container.processEvent(Container.java:2058)
>> at java.awt.Component.dispatchEventImpl(Component.java:4410)
>> at java.awt.Container.dispatchEventImpl(Container.java:2116)
>> at java.awt.Component.dispatchEvent(Component.java:4240)
>> 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:4282)
>> at java.awt.Container.dispatchEventImpl(Container.java:2116)
>> at java.awt.Window.dispatchEventImpl(Window.java:2429)
>> at java.awt.Component.dispatchEvent(Component.java:4240)
>> [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
>> at
>> org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.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)
>>
>>
> Thanks for any help,
> Felipe
>
>


Hi Felipe.
The problem is NetBeans designer !

The "dirty model" means that some element in the *.JSP is not referenced in
the coupled *.java
OR, more frequently, is not inside the "<editor-fold desc="..."> ...
</editor-fold>" section managed by the designer.

I usually check for existence into *.java of all component which are on
*.jsp page .... and that *all of them* are created ( = new ... ) and
accessed ( getter & setters ) inside that "region".

Usually this fix the problem :)
Hope this helps.

Tony



-- 
View this message in context: http://www.nabble.com/Missing-Body-Element-errors-with-6.1-RC1-tp16631413p16656733.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.