airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1423909 - /airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java
Date Wed, 19 Dec 2012 15:58:31 GMT
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);



Mime
View raw message