org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.springframework.web.context.ContextLoaderListener

Java.net JIRA | bitec | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When I try to deploy the application with Spring support through the autodeploy directory, I recieve the following error (see later) The deployment through the admin console happens with no problems! That's why I regard this as the bug. Also, NPE isn't the sign of "expected" exceptional situation. the error: [#|2011-03-19T20:36:06.836+0000|INFO|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=51;_ThreadName=Thread-1;|Adding singleton for WebappClassLoader (delegate=false; repositories=WEB-INF/classes/)|#] [#|2011-03-19T20:36:14.876+0000|SEVERE|glassfish3.1|org.apache.catalina.core.ContainerBase|_ThreadID=25;_ThreadName=Thread-1;|ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.springframework.web.context.ContextLoaderListener at org.apache.catalina.core.StandardContext.start(StandardContext.java:5271) at com.sun.enterprise.web.WebModule.start(WebModule.java:500) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630) at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:360) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247) at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145) at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:577) at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:463) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:395) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380) at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:213) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Caused by: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.springframework.web.context.ContextLoaderListener at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2688) at org.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:1932) at com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:234) at com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig.java:93) at com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:274) at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:172) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5268) ... 26 more Caused by: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.springframework.web.context.ContextLoaderListener at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2798) at org.apache.catalina.core.StandardContext.loadListener(StandardContext.java:4745) at com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1603) at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2685) ... 33 more Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.springframework.web.context.ContextLoaderListener at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:317) at com.sun.enterprise.web.WebContainer.createListenerInstance(WebContainer.java:734) at com.sun.enterprise.web.WebModule.createListenerInstance(WebModule.java:1981) at org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2796) ... 36 more Caused by: java.lang.NullPointerException at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:485) at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:428) at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:300) ... 39 more

    Java.net JIRA | 6 years ago | bitec
    org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.springframework.web.context.ContextLoaderListener
  2. 0

    How can I get rid of those Omnifaces deployment exceptions?

    Stack Overflow | 3 years ago | Riduidel
    org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.omnifaces.facesviews.FacesViewsInitializerListener
  3. 0

    Changing requestscoped to sessionscoped gives an error

    Stack Overflow | 5 years ago | Klaasvaak
    org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.glassfish.webservices.WSServletContextListener
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cannot use CDI into WAB on Glassfish 3.1.2

    Stack Overflow | 5 years ago | user1285928
    org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class org.jboss.weld.servlet.WeldListener
  6. 0

    [#GLASSFISH-15225] [OSGi] CDI beans not accessible in web applications

    java.net | 6 months ago
    org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class org.jboss.weld.servlet.WeldListener

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean()
    2. Container Common
      InjectionManagerImpl.createManagedObject
      1. com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:485)
      2. com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:428)
      3. com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:300)
      3 frames
    3. Glassfish
      WebModule.createListenerInstance
      1. com.sun.enterprise.web.WebContainer.createListenerInstance(WebContainer.java:734)
      2. com.sun.enterprise.web.WebModule.createListenerInstance(WebModule.java:1981)
      2 frames
    4. Glassfish Core
      StandardContext.loadListener
      1. org.apache.catalina.core.StandardContext.createListener(StandardContext.java:2796)
      2. org.apache.catalina.core.StandardContext.loadListener(StandardContext.java:4745)
      2 frames
    5. Glassfish
      WebModule.loadListener
      1. com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1603)
      1 frame
    6. Glassfish Core
      StandardContext.addApplicationListener
      1. org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2685)
      2. org.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:1932)
      2 frames
    7. Glassfish
      WebModuleContextConfig.lifecycleEvent
      1. com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:234)
      2. com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig.java:93)
      3. com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:274)
      4. com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:172)
      4 frames
    8. Glassfish Core
      StandardContext.start
      1. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:5268)
      2 frames
    9. Glassfish
      WebModule.start
      1. com.sun.enterprise.web.WebModule.start(WebModule.java:500)
      1 frame
    10. Glassfish Core
      StandardHost.addChild
      1. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
      2. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
      3. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755)
      3 frames
    11. Glassfish
      WebApplication.start
      1. com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980)
      2. com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630)
      3. com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
      3 frames
    12. Private APIs of Glassfish
      ApplicationInfo.start
      1. org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      2. org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      3. org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
      3 frames
    13. Kernel Classes
      ApplicationLifecycle.deploy
      1. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
      2. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      2 frames
    14. Embedded GlassFish Web
      DeployCommand.execute
      1. org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
      1 frame
    15. Kernel Classes
      CommandRunnerImpl$ExecutionContext.execute
      1. com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:360)
      2. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
      3. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
      4. com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
      5. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
      5 frames
    16. Embedded GlassFish Web
      AutoDeployService$1.run
      1. org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145)
      2. org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:577)
      3. org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:463)
      4. org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:395)
      5. org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380)
      6. org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:213)
      6 frames
    17. Java RT
      TimerThread.run
      1. java.util.TimerThread.mainLoop(Timer.java:512)
      2. java.util.TimerThread.run(Timer.java:462)
      2 frames