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 118646 - REGRESSION: IllegalStateException while trying to bind database table to table component in visual web
Summary: REGRESSION: IllegalStateException while trying to bind database table to tabl...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords: REGRESSION
: 117147 118163 118756 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-12 01:49 UTC by _ deva
Modified: 2009-08-27 07:25 UTC (History)
12 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception stack trace (12.08 KB, application/octet-stream)
2007-10-12 01:49 UTC, _ deva
Details
Detailed lexer log with the exception at the end (330.21 KB, text/plain)
2007-10-12 13:53 UTC, Vitezslav Stejskal
Details
exception occurs when refreshing the page (14.71 KB, text/plain)
2007-10-17 03:03 UTC, John Baker
Details
messages.log (143.41 KB, text/plain)
2007-10-17 03:04 UTC, John Baker
Details
build 1108 log (78.42 KB, text/plain)
2007-11-08 22:38 UTC, Lark Fitzgerald
Details
stacktrace (4.88 KB, text/plain)
2008-11-02 18:54 UTC, Maksim Khramov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ deva 2007-10-12 01:49:14 UTC
If you follow these steps with recent build
1) Create a new visual web project
2) Add a table component onto the designer
3) Expand the services node, connect to any of the database(password is same as the user name)
4) Drop a database table onto the table component dropped in step 2

You'll see the attached exception. Unfortunately, you may not see in the console since it is being swallowed

If you do not see the exception, try to delete the table component

This used to work perfectly alright, do not know exactly when this started hapenning
Comment 1 _ deva 2007-10-12 01:49:58 UTC
Created attachment 50759 [details]
Exception stack trace
Comment 2 Winston Prakash 2007-10-12 02:11:14 UTC
Aha!, that is why the added component tags are not showing up
in the JSP. This is certainly P1 for visualweb and very critical
for us to have quick fix. A real blocker.
Comment 3 Miloslav Metelka 2007-10-12 11:21:20 UTC
There is certainly an error since some token lists are tripled in the TokenListList. I'll try to reproduce and fix.
Comment 4 Vitezslav Stejskal 2007-10-12 13:53:57 UTC
Created attachment 50817 [details]
Detailed lexer log with the exception at the end
Comment 5 John Baker 2007-10-12 20:51:49 UTC
*** Issue 118756 has been marked as a duplicate of this issue. ***
Comment 6 John Baker 2007-10-13 06:56:06 UTC
Data binding is broken in visual web
Comment 7 Miloslav Metelka 2007-10-16 12:19:37 UTC
It should be fixed. There was a problem of marking removed token lists in a TokenListList structure. During the search
for the problem I have also improved consistency checking of the token hierarchy and its updating process.

Checking in TokenHierarchyOperation.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenHierarchyOperation.java,v  <--  TokenHierarchyOperation.java
new revision: 1.26; previous revision: 1.25
done
Checking in TokenHierarchyUpdate.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenHierarchyUpdate.java,v  <--  TokenHierarchyUpdate.java
new revision: 1.10; previous revision: 1.9
done
Checking in TokenListList.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenListList.java,v  <--  TokenListList.java
new revision: 1.13; previous revision: 1.12
Comment 8 Petr Blaha 2007-10-16 12:23:33 UTC
Alex, please verify this bug today in trunk. Thanks, Petr
Comment 10 _ alexpetrov 2007-10-16 15:02:20 UTC
Verified on the latest trunk build (http://deadlock.netbeans.org/hudson/job/trunk/3985/):
Product Version: NetBeans IDE Dev (Build 071016)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86
Comment 11 Petr Blaha 2007-10-16 15:17:00 UTC
Milo, please merge the fix in beta2 branch. Thanks, Petr
Comment 12 Winston Prakash 2007-10-16 15:18:00 UTC
This was a problem in beta2 branch also. Was it fixed there?
Comment 13 Miloslav Metelka 2007-10-16 16:49:42 UTC
*** Issue 117147 has been marked as a duplicate of this issue. ***
Comment 14 John Baker 2007-10-17 03:02:29 UTC
visualweb Data binding needs to be tested.

I'm still seeing lexer errors using the 0710160000 nightly build

Here's a use case to test
1) Create new web application using the Visual Web JavaServer Faces framework
2) From the Palette, drag and drop a Table component
3) In the Services tab, connect to Travel, expand and drag and drop the TRIP table onto the Table component
4) Save-all then close the page or refresh the page using the refresh button near the top of the page

Get lexer exceptions
see attachment
Comment 15 John Baker 2007-10-17 03:03:13 UTC
Created attachment 51086 [details]
exception occurs when refreshing the page
Comment 16 John Baker 2007-10-17 03:04:25 UTC
Created attachment 51087 [details]
messages.log
Comment 17 John Baker 2007-10-17 07:53:33 UTC
It seems that the build I was using, 0710160000 did not contain the fix for this issue.

After updating the sources and building, binding is working fine, thanks
Comment 18 brettbergquist 2007-10-17 12:51:42 UTC
*** Issue 117147 has been marked as a duplicate of this issue. ***
Comment 19 Miloslav Metelka 2007-10-17 16:10:27 UTC
Integrated in release60_beta2 branch.
Checking in lexer/src/org/netbeans/lib/lexer/TokenHierarchyOperation.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenHierarchyOperation.java,v  <--  TokenHierarchyOperation.java
new revision: 1.25.2.1; previous revision: 1.25
done
Checking in lexer/src/org/netbeans/lib/lexer/TokenHierarchyUpdate.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenHierarchyUpdate.java,v  <--  TokenHierarchyUpdate.java
new revision: 1.9.2.1; previous revision: 1.9
done
Checking in lexer/src/org/netbeans/lib/lexer/TokenListList.java;
/cvs/lexer/src/org/netbeans/lib/lexer/TokenListList.java,v  <--  TokenListList.java
new revision: 1.12.2.1; previous revision: 1.12
Comment 20 Martin Schovanek 2007-10-18 13:55:53 UTC
Alex, can you please verify this bug today in beta2 build?
Comment 21 _ alexpetrov 2007-10-18 14:58:20 UTC
Verified on
Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710172300)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86
Comment 22 _ deva 2007-10-23 23:59:31 UTC
*** Issue 119067 has been marked as a duplicate of this issue. ***
Comment 23 _ deva 2007-10-24 21:24:13 UTC
*** Issue 118163 has been marked as a duplicate of this issue. ***
Comment 24 rdelaplante 2007-10-30 18:57:32 UTC
Using build 200710291200 I got this exception
Comment 25 _ sandipchitale 2007-10-30 19:29:00 UTC
Which exception? Please attach the exception.

Are you seeing the same issue as:

http://www.netbeans.org/issues/show_bug.cgi?id=120458

?

Comment 26 _ alexpetrov 2007-10-30 20:04:50 UTC
I can't reproduced on (Derby, Glassfish V2, JavaEE 5/J2EE 1.4):
Product Version: NetBeans IDE Dev (Build 200710291200)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86

JSF component Table was bound to DB table properly.
Comment 27 Winston Prakash 2007-11-06 01:27:17 UTC
I'm reopening this bug. This has happened several times to me while I was editing JSP in the Visual Web.
Once happened, then anything I edit on the JSP, this exception dialog was poping up and the page gets 
screwed up.
Comment 28 Winston Prakash 2007-11-06 01:29:45 UTC
I'm using Hudson Build 4314. The problem is once this occurs, Visual Web modeling system
throws "Illegal modification while Source dirty" exception and whole page gets screwed up.
This leads to data loss.
Comment 29 Winston Prakash 2007-11-06 01:31:00 UTC
Look at the latest Exception I added for details.

http://statistics.netbeans.org/exceptions/detail.do?id=4496
Comment 30 Miloslav Metelka 2007-11-06 08:40:10 UTC
Sorry, but the particular build does not seem to contain the changes I have done in issue 120906 for some reason.
If I now simulate the exception it looks like this (note "ETL: <0,3>" instead of "range[...]" etc.):

Wishing to remove tokenList
ETL: <0,3> IHC=1977511
T[0]: <null-text> <0,1> TEXT[0] DefT, la=1, st=0, IHC=30533424
T[1]: <null-text> <1,3> BRACES[1] ProT, la=1, st=1, IHC=27334345

but marked-for-remove tokenList is 
ETL: <0,3> IHC=1977511
T[0]: <null-text> <0,1> TEXT[0] DefT, la=1, st=0, IHC=30533424
T[1]: <null-text> <1,3> BRACES[1] ProT, la=1, st=1, IHC=27334345

from tokenListList
TokenListList for text/x-join-sections-top/text/x-join-sections-text, joinSections
[0]: ETL: <0,3> IHC=1977511
, <--REMOVED-->
    T[0]: <null-text> <0,1> TEXT[0] DefT, la=1, st=0, IHC=30533424
    T[1]: <null-text> <1,3> BRACES[1] ProT, la=1, st=1, IHC=27334345
[1]: ETL: <7,10> IHC=14620722
...

I'm confident that the #120906 should eliminate this problem so I'm re-marking as fixed.
Comment 31 John Baker 2007-11-06 18:32:25 UTC
Does this fix need to be applied to the 6.0 branch also ?
Comment 32 _ alexpetrov 2007-11-06 18:49:59 UTC
According to this info (branch build == build 200711060000):
"Subject: Branching for release60
Date: Tue, 06 Nov 2007 18:14:59 +0100
From: Robert Novak <Robert.Novak@Sun.COM>
To: nb-tech <nb-tech@Sun.COM>

Branch is being created to timestamp 200711060000. Integrations done
after 00:00 GMT 11/06/2007 are not propagated to the branch.
The list of branched modules is attached."

I've tested DB area on the build #200711060000 today and 
this bug is not reproduced (Derby, Oracle, MySQL, PostrgreSQL).
Comment 33 Miloslav Metelka 2007-11-07 09:02:37 UTC
Right, both the original fix of this issue and fix of issue 120906 were done before release60 branching.
Comment 34 Lark Fitzgerald 2007-11-07 17:53:33 UTC
Reopening.  I ran automated tests last night using NB 200711060000 & woodstock B15 RC4 and have 1 serious and 
unexplained error with the staticText component. http://bsqe-giant.sfbay.sun.com/net/bsqe-
falcon/export/home3/falcon15/rave/automation/results/nb6/results.200711060000.EE5.B15_RC4/testrun_071106-
202058/testbag_6/htmlresults/suites/TEST-
org.netbeans.modules.visualweb.test.components.output.statictext.AcceptanceTest.html

The IDE log is here:
http://bsqe-giant.sfbay.sun.com/net/bsqe-
falcon/export/home3/falcon15/rave/automation/results/nb6/results.200711060000.EE5.B15_RC4/testrun_071106-
202058/testbag_6/sys/ide/messages.log

So far I have not been able to reproduce it manually.  Looks like this is still not fixed.
Comment 35 _ alexpetrov 2007-11-07 18:26:57 UTC
I checked this bug yesterday on NB 200711060000 and I've tried to reproduce it just now with Static Text 
(automatically and manually).
It's not reproduced for me.
Which version of Woodstock components was included into yesterday's build 200711060000?
Woodstock B15 RC4 or not?

And in my opinion results of manual testing have higher priority than results of automatic testing because 
automated tests are not always stable.
Comment 36 _ krystyna 2007-11-07 18:39:10 UTC
Looks like lexer errors in the log, not ISE. REeopen  #120906 ?
Comment 37 Lark Fitzgerald 2007-11-07 18:43:15 UTC
RC3 was included with build 200711060000 by default.  It is true that I can not reproduce this manually, and certainly 
not on demand.  I was asked to re-open this because other developers are seeing it also.
Comment 38 John Baker 2007-11-07 18:45:35 UTC
Please provide steps to reproduce before reopening, thanks!
Comment 39 Lark Fitzgerald 2007-11-07 18:53:54 UTC
Steps from automatin:
1. Start IDE (new userdir)
2. Create EE5 project
3. Drag/drop Basic > StaticText onto designer

Receive error.  I can not reproduce this.  I am re-running automation with today's bits.  I will mark this bug 
INCOMPLETE, and if I can not reproduce using automation. I will close this again.
Comment 40 Lark Fitzgerald 2007-11-08 01:52:31 UTC
Closing.  This was no longer reproducible in the run against 200711070000.
Comment 41 Lark Fitzgerald 2007-11-08 22:36:30 UTC
I just hit this again with today's build (200711080000) - log attached.  I can't reproduce it a second time.  Its 
definitely related to first drop.  I think its a race condition.  I think the component was dropped before the ide was 
really ready to accept it.
Comment 42 Lark Fitzgerald 2007-11-08 22:38:20 UTC
Created attachment 52762 [details]
build 1108 log
Comment 43 Miloslav Metelka 2007-11-11 22:51:25 UTC
I agree that this is a race condition since unlike the original problem (when the token list being removed was
physically located in the TokenListList but it could not be found by the binary search because the offsets were
incorrect) this time the token list being removed cannot be found in the TokenListList because there is an identical
token list created for the same bounds but it's a different instance (the identity-hash-code differs).
Is there a chance to reproduce with a reasonable number of attempts? Thanks.
Comment 44 Lark Fitzgerald 2007-11-13 14:21:34 UTC
Its very difficult to reproduce manually, but I did run into it twice when running automation against the EE4 
backwards compatibility kit on yesterday's (2007111207) RC1.

http://bsqe-giant.sfbay.sun.com/net/bsqe-
falcon/export/home3/falcon15/rave/automation/results/nb6/results.200711120000.EE4/testrun_071112-
120605/testbag_7/htmlresults/testbag.html

http://bsqe-giant.sfbay.sun.com/net/bsqe-
falcon/export/home3/falcon15/rave/automation/results/nb6/results.200711120000.EE4/testrun_071112-
180611/testbag_1/htmlresults/testbag.html

I didn't run into this error error at all with automation until 200711060000.  So far, it seems random.
Comment 45 jiai 2008-01-10 19:40:58 UTC
It isn't completely resolved - it happend again while editing a Bubble component, even with the current Woodstock 4.1.1
Netbeans update. See my Exception report for 4416.

Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1252; de_DE (nb)
Comment 46 jiai 2008-01-12 11:53:27 UTC
Sorry, but this bug isn't fixed, see exception report 4416

Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1252; de_DE (nb)

Comment 47 jiai 2008-01-12 11:56:25 UTC
Is it possible that this regression is reinduced by the recent JSF update and the woodstock 4.1.1 netbeans module?
Comment 48 Exceptions Reporter 2008-02-08 18:47:27 UTC
THIS ISSUE HAS ALREADY 50 DUPLICATES
Comment 49 Martin Schovanek 2008-02-11 11:05:12 UTC
The message which mentions the 50 duplicates comes from issue #118163 which is closed as duplicate of this issue. But by
the users comments it looks like more general problem that a issue at database table to table component binding. Can
some one from development evaluate the users reports attached to the duplicates: ( Issue #118756 and Issue #118163 ) ?

I cannot reproduce on Nb 6.1 #200802080008 with WS 4.2 Build2_RC1.

Jiai, please can you please try to reproduce with WoodStock 4.2 Build2 netbeans module? It should be released soon.
Comment 50 Winston Prakash 2008-02-11 14:41:49 UTC
This issue is mixture of too many unstable states earlier. It is impossible to discern the exact bug happening now from
the soup of information from issues #118163, #118756 and #118163. Instead of re-opening this issue it is better to file
another issue with exact informations.
Comment 51 Miloslav Metelka 2008-02-11 16:50:07 UTC
I completely agree with wjprakash to file a new issue since there were several bugfixes and rewrites of certain classes
since NB6.0 and I hope the issue is no longer relevant for NB6.1.
 So please test and possibly file against _NB6.1_ 
Thanks.
Comment 52 thompsonwd40 2008-08-05 19:05:09 UTC
[65cat] Using the most current build (0802), the automated issue log hyperlinks me to this issue, which is marked
resolved.  Is there any way to update the link to point to a more accurate, and open issue?
Comment 53 Exceptions Reporter 2008-10-10 16:28:23 UTC
Reopening - reproduced in NetBeans IDE 6.1 (Build 200805300101)
http://statistics.netbeans.org/exceptions/detail.do?id=126289
Comment 54 Miloslav Metelka 2008-10-13 10:26:04 UTC
This should already be fixed - it happens with older builds only (20080530 or builds from August) so exceptions_reporter
should not reopen this automatically => marking as fixed.
Comment 55 Exceptions Reporter 2008-10-29 15:00:32 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200810230201)
http://statistics.netbeans.org/exceptions/detail.do?id=133829
Comment 56 Maksim Khramov 2008-11-02 18:54:47 UTC
Build: NetBeans IDE Dev (Build 200809270201)
VM: Java HotSpot(TM) Client VM, 1.5.0_15-b04, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_15-b04
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.IllegalStateException: Illegal source modification with dirty model C:\Work Files\NetBeansProjects\WebApplication1\web\Page3.jsp
        at org.netbeans.modules.visualweb.insync.SourceUnit.setSourceDirty(SourceUnit.java:304)
        at org.netbeans.modules.visualweb.insync.SourceUnit.removeUpdate(SourceUnit.java:388)
        at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate(PriorityDocumentListenerList.java:99)
        at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:242)
        at org.netbeans.editor.BaseDocument.fireRemoveUpdate(BaseDocument.java:1617)
        at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:310)
Comment 57 Maksim Khramov 2008-11-02 18:54:53 UTC
Created attachment 73081 [details]
stacktrace
Comment 58 Jiri Prox 2008-11-05 10:38:44 UTC
This should already be fixed - I've reopened one of duplicates of this issue so this issue will not be reopened by
exception reported