I have been experiencing problems editing JSP files from within the
NetBeans IDE.  Everytime I hit the Enter key to create a new line I get
an IllegalArgumentException dialog.  This occurs while modifying known
good JSP files that execute fine once deployed.  This behavior is in the
NetBeans applications latest *stable* release version 3.1-36.  This
problem is reproducible.

Has anyone else been experiencing this problem and/or have answers as to
why this is happening?  On a side note I get the same error on every
other JSP file I attempt to create a new line in using Forte for Java CE
2.0 on both the Win2000 and Win98 operating systems.

TIA

Jay

P.S. Here is the complete stack trace of the exception.

java.lang.IllegalArgumentException: Offset=0 >= tokenLength=0
        at

org.netbeans.editor.ext.FormatTokenPositionSupport.getTokenPosition(FormatTokenPositionSupport.java:70)
        at
org.netbeans.editor.ext.FormatWriter.getPosition(FormatWriter.java:721)
        at
org.netbeans.editor.ext.FormatSupport.getPosition(FormatSupport.java:233)
        at
org.netbeans.editor.ext.FormatSupport.getNextPosition(FormatSupport.java:254)
        at
org.netbeans.editor.ext.FormatSupport.getNextPosition(FormatSupport.java:327)
        at
org.netbeans.editor.ext.FormatSupport.findLineStart(FormatSupport.java:463)
        at
org.netbeans.editor.ext.FormatSupport.findLineFirstNonWhitespace(FormatSupport.java:517)
        at
org.netbeans.editor.ext.java.JavaFormatSupport.indentLine(JavaFormatSupport.java:662)
        at
org.netbeans.editor.ext.java.JavaFormatter$JavaLayer.format(JavaFormatter.java:137)
        at
org.netbeans.editor.ext.ExtFormatter.format(ExtFormatter.java:211)
        at
org.netbeans.editor.ext.FormatWriter.flush(FormatWriter.java:898)
        at
org.netbeans.editor.ext.FormatWriter.close(FormatWriter.java:962)
        at
org.netbeans.editor.ext.ExtFormatter.reformat(ExtFormatter.java:248)
        at
org.netbeans.editor.ext.ExtFormatter.indentNewLine(ExtFormatter.java:346)
        at
org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:742)
        at
org.netbeans.editor.ext.ExtKit$ExtInsertBreakAction.actionPerformed(ExtKit.java:801)
        at
org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:126)
        at
javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1702)
        at
javax.swing.JComponent.processKeyBinding(JComponent.java:2156)
        at
javax.swing.JComponent.processKeyBindings(JComponent.java:2182)
        at javax.swing.JComponent.processKeyEvent(JComponent.java:2119)
        at
javax.swing.JEditorPane.processKeyEvent(JEditorPane.java:1159)
        at java.awt.Component.processEvent(Component.java:3555)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2595)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2499)
        at
java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)
        at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:912)
        at java.awt.Component.dispatchEvent(Component.java:2499)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
        at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to