Are you getting this exception?
java.lang.NoClassDefFoundError: abc.MyClass (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java)
This error happens when there is an exception while the class is instantiated.
Check the below points
This error happens when there is an exception while the class is instantiated.
Check the below points
1) Check the constructor and make sure there is nothing which could throw a Runtime exception
2) Check the body of the class and see if there is a possibility of NullPointer or any other Runtime exception while assigning value to the fields
Mostly this could happen when you are assgning values to static fields which might not resolve properly while class loading.
2) Check the body of the class and see if there is a possibility of NullPointer or any other Runtime exception while assigning value to the fields
Mostly this could happen when you are assgning values to static fields which might not resolve properly while class loading.
Thanks a lot! That helped me with the issue that I was struggling for 3 days. I was thinking the classloader is not finding the class but it is finding but there were Runtime issue within the class.
ReplyDeleteThanks again.
But what u did to solve this issue as I m getting the same error after giving login/password to login page
ReplyDeleteHi Ishita, I didnt understand your question. Can you please elaborate?
ReplyDeleteThanks.. it works !!!
ReplyDeleteThe problem was there was a NullPointer in the static block.
Regards
Yogesh
yogesh249@gmail.com