H. Sellik
H. Sellik

Reputation: 113

JHipster Encountered exception [org.apache.catalina.LifecycleException: Failed to start component

I am trying to deploy JHipster to Tomcat 9 (java 8). It is fine when I deploy it locally, but it gives an error upon loading to Linux VM:

FAIL - Application at context path [/web-app-0.0.4-SNAPSHOT] could not be started
FAIL - Encountered exception [org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web-app-0.0.4-SNAPSHOT]]]

Web app image of error

Upon inspecting catalina.out on Tomcat I see that:

java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/target/webApp.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(target/webApp.log,true) call failed. java.io.FileNotFoundException: target/webApp.log (No such file or directory)

This probably means that I don't have privileges to write this file? Where should I add privileges to fix it?

How could I disable this logging alltogether? I suspect application.yml file has something to do with it.

EDIT 1: It is possible to start the application when adding target folder to root and creating webApp.log file to it. Because I followed DigitalOceans guide, I also made tomcat user the owner of the folder:

sudo chown -R tomcat /target

Upvotes: 0

Views: 167

Answers (1)

Jon Ruddell
Jon Ruddell

Reputation: 6352

You can remove the logging key/value in application.yml to disable the logging a file. This was removed after discussion in this issue. This change which will be included in JHipster v5.4.3+

Upvotes: 1

Related Questions