You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2012/12/19 16:58:31 UTC

svn commit: r1423909 - /airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java

Author: lahiru
Date: Wed Dec 19 15:58:30 2012
New Revision: 1423909

URL: http://svn.apache.org/viewvc?rev=1423909&view=rev
Log:
Fixing AIRAVATA-678. Fixing integration test failure

Modified:
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java

Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java?rev=1423909&r1=1423908&r2=1423909&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java Wed Dec 19 15:58:30 2012
@@ -451,11 +451,15 @@ public class WorkflowInterpretorSkeleton
         ArrayList<HostDescription> hostDescriptions = new ArrayList<HostDescription>();
         XMLStreamReader reader = null;
         try {
-            File fXmlFile = new File(url.getPath());
-            reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(fXmlFile));
+            if (url != null) {
+                reader = XMLInputFactory.newInstance().createXMLStreamReader(url.openStream());
+            } else {
+                throw new RuntimeException("Error retrieving host.xml file. Should reside in " +
+                        "$SERVER_HOME/webapps/axis2/WEB-INF/classes/host.xml");
+            }
         } catch (XMLStreamException e) {
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        } catch (FileNotFoundException e) {
+        } catch (IOException e) {
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         }
         StAXOMBuilder builder = new StAXOMBuilder(reader);