Hi all, I have two .war files that when deployed at a plain Debian 9 VM are working fine. I have prepared a docker file so as to deploy the same apps within a docker container and for some reason one of the apps is not loading due to some error.
Dockerfile: FROM debian:latest USER root ENV CATALINA_HOME /opt/tomcat ENV PATH $CATALINA_HOME/bin:$PATH RUN mkdir -p "$CATALINA_HOME" WORKDIR $CATALINA_HOME # Install packages RUN apt update && apt install default-jdk -y && groupadd tomcat && useradd -s /bin/false -g tomcat -d $CATALINA_HOME tomcat COPY apache-tomcat-8.5.50.tar.gz /tmp/ RUN tar xzvf /tmp/apache-tomcat-8.5.50.tar.gz -C /opt/tomcat --strip-components=1 ADD app.war $CATALINA_HOME/webapps/ ADD orbeon.war $CATALINA_HOME/webapps/ ADD server.xml $CATALINA_HOME/conf/ ADD web.xml $CATALINA_HOME/conf/ ADD mariadb-java-client-2.4.1.jar $CATALINA_HOME/lib ADD setenv.sh $CATALINA_HOME/bin/ RUN chgrp -R tomcat $CATALINA_HOME && \ chown -R tomcat webapps/ work/ temp/ logs/ && \ chmod -R g+r conf && \ chmod g+x conf && \ chmod 750 $CATALINA_HOME/bin/setenv.sh && \ rm -f /tmp/apache-tomcat-8.5.50.tar.gz; EXPOSE 8443 CMD ["catalina.sh", "run"] I have tried also several other ways, by using directly other docker tomcat images everytime resulting with some error. The error I am getting now is: 10:21:32.201 WARN c.h.c.c.s.CubaXmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot create inner bean '(inner bean)#27690bd5' of type [org.springframework.security.web.authentication.www.BasicAuthenticationFilter] while setting constructor argument with key [4]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#27690bd5': Cannot resolve reference to bean 'clientAuthenticationEntryPoint' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientAuthenticationEntryPoint' defined in class path resource [com/haulmont/addon/restapi/rest-dispatcher-spring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException 10:21:32.243 ERROR c.h.a.r.a.r.RestAPIDispatcherServlet - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot create inner bean '(inner bean)#27690bd5' of type [org.springframework.security.web.authentication.www.BasicAuthenticationFilter] while setting constructor argument with key [4]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#27690bd5': Cannot resolve reference to bean 'clientAuthenticationEntryPoint' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientAuthenticationEntryPoint' defined in class path resource [com/haulmont/addon/restapi/rest-dispatcher-spring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException Since I am not very familiar with tomcat, I would appreciate any pointers how to troubleshoot this. Thanx, Alex