讨论区 » AAS-V10企业版 »
取消部署某个web引用,影响到另外一个web应用的访问,日志可能提示:Caused by: java.lang.IllegalStateException: ServletConfig has not been initialized
版本:20220913
问题场景:某个项目同时部署一个rar格式的web应用和war包应用,同时部署是war应用可以正常访问;当需要局部更新,即重新部署rar格式的web应用,而不影响war应用的访问;
在之前的版本其中一个应用卸载是不会影响到另外一个war应用的,但这个版本应该有个bug
处理方案:
1.首先要确定这两个应用包是不是有一个可能是纯前端的应用,两个有关联关系,确定是的话让应用研发自行处理,确定方法;
使用tree命令在ApusicAS/aas/domains/mydomain/applications目录下获取应用的结构,如果是全部为html或css,jps啥的文件,就是纯前端,如果WEB—INF下包含有class类文件,就不是了
2.确定不是纯前端后,观察日志文件,可能有如下报错:
javax.servlet.ServletException: Servlet.destroy() for servlet dispatcherServlet threw exception
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1816)
at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:2103)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5859)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:555)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1009)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2213)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2177)
at com.sun.enterprise.web.WebApplication.stop(WebApplication.java:141)
at com.apusic.aas.internal.data.EngineRef.stop(EngineRef.java:137)
at com.apusic.aas.internal.data.ModuleInfo.stop(ModuleInfo.java:299)
at com.apusic.aas.internal.data.ApplicationInfo.stop(ApplicationInfo.java:389)
at com.apusic.enterprise.v10.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:1039)
at com.apusic.enterprise.v10.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:2116)
at com.apusic.enterprise.v10.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:90)
at com.apusic.aas.deployment.admin.DisableCommand.execute(DisableCommand.java:354)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:519)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:518)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:549)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:541)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:540)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1448)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:88)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1842)
at com.apusic.enterprise.v10.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1718)
at com.apusic.aas.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:230)
at com.apusic.aas.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:208)
at com.apusic.aas.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:135)
at com.apusic.aas.admin.rest.resources.TemplateCommandPostResource.processPostLegacyFormat(TemplateCommandPostResource.java:74)
at sun.reflect.GeneratedMethodAccessor2089.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:679)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:353)
at com.apusic.aas.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:292)
at com.apusic.aas.admin.rest.adapter.RestAdapter.service(RestAdapter.java:155)
at com.apusic.enterprise.v10.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:439)
at com.apusic.enterprise.v10.services.impl.ContainerMapper.service(ContainerMapper.java:144)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:177)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:154)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:261)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:110)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:89)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:208)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:261)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:110)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:89)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:208)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:261)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:110)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:89)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:549)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: ServletConfig has not been initialized
at javax.servlet.GenericServlet.getServletContext(GenericServlet.java:159)
at org.springframework.web.servlet.FrameworkServlet.destroy(FrameworkServlet.java:863)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1802)
出现原因:这个可能是此版本的bug,当应用的访问路径设置为/根目录时,需要把虚拟服务器的根目录配置删掉
解决方法: