Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-694

Misleading exception message "Wrong termination object"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.1.5
    • 1.1.6
    • None
    • None

    Description

      While creating a customized WebBeansContext using a custom SingletonService, I hit the following exception:

      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]
      

      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".

      Attachments

        Activity

          People

            struberg Mark Struberg
            hwellmann Harald Wellmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: