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 129315 - Issue 128943 needs to be fixed properly
Summary: Issue 128943 needs to be fixed properly
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords: T9Y, TEST
: 129342 130081 (view as bug list)
Depends on: 130970
Blocks:
  Show dependency tree
 
Reported: 2008-03-05 16:17 UTC by Lukas Jungmann
Modified: 2008-03-30 20:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
fresh thread dump from the latest build (33.06 KB, text/plain)
2008-03-25 18:15 UTC, Lukas Jungmann
Details
log (44.20 KB, text/plain)
2008-03-26 00:00 UTC, Lukas Jungmann
Details
another jvm crash (62.68 KB, text/plain)
2008-03-26 00:10 UTC, Lukas Jungmann
Details
one more crash... (62.10 KB, text/plain)
2008-03-26 00:17 UTC, Lukas Jungmann
Details
jvm6 crash (76.35 KB, text/plain)
2008-03-26 00:34 UTC, Lukas Jungmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-03-05 16:17:23 UTC
This is to track the D'n'D locking issue and to provide better fix from issue 128943 for 6.1 FCS
Comment 1 Ayub Khan 2008-03-15 00:21:59 UTC
*** Issue 130081 has been marked as a duplicate of this issue. ***
Comment 2 Ayub Khan 2008-03-17 08:24:32 UTC
*** Issue 129342 has been marked as a duplicate of this issue. ***
Comment 3 Lukas Jungmann 2008-03-24 22:14:57 UTC
blocks test development (among other things) - there's still a lock after second drop.

Also following assertion is thrown by test from time to time:

ScanningCancellableTask.cancel: Not yet implemented
SEVERE [global]
java.lang.AssertionError: JavaSource.runCompileControlTask called under Document write lock.
        at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:601)
        at org.netbeans.api.java.source.SourceUtils.getMainClasses(SourceUtils.java:827)
        at
org.netbeans.modules.jemmysupport.runinternally.RunInternallyAction.getSelectedMainClass(RunInternallyAction.java:258)
        at org.netbeans.modules.jemmysupport.runinternally.RunInternallyAction.enable(RunInternallyAction.java:140)
        at org.openide.util.actions.NodeAction.isEnabled(NodeAction.java:202)
...
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at org.netbeans.jemmy.QueueTool$JemmyQueue.dispatchEvent(QueueTool.java:610)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
...
        at java.awt.Dialog.setVisible(Dialog.java:985)
        at org.netbeans.modules.websvc.saas.codegen.java.ProgressDialog.open(ProgressDialog.java:70)
        at org.netbeans.modules.websvc.saas.codegen.java.JaxRsEditorDrop.doHandleTransfer(JaxRsEditorDrop.java:166)
        at org.netbeans.modules.websvc.saas.codegen.java.JaxRsEditorDrop.handleTransfer(JaxRsEditorDrop.java:91)
        at org.openide.text.QuietEditorPane$DelegatingTransferHandler.importData(QuietEditorPane.java:249)
...
Comment 4 Ayub Khan 2008-03-25 07:08:02 UTC
Hi Lukas,

I am trying to reproduce with the latest trunk code, but couldn't see a single scanning message. I have tried 10 DnD now
manually. I have tried

All amazon services, some Facebook services, YouTube service.

Is there a reproducible test that I can run to address this issue.

Thanks
Ayub
Comment 5 Lukas Jungmann 2008-03-25 18:12:26 UTC
Adding Mila from editor team on cc. Mila, can I ask you to check also issue 128943, please. Thanks.


The test I have and which is still able to reproduce this do:
-create new web application
-create new RESTful service from patterns there
-d'n'd Services Tab -> WebServices -> Amazon -> S3 Service -> [/] -> getBuckets into created RESTful service

=> at this point there are 2 options of what will happen:
  1) there's a popup dialog asking user for input parameters for the service - in this case just click on OK
  2) there's a warning dialog with a "...Try again..." message - again just close it using OK button

-create new JSP page
-d'n'd Services Tab -> WebServices -> Amazon -> S3 Service -> [/] -> getBuckets into created JSP

=> lock, the only way to continue now is to kill the IDE 

the way how to run the test directly from the IDE and necessary setup is described at:
http://wiki.netbeans.org/WSTests#section-WSTests-RunningTests (look for RESTful section there) and/or
http://wiki.netbeans.org/WSTests#section-WSTests-HowDoIRunOnlyParticularFunctionalTestSuite
the test itself lives in websvc.restkit module -> func. test packages -> org.netbeans.modules.ws.qaf.saas.AmazonTest
Comment 6 Lukas Jungmann 2008-03-25 18:13:33 UTC
forgot to say that I can reproduce this on win as well as on linux
Comment 7 Lukas Jungmann 2008-03-25 18:15:09 UTC
Created attachment 59055 [details]
fresh thread dump from the latest build
Comment 8 Lukas Jungmann 2008-03-25 23:57:36 UTC
I've been just trying to verify issue 131100 and end up with a JVM crash on JDK 5 during drop, interesting...
Comment 9 Lukas Jungmann 2008-03-25 23:58:39 UTC
btw: the crash happened after pressing OK in "try again..." dialog
Comment 10 Lukas Jungmann 2008-03-26 00:00:37 UTC
Created attachment 59088 [details]
log
Comment 11 Lukas Jungmann 2008-03-26 00:10:42 UTC
Created attachment 59089 [details]
another jvm crash
Comment 12 Lukas Jungmann 2008-03-26 00:17:39 UTC
Created attachment 59090 [details]
one more crash...
Comment 13 Lukas Jungmann 2008-03-26 00:34:04 UTC
and now I've got crashing JDK 6.0_05 too... :-(
Comment 14 Lukas Jungmann 2008-03-26 00:34:51 UTC
Created attachment 59093 [details]
jvm6 crash
Comment 15 Ayub Khan 2008-03-26 04:10:02 UTC
This issue is fixed.

The issue with scanning and subsequent deadlock is due to invoking document.insertString, this step is necessary to insert 
the saas access code.

The fix is to: re-arrange the invocation, as I have noticed from JaxWSCodeGenerator, this issue never happens.
Comment 16 Miloslav Metelka 2008-03-26 10:04:22 UTC
Just to comment the thread dump: please note that the editor's paste action write-locks the document so you won't be
able to modify the document from another thread (in fact you should not even read it from another thread since you
should always read-lock the document prior accessing but you could relax this requirement for a specific case).
Comment 17 Lukas Jungmann 2008-03-30 20:53:47 UTC
v.