Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353685

Summary: Connection error dialog is not displayed
Product: [Tools] Target Management Reporter: Masao Nishimoto <e03616>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: dmcknigh, immaneni, kjdoyle
Version: 3.2.2   
Target Milestone: 3.3.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 353827    
Attachments:
Description Flags
patch to deal with failed connection case
none
patch updated to display cleaner message
none
updated patch none

Description Masao Nishimoto CLA 2011-08-02 20:59:42 EDT
1. set wrong daemon port number
2. connect to the system from the context menu of the connection
3. -> The connection error dialog pops up. (This is ok.)
4. expand a filter
5. -> Nothing happens. (The connection error dialog should pop up.)

The subsystem does not support deferred queries.

The log is as follows.  SystemViewFilterReferenceAdapter.internalGetChildren() catches the exception and just logs it.

!MESSAGE Exception resolving filters' strings 
!STACK 0
org.eclipse.rse.services.clientserver.messages.SystemMessageException: Daemon failed to launch server on CTFMVS08.RTP.RALEIGH.IBM.COM using port 0
	at org.eclipse.rse.connectorservice.dstore.DStoreConnectorService.handleConnectionFailure(Unknown Source)
	at org.eclipse.rse.connectorservice.dstore.DStoreConnectorService.internalConnect(Unknown Source)
	at org.eclipse.rse.core.subsystems.AbstractConnectorService$1.run(Unknown Source)
	at org.eclipse.rse.core.subsystems.AbstractConnectorService$SafeRunner.run(Unknown Source)
	at org.eclipse.rse.core.subsystems.AbstractConnectorService.connect(Unknown Source)
	at org.eclipse.rse.core.subsystems.SubSystem.connect(Unknown Source)
	at com.ibm.ftt.rse.mvs.client.subsystems.MVSFileSubSystem.connect(Unknown Source)
	at org.eclipse.rse.core.subsystems.SubSystem.checkIsConnected(Unknown Source)
	at org.eclipse.rse.core.subsystems.SubSystem.resolveFilterStrings(Unknown Source)
	at org.eclipse.rse.internal.ui.view.SystemViewFilterReferenceAdapter.internalGetChildren(Unknown Source)
        :
Comment 1 David McKnight CLA 2011-08-03 14:06:42 EDT
Created attachment 200842 [details]
patch to deal with failed connection case

The fix for bug 288894 has the effect of swallowing the connection error message in this case.  I don't want to regress anything so I'd rather not undo that change.  One way to get the message is to attempt a connect after getChildren() returns null and the corresponding subsystem has been found to be disconnected.  Masao, could you try with this patch?
Comment 2 David McKnight CLA 2011-08-03 15:35:38 EDT
Created attachment 200850 [details]
patch updated to display cleaner message
Comment 3 David McKnight CLA 2011-08-03 16:37:30 EDT
Created attachment 200854 [details]
updated patch
Comment 4 Pavan Kumar Immaneni CLA 2011-08-03 16:41:14 EDT
I have tried the new patch (attachment 200850 [details]) provided by David and it works
like a charm.

1. I have tried to connect to the system from the context menu of the
connection with a wrong port number and got a connection error dialog. 
2. Tried to expand a filter at this point, and now I receive the same
connection error dialog as was seen on Step #1 above.

Thanks for the fix.
Comment 5 David McKnight CLA 2011-08-03 17:03:54 EDT
Xuan, could you please review the latest patch?
Comment 6 David McKnight CLA 2011-08-03 17:17:54 EDT
Kevin, could you please review this patch?
Comment 7 Kevin Doyle CLA 2011-08-04 10:01:54 EDT
Review +.
Comment 8 David McKnight CLA 2011-08-04 10:52:15 EDT
Thanks for the review Kevin.

I've opened bug 353901 so a more elegant solution to the connection error suppression issue can be revisited at a later time.