cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

java.lang.ExceptionInInitializerError

rishabh_singhania
Participant
0 Likes
1,083

Hi,

i am getting the below error while opening the report in modify mode.

"java.lang.ExceptionInInitializerError"

BI 4.0 sp2

Java version 6 update 19

please suggest

Thanks and Regards,

Rishabh

View Entire Topic
Former Member
0 Likes

1) This error occur if there is runtime exception thrown from statement inside the constructor or if there is error in static block.

2) Due to this error, instance of a class will not be created

3) So when you tryie to call a method on this instance variable it will throw java.lang.ExceptionInInitializerError

class AClass{

     public static AClass VARA = new AClass();

    

     private AClass(){

     ..... throw RuntimeException

     }

     public .. methodA(){

     }

}

class BClass{

     method(){

          VARA.methodA(); ... Will get ExceptionInInitializerError

     }

}

Ask a Question