Hi Arvind,

ExceptionInInitializerError is a fatal error since it is a linkage error
which means that the ClassLoader may be broken.

This is what the JavaDoc for java.lang.Error says:
" An Error is a subclass of Throwable that indicates serious problems that
a reasonable application should not try to catch."

The exit on error logic is the UnhandledExceptionHandler that Akka installs
for all threads it creates, so all Throwables that bubble up thru the firat
stackframe gets dealt with.

If you know that it is safe to proceed after this Error, you can try-catch
around where it happens and rethrow the cause instead.

Cheers,
V
On Jul 30, 2014 9:31 PM, "Arvind Potnuru" <[email protected]>
wrote:

> Hi,
>
>  I see following fatal error and subsequent crashing of the JVM if the
> initialization of one actor in the application fails.
>
>
> [WARN] [07/23/2014 16:59:14.502] [New I/O worker #2]
> [EventStream(akka://play)] [akka.event-handlers] config is deprecated, use
> [akka.loggers]Uncaught error from thread
> [application-akka.actor.default-dispatcher-7] shutting down JVM since
> 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[application]
>
> java.lang.ExceptionInInitializerError
>
> at
> com.pearson.lt.xl.adaptive.healthchecks.HealthCheckSimple$$FastClassByGuice$$529e7dcc.newInstance(<generated>)
>
>   at
> com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
>
>   at
> com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
>
>   at
> com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
>
>   at
> com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
>
>   at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
>
>   at
> com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
>
>
> My question is why initialization of a single actor in actor is considered
> as a fatal error which in-turn is crashing the JVM (as 
> akka.jvm-exit-on-fatal-error
> is set to true by default). Is there a way I can selective exclude some
> exceptions from fatal-error list in Akka?
>
>
> Thanks,
>
> Arvind
>
>
>
>  --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to