nathanmarz/dfs-datastores

NPE on Windows

gammay opened this issue · 1 comments

A simple test file:

public class PailExampleTest {

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public static void main(String[] args) throws IOException {
        Pail pail = Pail.create("mypail");
        TypedRecordOutputStream os = pail.openWrite();
        os.writeObject(new byte[] {1, 2, 3});
        os.close();
    }
}

This works on Linux but on Windows throws:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/m1000436/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/m1000436/.m2/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
18:20:16.208 [main] DEBUG o.a.hadoop.util.PerformanceAdvisory - Falling back to shell based
Exception in thread "main" java.lang.NullPointerException
    at com.backtype.hadoop.pail.PailSpec.parseFromMap(PailSpec.java:116)
    at com.backtype.hadoop.pail.PailSpec.parseFromStream(PailSpec.java:101)
    at com.backtype.hadoop.pail.PailSpec.readFromFileSystem(PailSpec.java:94)
    at com.backtype.hadoop.pail.Pail.getSpecAndRoot(Pail.java:207)
    at com.backtype.hadoop.pail.Pail.getSpec(Pail.java:192)
    at com.backtype.hadoop.pail.Pail.create(Pail.java:162)
    at com.backtype.hadoop.pail.Pail.create(Pail.java:120)
    at com.backtype.hadoop.pail.Pail.create(Pail.java:128)
    at com.backtype.hadoop.pail.Pail.create(Pail.java:124)
    at thriftExample.PailExampleTest.main(PailExampleTest.java:12)

I am facing the issue in Linux