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.
Summary: | Deadlock after call websvc operation from static client | ||
---|---|---|---|
Product: | webservices | Reporter: | Lukas Jungmann <jungi> |
Component: | Code | Assignee: | Martin Grebac <mgrebac> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | lkotouc |
Priority: | P1 | ||
Version: | 4.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
IDE log
thread dump Same stack trace, better formatting hopefully |
Description
Lukas Jungmann
2005-03-30 14:38:22 UTC
Created attachment 21223 [details]
IDE log
Created attachment 21224 [details]
thread dump
Forgot to mention that IDE was started with new userdir. Created attachment 21232 [details]
Same stack trace, better formatting hopefully
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. 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. Martin, can you pick this up, or I can fix it if you don't have the bandwidth. Let me know. I'll take care of it. I changed the conditions at last time and forgot to correctly care of closing transactions. *** Issue 57212 has been marked as a duplicate of this issue. *** 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 v. 200504031800 |