sylar_80
sylar_80

Reputation: 375

No Spring WebApplicationInitializer types detected on classpath - GEONETWORK 3.6 - CENTOS7

I put the geonetwork.war file in the webapps folder of my working installation of Tomcat 7.0 on CENTOS 7. But when it tries to deploy it, I got the following error:

INFO [http-nio-8081-exec-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: logs/geonetwork.log (No such file or directory)

How can I fix this problem?

Upvotes: 1

Views: 893

Answers (1)

juanluisrp
juanluisrp

Reputation: 237

You can specify the log path in the file geonetwork/WEB-INF/classes/log4j.xml in webapps folder and set it to an existing folder, checking that tomcat user can write there.

  <appender name="fileAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="Threshold" value="ALL"/>
    <param name="File" value="logs/geonetwork.log"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c] - %m%n"/>
    </layout>
  </appender>

Upvotes: 1

Related Questions