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

Bug 322074

Summary: UnknownHostException during export
Product: z_Archived Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: LibraAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:
Attachments:
Description Flags
Proposed fix kaloyan: iplog+

Description Rüdiger Herrmann CLA 2010-08-08 06:29:12 EDT
During export, several UnknownHostExceptions occur. It seems that the way the sourceFileUrl gets built isn't Windows-friendly.
Furthermore, the exception gets silently caught and a WAR Product is created that isn't functioning. Before solving the UnknownHostException I strongly recommend to rethink exception handling. The WAR Product Export should fail in such a case.


--- Stacktrace ---
java.net.UnknownHostException: C
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
	at java.net.Socket.connect(Socket.java:464)
	at java.net.Socket.connect(Socket.java:414)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
	at sun.net.NetworkClient.openServer(NetworkClient.java:118)
	at sun.net.ftp.FtpClient.openServer(FtpClient.java:423)
	at sun.net.ftp.FtpClient.<init>(FtpClient.java:692)
	at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:175)
	at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:257)
	at java.net.URL.openStream(URL.java:913)
	at org.eclipse.rap.warproducts.core.WARProductExportOperation.createWarContent(WARProductExportOperation.java:307)
	at org.eclipse.rap.warproducts.core.WARProductExportOperation.prepareWARFile(WARProductExportOperation.java:252)
	at org.eclipse.rap.warproducts.core.WARProductExportOperation.handleRootFiles(WARProductExportOperation.java:242)
	at org.eclipse.rap.warproducts.core.WARProductExportOperation.createBuildPropertiesFile(WARProductExportOperation.java:225)
	at org.eclipse.rap.warproducts.core.WARProductExportOperation.run(WARProductExportOperation.java:143)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Rüdiger Herrmann CLA 2010-08-08 11:14:09 EDT
Created attachment 176112 [details]
Proposed fix

From a first glance the changes seem to solve the problem but I cannot verify that the unit tests pass (see bug 322080)
Comment 2 Holger Staudacher CLA 2010-08-09 15:32:54 EDT
Thanks for the patch. I changed a few things but the solution is the same. All tests pass on the good old Mac and on Windows. Fixed in CVS HEAD.