前提・実現したいこと
Windowsサーバーで動いてるシステムをUbuntuに移行したい
Windowsサーバーのapache-tomcat-8.0.48\webappsに置いてるフォルダ(pms_web)
をそのままUbuntuの/opt/apache-tomcat-9.0.38/webappsに移動しました。
windowsサーバーで
http://127.0.0.1:8080をアクセスすると、Apache Tomcat画面が表示されます。
http://127.0.0.1:8080/pms_web/をアクセスすると、index画面が表示されます。
Ubuntuサーバーで
http://127.0.0.1:8080をアクセスすると、Apache Tomcat画面が表示されます。
発生している問題・エラーメッセージ
Ubuntuサーバーで http://127.0.0.1:8080/pms_web/をアクセスすると、 **The requested resource [/pms_web/] is not available**。
エラーログ:
03-Jan-2021 14:07:32.453 SEVERE [main] org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web application directory [/opt/apache-tomcat-9.0.38/webapps/pms_web] java.lang.IllegalStateException: Error starting child at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1866) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/pms_web]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) ... 37 more Caused by: java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.rolling.RollingFileAppender[all] - Failed to create parent directories for [/./logs/pms-web/pms-web_all.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[all] - openFile(./logs/pms-web/pms-web_all.log,true) call failed. java.io.FileNotFoundException: ./logs/pms-web/pms-web_all.log (No such file or directory) ERROR in ch.qos.logback.core.rolling.RollingFileAppender[error] - Failed to create parent directories for [/./logs/pms-web/pms-web_error.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[error] - openFile(./logs/pms-web/pms-web_error.log,true) call failed. java.io.FileNotFoundException: ./logs/pms-web/pms-web_error.log (No such file or directory) ERROR in ch.qos.logback.core.rolling.RollingFileAppender[service] - Failed to create parent directories for [/./logs/pms-web/pms-web.log] ERROR in ch.qos.logback.core.rolling.RollingFileAppender[service] - openFile(./logs/pms-web/pms-web.log,true) call failed. java.io.FileNotFoundException: ./logs/pms-web/pms-web.log (No such file or directory) at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:162) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:81) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:59) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:115) at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:303) at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:276) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239) at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:212) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325) at org.springframework.boot.SpringApplication.run(SpringApplication.java:296) at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:154) at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:134) at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87) at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5128) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) 03-Jan-2021 14:07:32.456 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/apache-tomcat-9.0.38/webapps/pms_web] has finished in [8,589] ms
該当のソースコード
pms_webフォルダ
META-INF -MANIFEST.MF WEB-INF -classes -lib -success.jsp -web.xml -weblogic.xml hello.jsp index.jsp
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"/>
試したこと
1.webappsにexamplesがあります。http://127.0.0.1:8080/examples/をアクセスすると、問題なく画面が表示される
2.pms_webと同じようなpms_web2を作って、WEB-INFを削除して、http://127.0.0.1:8080/pms_web2/をアクセスすると、問題なく画面が表示される
補足
他、何かファイル中身が必要であれば、教えていただければ、追加します。
web.xmlの設定に問題あるかと思いますが、Windowsサーバーでちゃんと動いてます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。