Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
From the list:
Hi, When I tried to run the latest version from SVN, HBase always ended up in a busy loop, and there were log messages like "java.io.FileNotFoundException: file:/C:/Hadoop/hbase-0.19-dev/webapps%5/static". Finally, I found the reason in org.apache.hadoop.hbase.util.InfoServer.getWebAppDir() where the file separator '\' is used under Windows, which is then converted to '%5c' by ClassLoader.getResource(). Just using the normal slash '/' works fine. Best, Max This is the patch solving the problem for me: ### Eclipse Workspace Patch 1.0 #P HBase Index: src/java/org/apache/hadoop/hbase/util/InfoServer.java =================================================================== --- src/java/org/apache/hadoop/hbase/util/InfoServer.java (revision 725566) +++ src/java/org/apache/hadoop/hbase/util/InfoServer.java (working copy) @@ -17,8 +17,6 @@ */ package org.apache.hadoop.hbase.util; -import java.io.File; -import java.io.FileNotFoundException; import java.io.IOException; import java.net.URL; @@ -101,12 +99,7 @@ public static String getWebAppDir(final String webappName) throws IOException { String webappDir = null; - try { - webappDir = getWebAppsPath("webapps" + File.separator + webappName); - } catch (FileNotFoundException e) { - // Retry. Resource may be inside jar on a windows machine. - webappDir = getWebAppsPath("webapps/" + webappName); - } + webappDir = getWebAppsPath("webapps/" + webappName); return webappDir; } }