I'm currently migrating away from the Global object in my application.
Right now I'm removing the onStop(...) function.
However, I'm unable to start my application. I get the following error:
play.api.PlayException: Cannot load module[Module [ShutdownModule] cannot be instantiated.]
at play.api.inject.Modules$$anonfun$locate$1.apply(Module.scala:131) ~[play_2.11-2.4.0.jar:2.4.0]
at play.api.inject.Modules$$anonfun$locate$1.apply(Module.scala:103) ~[play_2.11-2.4.0.jar:2.4.0]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) ~[scala-library-2.11.7.jar:na]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245) ~[scala-library-2.11.7.jar:na]
at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:322) ~[scala-library-2.11.7.jar:na]
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_45]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_45]
at play.api.inject.Modules$$anonfun$locate$1$$anonfun$play$api$inject$Modules$$anonfun$$tryConstruct$1$1.apply(Module.scala:115) ~[play_2.11-2.4.0.jar:2.4.0]
Caused by: scaldi.InjectException: No binding found with following identifiers:
* TypeTagIdentifier(play.api.inject.ApplicationLifecycle)
at scaldi.Injectable$class.noBindingFound(Injectable.scala:46) ~[scaldi_2.11-0.5.6.jar:0.5.6]
at ShutdownModule.noBindingFound(ShutdownModule.scala:15) ~[na:na]
at scaldi.Injectable$$anonfun$inject$1$$anonfun$apply$1.apply(Injectable.scala:22) ~[scaldi_2.11-0.5.6.jar:0.5.6]
at scaldi.Injectable$$anonfun$inject$1$$anonfun$apply$1.apply(Injectable.scala:22) ~[scaldi_2.11-0.5.6.jar:0.5.6]
at scala.Option.getOrElse(Option.scala:121) ~[scala-library-2.11.7.jar:na]