[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Tue May 27 20:08:38 UTC 2008


kawas
Tue May 27 16:08:37 EDT 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv11565/src/main/org/biomoby/service/dashboard

Modified Files:
	PerlMoSeSPanel.java 
Log Message:
*made commands that run on windows end in .bat
*added reading of input stream -- windows hung when it was ignored.
moby-live/Java/src/main/org/biomoby/service/dashboard PerlMoSeSPanel.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java	2008/05/27 17:25:17	1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java	2008/05/27 20:08:37	1.5
@@ -176,7 +176,6 @@
     private void check_install() {
 	String[] command;	
 	ArrayList<String> prefix = generatePerlPrefix();
-	
 	if (is_windows_pc) {
 	    prefix.add("moses-cache-tester.bat");
 	    command = prefix.toArray(new String[]{});
@@ -187,6 +186,12 @@
 	try {
 	    Process process;
 	    process = Runtime.getRuntime().exec(command);
+	    BufferedReader br = new BufferedReader(
+		    new InputStreamReader(process.getInputStream()));
+	    String line = null;
+	    while ((line = br.readLine()) != null) {
+		//System.out.println(line + System.getProperty("line.separator"));
+	    }
 	    process.waitFor();
 	    enable_moses_actions = true;
 	} catch (Exception e) {
@@ -809,7 +814,7 @@
 		    String s = (command.size() > 0 ? command.remove(command.size()-1) : "") ;
 		    
 		    // construct the command
-		    command.add(is_windows_pc ?  "moses-generate-datatypes"
+		    command.add(is_windows_pc ?  "moses-generate-datatypes.bat"
 			    : s + "moses-generate-datatypes.pl");
 		    command.add("-R");
 		    command
@@ -839,11 +844,11 @@
 
 		} catch (IOException ioe) {
 		    exception = new MobyException(
-			    "There was a problem synchronizing the datatype cache(x001):",
+			    "There was a problem synchronizing the datatype cache(x001):\n" + ioe.getMessage(),
 			    ioe);
 		} catch (InterruptedException ie) {
 		    exception = new MobyException(
-			    "There was a problem synchronizing the datatype cache(x002):",
+			    "There was a problem synchronizing the datatype cache(x002)\n: + ie.getMessage()",
 			    ie);
 		}
 		return null; // not used here
@@ -888,7 +893,7 @@
 		    command.addAll(generatePerlPrefix());
 		    String s = (command.size() > 0 ? command.remove(command.size()-1) : "") ;
 		    // construct the command
-		    command.add(is_windows_pc ?  "moses-generate-services"
+		    command.add(is_windows_pc ?  "moses-generate-services.bat"
 			    : s +  "moses-generate-services.pl");
 		    command.add("-R");
 		    command
@@ -918,11 +923,11 @@
 
 		} catch (IOException ioe) {
 		    exception = new MobyException(
-			    "There was a problem synchronizing the service cache(x001):",
+			    "There was a problem synchronizing the service cache(x001):\n" + ioe.getMessage(),
 			    ioe);
 		} catch (InterruptedException ie) {
 		    exception = new MobyException(
-			    "There was a problem synchronizing the service cache(x002):",
+			    "There was a problem synchronizing the service cache(x002):\n" + ie.getMessage(),
 			    ie);
 		}
 		return null; // not used here
@@ -969,7 +974,7 @@
 		    Process p;
 		    try {
 			// construct the command		
-			command.add(is_windows_pc ?  "moses-generate-services"
+			command.add(is_windows_pc ?  "moses-generate-services.bat"
 				:  s + "moses-generate-services.pl");
 			if (Boolean.parseBoolean(propertyChannel
 				.getString(PM_OVERWRITE)))
@@ -1004,11 +1009,11 @@
 		    } catch (IOException ioe) {
 			exception = new MobyException(
 				"There was a problem generating MoSeS skeletons for '"
-					+ authority + "'(x001):", ioe);
+					+ authority + "'(x001):\n" + ioe.getMessage(), ioe);
 		    } catch (InterruptedException ie) {
 			exception = new MobyException(
 				"There was a problem generating MoSeS skeletons for '"
-					+ authority + "'(x002):", ie);
+					+ authority + "'(x002):\n" + ie.getMessage(), ie);
 		    }
 		}
 		return null; // not used here
@@ -1066,7 +1071,7 @@
 		    Process p;
 		    try {
 			// construct the command
-			command.add(is_windows_pc ? "moses-generate-services"
+			command.add(is_windows_pc ? "moses-generate-services.bat"
 				: s + "moses-generate-services.pl");
 			if (Boolean.parseBoolean(propertyChannel
 				.getString(PM_OVERWRITE)))
@@ -1103,12 +1108,12 @@
 			exception = new MobyException(
 				"There was a problem generating service skeleton for service '"
 					+ name + "' provided by '" + auth
-					+ "' (x001):", ioe);
+					+ "' (x001):\n" + ioe.getMessage(), ioe);
 		    } catch (InterruptedException ie) {
 			exception = new MobyException(
 				"There was a problem generating service skeleton for service '"
 					+ name + "' provided by '" + auth
-					+ "' (x002):", ie);
+					+ "' (x002):\n" + ie.getMessage(), ie);
 		    }
 		}
 		return null; // not used here




More information about the MOBY-guts mailing list