java.lang.ExceptionInInitializerError

Coderanch | Rajdeep Biswas | 8 months ago
  1. 0

    UnsupportedNodeException: Java run-time error

    Coderanch | 8 months ago | Rajdeep Biswas
    java.lang.ExceptionInInitializerError
  2. 0

    Why can't you call initCause with an ExceptionInInitializerError?

    Stack Overflow | 2 years ago | aliteralmind
    java.lang.ExceptionInInitializerError: 1. Fail!
  3. 0

    Error loading libraries (Linux)

    GitHub | 8 months ago | germangb
    java.lang.ExceptionInInitializerError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The following code works in 2.6.0-final but throws and exception in trunk r12940: {code} object Test extends Application { val a = Array[String]("a", "b", "c") System.out.println(a) val b = a.take(1) System.out.println(b) val c : Array[String] = b.toArray System.out.println(c) val d : Array[String] = b System.out.println(d) } {code} The output is: {code} [Ljava.lang.String;@1a125f0 Array(a) java.lang.ExceptionInInitializerError at Test.main(t.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at scala.tools.nsc.ObjectRunner$$$$anonfun$$0.apply(ObjectRunner.scala:75) at scala.tools.nsc.ObjectRunner$$.withContextClassLoader(ObjectRunner.scala:49) at scala.tools.nsc.ObjectRunner$$.run(ObjectRunner.scala:74) at scala.tools.nsc.MainGenericRunner$$.main(MainGenericRunner.scala:154) at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala) Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String; at Test$$.<init>(t.scala:12) at Test$$.<clinit>(t.scala) ... 10 more {code} Oddly enough, putting everything in one line works: {code} Welcome to Scala version 2.6.0.12940.20070926-175352. Type in expressions to have them evaluated. Type :help for more information. scala> Array[String]("abc", "def").take(1).toArray res0: Array[String] = [Ljava.lang.String;@d5e270 {code}

    Scala JIRA | 9 years ago | Blair Zajac
    java.lang.ExceptionInInitializerError
  6. 0

    The following code works in 2.6.0-final but throws and exception in trunk r12940: {code} object Test extends Application { val a = Array[String]("a", "b", "c") System.out.println(a) val b = a.take(1) System.out.println(b) val c : Array[String] = b.toArray System.out.println(c) val d : Array[String] = b System.out.println(d) } {code} The output is: {code} [Ljava.lang.String;@1a125f0 Array(a) java.lang.ExceptionInInitializerError at Test.main(t.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at scala.tools.nsc.ObjectRunner$$$$anonfun$$0.apply(ObjectRunner.scala:75) at scala.tools.nsc.ObjectRunner$$.withContextClassLoader(ObjectRunner.scala:49) at scala.tools.nsc.ObjectRunner$$.run(ObjectRunner.scala:74) at scala.tools.nsc.MainGenericRunner$$.main(MainGenericRunner.scala:154) at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala) Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String; at Test$$.<init>(t.scala:12) at Test$$.<clinit>(t.scala) ... 10 more {code} Oddly enough, putting everything in one line works: {code} Welcome to Scala version 2.6.0.12940.20070926-175352. Type in expressions to have them evaluated. Type :help for more information. scala> Array[String]("abc", "def").take(1).toArray res0: Array[String] = [Ljava.lang.String;@d5e270 {code}

    Scala JIRA | 9 years ago | Blair Zajac
    java.lang.ExceptionInInitializerError

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArithmeticException

      / by zero

      at MyClass.<clinit>()
    2. Unknown
      Test.main
      1. MyClass.<clinit>(Test.java:5)
      2. Test.m2(Test.java:19)
      3. Test.m1(Test.java:15)
      4. Test.main(Test.java:11)
      4 frames