来自glassfish 4.1管理控制台的war文件部署错误

时间:2015-01-22 07:19:23

标签: java netbeans glassfish

在我的项目中(在 Netbeans 8 中创建),我们必须创建一个war文件并在 Glassfish 4.1管理控制台的不同机器上部署。

同样的过程,即从 Glassfish 4.1 (从 Netbeans 8 打开)部署war文件在我们开发项目的本地计算机上运行良好(在 Netbeans的)。

  

加载应用程序时出现异常:java.lang.IllegalStateException:   ContainerBase.addChild:start:org.apache.catalina.LifecycleException:   java.lang.IllegalArgumentException:javax.servlet.ServletException:   com.sun.enterprise.container.common.spi.util.InjectionException:错误   为类创建托管对象:class   org.glassfish.webservices.WSServletContextListener。请参阅   server.log获取更多详细信息。

服务器日志::

  

java.lang.Exception:java.lang.IllegalStateException:   ContainerBase.addChild:start:org.apache.catalina.LifecycleException:   java.lang.IllegalArgumentException:javax.servlet.ServletException:   com.sun.enterprise.container.common.spi.util.InjectionException:错误   为类创建托管对象:class   org.glassfish.webservices.WSServletContextListener at   com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)     在org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)     在org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)     在   org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)     在   com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)     在   com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)     在   org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:539)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:535)     在java.security.AccessController.doPrivileged(Native Method)at   javax.security.auth.Subject.doAs(Subject.java:356)at   com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2.execute(CommandRunnerImpl.java:534)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl $ 3.run(CommandRunnerImpl.java:565)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl $ 3.run(CommandRunnerImpl.java:557)     在java.security.AccessController.doPrivileged(Native Method)at   javax.security.auth.Subject.doAs(Subject.java:356)at   com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl.access $ 1300(CommandRunnerImpl.java:109)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1846)     在   com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1722)     在   org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)     在   org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)     在   org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:275)     在   org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:133)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)     在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:606)at   org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory $ 1.invoke(ResourceMethodInvocationHandlerFactory.java:81)     在   org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher $ 1.run(AbstractJavaResourceMethodDispatcher.java:151)     在   org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)     在   org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider $ ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)     在   org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)     在   org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)     在   org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)     在   org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)     在   org.glassfish.jersey.server.ServerRuntime $ 1.run(ServerRuntime.java:271)     在org.glassfish.jersey.internal.Errors $ 1.call(Errors.java:271)at at   org.glassfish.jersey.internal.Errors $ 1.call(Errors.java:267)at   org.glassfish.jersey.internal.Errors.process(Errors.java:315)at   org.glassfish.jersey.internal.Errors.process(Errors.java:297)at   org.glassfish.jersey.internal.Errors.process(Errors.java:267)at   org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)     在   org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)     在   org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)     在   org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365)     在   org.glassfish.admin.rest.adapter.RestAdapter $ 2.service(RestAdapter.java:316)     在   org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)     在   com.sun.enterprise.v3.services.impl.ContainerMapper $ HttpHandlerCallable.call(ContainerMapper.java:459)     在   com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)     在   org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)     在   org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)     在   org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)     在   org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119)     在   org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)     在   org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)     在   org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)     在   org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)     在   org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)     在   org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)     在   org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)     在   org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)     在   org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java:56)     在   org.glassfish.grizzly.strategies.WorkerThreadIOStrategy $ WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)     在   org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:565)     在   org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:545)     在java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:0)

我遇到了类似的问题。但是我正在尝试部署到AIX 6.1,这可能是我的问题的根源。

在Glassfish的早期版本中,由于IBM Java和Oracle Java之间的差异,Oracle发布了在AIX机器上运行的单独版本的Glassfish。由于没有单独版本的Glassfish 4.1 for AIX,我怀疑我在AIX上运行它的努力将是徒劳的。

在我的情况下,我一直在尝试使用jaxws-rt-2.2.6-6.jar和rt.jar(来自Oracle Java 1.7.0_21),看看是否将它们添加到Glassfish 4.1中的类路径中将允许我生成一些其他错误,如果没有解决问题。确定Glassfish是否能够看到这些库真的很难(我假设没有,因为我一直得到同样的错误)。

无论如何,如果您仍然遇到同样的问题,您可能想要说明您正在开发的操作系统以及您尝试部署的操作系统。这可能会对这个问题有所了解。