gpt4 book ai didi

java - 无法访问互联网的服务器上的 Tiles DTD 解析失败

转载 作者:行者123 更新时间:2023-11-30 03:08:14 25 4
gpt4 key购买 nike

该应用程序在可以访问互联网的服务器上运行良好,但在生产中我使用防火墙阻止了所有站点,并且只允许某些内部域。因此无法访问互联网。

以下错误表明无法在端口80上连接struts.apache.org

javax.servlet.ServletException: org.apache.struts.tiles.DefinitionsFactoryException: IO Error while parsing file '/WEB-INF/tiles-defs.xml'. Tried all: '2' addresses, but could not connect over HTTP to server: 'struts.apache.org', port: '80'
at org.apache.struts.tiles.TilesPlugin.initDefinitionsFactory(TilesPlugin.java:233)
at org.apache.struts.tiles.TilesPlugin.init(TilesPlugin.java:137)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:871)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)
at javax.servlet.GenericServlet.init(GenericServlet.java:240)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:337)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:288)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:98)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:86)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:71)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:57)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:31)
at weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:660)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:600)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1979)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1956)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1846)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2876)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1661)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:823)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:73)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:587)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:151)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: org.apache.struts.tiles.DefinitionsFactoryException: IO Error while parsing file '/WEB-INF/tiles-defs.xml'. Tried all: '2' addresses, but could not connect over HTTP to server: 'struts.apache.org', port: '80'
at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFile(I18nFactorySet.java:523)
at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFiles(I18nFactorySet.java:446)
at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.createDefaultFactory(I18nFactorySet.java:263)
at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory(I18nFactorySet.java:238)
at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory(I18nFactorySet.java:188)
at org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.init(ComponentDefinitionsFactoryWrapper.java:102)
at org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory(TilesUtilImpl.java:136)
at org.apache.struts.tiles.TilesUtil.createDefinitionsFactory(TilesUtil.java:165)
at org.apache.struts.tiles.TilesPlugin.initDefinitionsFactory(TilesPlugin.java:222)
... 53 more
<Dec 9, 2015 3:42:17 PM EST> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "application.3.3.0.war".
javax.servlet.UnavailableException: org.apache.struts.tiles.DefinitionsFactoryException: IO Error while parsing file '/WEB-INF/tiles-defs.xml'. Tried all: '2' addresses, but could not connect over HTTP to server: 'struts.apache.org', port: '80'
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:402)
at javax.servlet.GenericServlet.init(GenericServlet.java:240)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:337)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:288)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
Truncated. see log file for complete stacktrace>

此外,在将 JDK 版本从 1.6 更新到 1.8 之前,我没有遇到此问题,但更新后,我在部署时遇到此错误。

如果这有任何关系,我想补充一点,weblogic 实例也已更新到 12.1.3。

最佳答案

这里的问题是,部署时服务器上没有可用的 Internet 连接(实际上 struts.apache.org 网站被防火墙阻止)。

因此在部署过程中我收到了此错误。请尝试在与这些站点有有效互联网连接的服务器上执行此操作,或在构建中包含这些文件(显然更新引用以引用包含的文件)。

关于java - 无法访问互联网的服务器上的 Tiles DTD 解析失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34216603/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com