Bug 233065 - Server not found error in Web service generation
Summary: Server not found error in Web service generation
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Andrew Mak CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard: PMC_approved
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-05-20 16:22 EDT by Andrew Mak CLA
Modified: 2008-06-04 11:28 EDT (History)
2 users (show)

See Also:
kathy: pmc_approved? (david_williams)
kathy: pmc_approved? (raghunathan.srinivasan)
kathy: pmc_approved? (naci.dai)
kathy: pmc_approved? (deboer)
kathy: pmc_approved? (neil.hauge)
kaloyan: pmc_approved+


Attachments
patch (3.15 KB, patch)
2008-05-20 17:08 EDT, Andrew Mak CLA
makandre: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mak CLA 2008-05-20 16:22:03 EDT
Steps:

1. Create a Tomcat 5.0 server instance.
2. Create a Tomcat 5.5 server runtime but do not create a server instance.
3. Try to generate a Web service targeted to Tomcat 5.5.

The wizard should create the Tomcat 5.5 server instance, however, it fails with the message:

    IWAB0212E Server was not found.

If step 1 is omitted, the scenario works fine.
Comment 1 Kathy Chan CLA 2008-05-20 16:45:24 EDT
Andrew, please investigate this problem.  Thanks!
Comment 2 Andrew Mak CLA 2008-05-20 16:48:31 EDT
This bug is likely introduced by fix for bug 220985.
Comment 3 Andrew Mak CLA 2008-05-20 17:08:03 EDT
Created attachment 101144 [details]
patch
Comment 4 Andrew Mak CLA 2008-05-20 17:28:06 EDT
Problem Summary:

The symptom is that if the user has any server instance in their workspace, and then they try to go through a Web service generation scenario targeting a different (not yet created) server, the Web service wizard will hit the error and cannot finish.

Workarounds:

The workarounds for this problem is to either delete the existing un-related server instance or to pre-create the server that's intended to be used.  Although these workarounds exist, they don't give a good user experience especially since this problem is a regression (introduced by bug 220985) from what the wizard previously did, which is to create the server for the user.

Fix:

Fix is simple, 1 line each for service and client scenarios.  In the fix for bug 220985, the code to create the server got misplaced in an else block.  This fix turns that else block into a if block that runs if there is no existing server corresponding to the target runtime.

Testing:

Tested both service and client scenarios.

Review:

Kathy, please review this fix.
Comment 5 Kathy Chan CLA 2008-05-20 18:42:24 EDT
Patch reviewed.  Thanks Andrew!

PMC, this is a regression from earlier WTP 3.0 driver, please approve for WTP 3.0 RC2.
Comment 6 Kaloyan Raev CLA 2008-05-21 09:03:37 EDT
Approved
Comment 7 Kathy Chan CLA 2008-05-21 09:29:49 EDT
Patch committed.  Will release to WTP 3.0 RC2 later once RC1 is declared.
Comment 8 Kathy Chan CLA 2008-05-22 14:22:15 EDT
Patch committed and released to HEAD for WTP 3.0 RC2 as v200805221441.
Comment 9 Andrew Mak CLA 2008-06-04 11:28:25 EDT
Verified on wtp-S-3.0RC3-20080529235434.