java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I'm trying to get Sparkling Water / H2O running on Amazon EMR 4.0.0. My setup is: Java 1.8.0_60 Spark 1.4.1 sparkling-water-1.4.7 spark-shell --jars sparkling-water-assembly-1.4.7-all.jar --master yarn-client --num-executors 20 --executor-cores 16 --executor-memory 17g --driver-memory 17g --conf spark.yarn.executor.memoryOverhead=4096 --conf spark.yarn.driver.memoryOverhead=4096 -i minimal-init.scala --driver-java-options -Dlog4j.configuration=file:/etc/spark/conf/log4j.properties minimal-init.scala contains just this: import org.apache.spark.h2o._ import org.apache.spark.examples.h2o._ val h2oContext = new H2OContext(sc) try { h2oContext.start() } catch { case e: Throwable => e.printStackTrace(); System.exit(1) } All loads fine, but when trying to run h2oContext.start, about 50% of the time I start losing executors with the following stack trace. The other 50% it starts fine, but then loses executors later when trying to actually do things. There is a very old bug in Java (JDK-7003462) with similar symptoms, but that was supposedly fixed in Java7; in my stack trace line numbers seem consistent with Java8 JRE, so my JRE should be correct. Any help is appreciated! Thanks Zeev java.lang.NullPointerException: Inflater has been closed at java.util.zip.Inflater.ensureOpen(Inflater.java:389) at java.util.zip.Inflater.inflate(Inflater.java:257) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at java.io.DataInputStream.readInt(DataInputStream.java:387) at javassist.bytecode.ClassFile.read(ClassFile.java:777) at javassist.bytecode.ClassFile.<init>(ClassFile.java:124) at javassist.CtClassType.getClassFile2(CtClassType.java:192) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:98) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:84) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:711) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:688) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:157) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:46) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:242) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:330) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50) at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:292) at javassist.compiler.CodeGen.atMethodDecl(CodeGen.java:274) at javassist.compiler.ast.MethodDecl.accept(MethodDecl.java:44) at javassist.compiler.Javac.compileMethod(Javac.java:169) at javassist.compiler.Javac.compile(Javac.java:95) at javassist.CtNewMethod.make(CtNewMethod.java:74) at javassist.CtNewMethod.make(CtNewMethod.java:45) at water.Weaver.addMethod(Weaver.java:367) at water.Weaver.make_body(Weaver.java:360) at water.Weaver.genIcerClass(Weaver.java:181) at water.Weaver.javassistLoadClass(Weaver.java:133) at water.Weaver.genDelegate(Weaver.java:60) at water.TypeMap.getIcer(TypeMap.java:183) at water.TypeMap.getIcer(TypeMap.java:170) at water.Iced.icer(Iced.java:41) at water.Iced.write(Iced.java:47) at water.UDPHeartbeat.build_and_multicast(UDPHeartbeat.java:24) at water.HeartBeatThread.run(HeartBeatThread.java:135)
    via by Michal Malohlava,
  • I'm trying to get Sparkling Water / H2O running on Amazon EMR 4.0.0. My setup is: Java 1.8.0_60 Spark 1.4.1 sparkling-water-1.4.7 spark-shell --jars sparkling-water-assembly-1.4.7-all.jar --master yarn-client --num-executors 20 --executor-cores 16 --executor-memory 17g --driver-memory 17g --conf spark.yarn.executor.memoryOverhead=4096 --conf spark.yarn.driver.memoryOverhead=4096 -i minimal-init.scala --driver-java-options -Dlog4j.configuration=file:/etc/spark/conf/log4j.properties minimal-init.scala contains just this: import org.apache.spark.h2o._ import org.apache.spark.examples.h2o._ val h2oContext = new H2OContext(sc) try { h2oContext.start() } catch { case e: Throwable => e.printStackTrace(); System.exit(1) } All loads fine, but when trying to run h2oContext.start, about 50% of the time I start losing executors with the following stack trace. The other 50% it starts fine, but then loses executors later when trying to actually do things. There is a very old bug in Java (JDK-7003462) with similar symptoms, but that was supposedly fixed in Java7; in my stack trace line numbers seem consistent with Java8 JRE, so my JRE should be correct. Any help is appreciated! Thanks Zeev java.lang.NullPointerException: Inflater has been closed at java.util.zip.Inflater.ensureOpen(Inflater.java:389) at java.util.zip.Inflater.inflate(Inflater.java:257) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at java.io.DataInputStream.readInt(DataInputStream.java:387) at javassist.bytecode.ClassFile.read(ClassFile.java:777) at javassist.bytecode.ClassFile.<init>(ClassFile.java:124) at javassist.CtClassType.getClassFile2(CtClassType.java:192) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:98) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:84) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:711) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:688) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:157) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:46) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:242) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:330) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50) at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:292) at javassist.compiler.CodeGen.atMethodDecl(CodeGen.java:274) at javassist.compiler.ast.MethodDecl.accept(MethodDecl.java:44) at javassist.compiler.Javac.compileMethod(Javac.java:169) at javassist.compiler.Javac.compile(Javac.java:95) at javassist.CtNewMethod.make(CtNewMethod.java:74) at javassist.CtNewMethod.make(CtNewMethod.java:45) at water.Weaver.addMethod(Weaver.java:367) at water.Weaver.make_body(Weaver.java:360) at water.Weaver.genIcerClass(Weaver.java:181) at water.Weaver.javassistLoadClass(Weaver.java:133) at water.Weaver.genDelegate(Weaver.java:60) at water.TypeMap.getIcer(TypeMap.java:183) at water.TypeMap.getIcer(TypeMap.java:170) at water.Iced.icer(Iced.java:41) at water.Iced.write(Iced.java:47) at water.UDPHeartbeat.build_and_multicast(UDPHeartbeat.java:24) at water.HeartBeatThread.run(HeartBeatThread.java:135)
    via by Michal Malohlava,
  • Exception running Sparkling Water on EMR 4.0.0
    via by Unknown author,
  • Build from source failed
    via GitHub by confile
    ,
  • Android NPE's reported
    via GitHub by codenameone
    ,
  • Trouble creating a runnable JAR from Eclipse
    via Stack Overflow by Johnny
    ,
  • GitHub comment 4680#250923830
    via GitHub by KhaledTo
    ,
    • java.lang.NullPointerException: Inflater has been closed at java.util.zip.Inflater.ensureOpen(Inflater.java:389) at java.util.zip.Inflater.inflate(Inflater.java:257) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152) at java.io.FilterInputStream.read(FilterInputStream.java:133) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at java.io.DataInputStream.readInt(DataInputStream.java:387) at javassist.bytecode.ClassFile.read(ClassFile.java:777) at javassist.bytecode.ClassFile.<init>(ClassFile.java:124) at javassist.CtClassType.getClassFile2(CtClassType.java:192) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:98) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:84) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:711) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:688) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:157) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:46) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:242) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:330) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50) at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:292) at javassist.compiler.CodeGen.atMethodDecl(CodeGen.java:274) at javassist.compiler.ast.MethodDecl.accept(MethodDecl.java:44) at javassist.compiler.Javac.compileMethod(Javac.java:169) at javassist.compiler.Javac.compile(Javac.java:95) at javassist.CtNewMethod.make(CtNewMethod.java:74) at javassist.CtNewMethod.make(CtNewMethod.java:45) at water.Weaver.addMethod(Weaver.java:367) at water.Weaver.make_body(Weaver.java:360) at water.Weaver.genIcerClass(Weaver.java:181) at water.Weaver.javassistLoadClass(Weaver.java:133) at water.Weaver.genDelegate(Weaver.java:60) at water.TypeMap.getIcer(TypeMap.java:183) at water.TypeMap.getIcer(TypeMap.java:170) at water.Iced.icer(Iced.java:41) at water.Iced.write(Iced.java:47) at water.UDPHeartbeat.build_and_multicast(UDPHeartbeat.java:24) at water.HeartBeatThread.run(HeartBeatThread.java:135)

    Users with the same issue

    Unknown visitor1 times, last one,
    Hronom
    30 times, last one,