Harald Wellmann created OWB-694:
-----------------------------------
Summary: Misleading exception message "Wrong termination object"
Key: OWB-694
URL: https://issues.apache.org/jira/browse/OWB-694
Project: OpenWebBeans
Issue Type: Bug
Affects Versions: 1.1.5
Reporter: Harald Wellmann
Priority: Trivial
While creating a customized {{WebBeansContext}} using a custom
{{SingletonService}}, I hit the following exception:
{noformat}
Caused by: org.apache.webbeans.exception.WebBeansException: Wrong termination
object.
at
org.apache.webbeans.web.lifecycle.WebContainerLifecycle.getServletContext(WebContainerLifecycle.java:225)
~[openwebbeans-web-1.1.5.jar:1.1.5]
at
org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:89)
~[openwebbeans-web-1.1.5.jar:1.1.5]
at
org.ops4j.pax.cdi.openwebbeans.impl.OpenWebBeansCdiContainer$1.call(OpenWebBeansCdiContainer.java:128)
~[classes/:na]
{noformat}
I believe this is trying to tell me that the argument to
{{lifecycle.startApplication(obj)}} should be a ServletContext (it is currently
null in my case).
But what is a "termination object" in {{startApplication()}} - maybe this
exception string belongs to {{stopApplication()}}?
In any case, a message like "expected an instance of Foo" would be more helpful
than "wrong object".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira