开发者

Glassfish 3.1: spring error during deploy of web application

开发者 https://www.devze.com 2023-02-18 01:57 出处:网络
Strange thing: when I deploy the web application into GF 3.1 through the autodeploy directory, I recieve the following error. The deployment through the admin console works ok with the same war!

Strange thing: when I deploy the web application into GF 3.1 through the autodeploy directory, I recieve the following error. The deployment through the admin console works ok with the same war!

here is the exception:

[#|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) 开发者_StackOverflow at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:300) ... 39 more

NPE in the official release?? Isn't this the indicator of new bug in GF?

Piece of my web.xml:

<listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

Using the latest (3.0.2.RELEASE) version of Spring-web

Thanks.


Bug report is here : http://java.net/jira/browse/GLASSFISH-16237

turned out to be mistake with Spring dependency.

I was hoping this had a real solution. Because I also got this problem and my app doesn't use Spring at all! Just Weld/CDI + EJB in GlassFish 3.1.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号