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 57202 - Deadlock after call websvc operation from static client
Summary: Deadlock after call websvc operation from static client
Status: CLOSED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Martin Grebac
URL:
Keywords:
: 57212 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-30 14:38 UTC by Lukas Jungmann
Modified: 2006-03-24 13:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (10.13 KB, text/plain)
2005-03-30 14:39 UTC, Lukas Jungmann
Details
thread dump (17.65 KB, text/plain)
2005-03-30 14:41 UTC, Lukas Jungmann
Details
Same stack trace, better formatting hopefully (17.47 KB, text/plain)
2005-03-30 16:53 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2005-03-30 14:38:22 UTC
[build 200503291800]

- have web application with websvc

1. create new web app project
2. create new web svc client
    - type: JAXRPC static stub
3. create new servlet
4. go to servlet's processRequest method and invoke Web Service Client Resources
| Call web service operation

5. select some operation in dialog which appears after step 4. and press "OK" button

=> no code is generated into servlet

6. repeat step 4

=> deadlock
Comment 1 Lukas Jungmann 2005-03-30 14:39:09 UTC
Created attachment 21223 [details]
IDE log
Comment 2 Lukas Jungmann 2005-03-30 14:41:04 UTC
Created attachment 21224 [details]
thread dump
Comment 3 Lukas Jungmann 2005-03-30 14:46:55 UTC
Forgot to mention that IDE was started with new userdir.
Comment 4 Petr Jiricka 2005-03-30 16:53:36 UTC
Created attachment 21232 [details]
Same stack trace, better formatting hopefully
Comment 5 Petr Jiricka 2005-03-30 16:57:00 UTC
Possibly a Java module issue. Java team, could you please look at this, or
assign to the appropriate owner if this is not your issue? Thanks.
Comment 6 Martin Matula 2005-03-31 07:25:07 UTC
Websvc code did not end the MDR transaction. PLEASE BE VERY CAREFUL ABOUT THIS!
USE try {} finally {} PATTERN VERY STRICTLY AS BUGS LIKE THIS ARE HARD TO FIND
AND BLOCK THE WHOLE IDE!
From what the user described, no code was generated from the first invocation of
InvokeOperationAction - i.e. something went wrong in this action. I found the
following code on line 379:

        repository.beginTrans(true); // create transaction for adding delegate
methods

        if (stubType == null) {
            errors.add(NbBundle.getMessage(InvokeOperationAction.class,
"ERR_CannotDeterminedStubType", serviceName)); // NOI18N
        } else if (StubDescriptor.JSR109_CLIENT_STUB.equals(stubType.getName()))
{        // add service and port delegate methods
try {
....
} finally { endTrans()}
...
}

As you can see, if stubType == null the transaction is never released. It is
never released also if errors.add fails (errors == null), NbBundle.getMessage()
fails (e.g. MissingResourceException), or stubType.getName() fails. beginTrans
must always be *immediately* followed by try-finally!
Reassigning back to websvc.
Comment 7 _ pcw 2005-03-31 07:37:35 UTC
Martin, can you pick this up, or I can fix it if you don't have the bandwidth. 
Let me know.
Comment 8 Martin Grebac 2005-03-31 08:30:10 UTC
I'll take care of it. I changed the conditions at last time and forgot to
correctly care of closing transactions.
Comment 9 Martin Grebac 2005-03-31 10:24:59 UTC
*** Issue 57212 has been marked as a duplicate of this issue. ***
Comment 10 Martin Grebac 2005-03-31 21:31:03 UTC
Fixed in trunk:
Checking in InvokeOperationAction.java;
/cvs/websvc/core/src/org/netbeans/modules/websvc/core/client/actions/InvokeOperationAction.java,v
 <--  InvokeOperationAction.java
new revision: 1.11; previous revision: 1.10
done
Comment 11 Lukas Jungmann 2005-04-03 23:05:49 UTC
v. 200504031800