import java.net.URISyntaxException;\r
import java.net.URL;\r
\r
-import javax.naming.ConfigurationException;\r
-\r
import org.apache.log4j.Logger;\r
\r
import compbio.util.PropertyHelper;\r
* \r
* Try 1 - succeed.\r
* \r
- * @return\r
+ * @return an instance\r
*/\r
public static PropertyHelper getPropertyHelper() {\r
if (ph == null) {\r
ph = new PropertyHelper(locEngineProp, clustEngineProp,\r
execProp);\r
} catch (IOException e) {\r
- log.warn("Cannot read property files! Reason: "\r
- + e.getLocalizedMessage(), e.getCause());\r
+ log.warn(\r
+ "Cannot read property files! Reason: "\r
+ + e.getLocalizedMessage(), e.getCause());\r
}\r
}\r
return ph;\r
* binaries WEB-INF classes compbio engine conf If the structure changes it\r
* must be reflected in this method\r
* \r
- * @return\r
- * @throws ConfigurationException\r
+ * @return the local path\r
+ * @throws RuntimeException\r
+ * if cannot determine the local path\r
*/\r
public static String getLocalPath() {\r
String clname = PropertyHelperManager.class.getSimpleName();\r
} catch (IllegalArgumentException e) {\r
// Classes are in the jar file, using different method to determine\r
// the path new File(INCORRECT URL) throws it\r
- log\r
- .warn(\r
- "It looks like classes are in the jar file. "\r
- + "Attempting a different method to determinine the path to the resources "\r
- + e.getLocalizedMessage(), e.getCause());\r
+ log.debug(\r
+ "It looks like classes are in the jar file. "\r
+ + "Attempting a different method to determinine the path to the resources "\r
+ + e.getLocalizedMessage(), e.getCause());\r
try {\r
f = new File(PropertyHelperManager.class.getProtectionDomain()\r
.getCodeSource().getLocation().toURI().getPath());\r
f = f.getParentFile();\r
}\r
} catch (URISyntaxException e1) {\r
- log.error("Could not find resources path! "\r
- + e1.getLocalizedMessage(), e1.getCause());\r
+ log.error(\r
+ "Could not find resources path! "\r
+ + e1.getLocalizedMessage(), e1.getCause());\r
throw new RuntimeException("Could not find resources path! ",\r
e1.getCause());\r
}\r