Play! unable to "recover" from ExceptionInItializationError

Bug #588588 reported by AMcBain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
New
Undecided
Unassigned

Bug Description

If a controller class throws a RuntimeException when it is loaded, Play! will say there was an ExceptionInIntiailizationError with a value of null. If the page is refreshed, it then says it cannot find the class for the controller it is supposed to use for the given route. If the class in question is repaired so that it does not throw that exception, Play! will attempt to reload it, but then fail with an error saying it was unable to replace the class. This seems to affect Play! in dev mode. The only way to get back to a usable state is to shut down and restart Play! entirely.

Basically, for some reason, if Play! fails to initialize a controller class once, it is then unable to load a new copy forever after until it is restarted. This affects Play! 1.0.2.1, and may also be a problem if any class loaded throws such an exception, not just controller classes. However, I only observed said issue via a controller class.

If the ability to replace the class after the first failure cannot be fixed, it would at least be nice to ensure that when the ExceptionInInitializationError is shown to a developer, it does not list null as the value/message, but rather the value/message of the exception which caused it to be thrown.

AMcBain (mcbain-asm)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.