Community
Participate
Working Groups
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)
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)
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.