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

Misleading exception message "Wrong termination object"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.1.5
    • Fix Version/s: 1.1.6
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: