I cloned the project and wrote follwing Dockerfile
FROM openjdk:8u292-jdk
ENV HTTP_PROXY_HOST ....
ENV HTTP_PROXY_PORT ....
ENV HTTPS_PROXY_HOST ....
ENV HTTPS_PROXY_PORT ....
ADD etf-webapp /etf-webapp
RUN cd /etf-webapp \
&& ./gradlew -Dhttp.proxyHost=..... -Dhttp.proxyPort=... spotlessApply \
&& ./gradlew -Dhttp.proxyHost=..... -Dhttp.proxyPort=... build war
FROM alpine:latest
RUN mkdir -p /functx
ADD functx-1.0.xar /functx/functx-1.0.xar
RUN cd /functx && unzip functx-1.0.xar
FROM tomcat:8.5.66-jdk8-adoptopenjdk-openj9
RUN mkdir -p /root/.etf/ds/db/repo/functx && chmod -R 777 /root/.etf/
COPY --from=1 /functx/ /root/.etf/ds/db/repo/functx
COPY --from=0 /etf-webapp/build/libs/etf-webapp.war /usr/local/tomcat/webapps/etf-webapp.war
When I want to run a container with my image, I get follwing error:
WARNING [localhost-startStop-1] org.springframework.web.context.support.XmlWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'etsController': Unsatisfied dependency expressed through field 'testDriverController'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDriverController': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: A version in the format MAJOR.MINOR or MAJOR.MINOR.PATCH is required: "wfs20"
31-May-2021 06:49:22.240 SEVERE [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'etsController': Unsatisfied dependency expressed through field 'testDriverController'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDriverController': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: A version in the format MAJOR.MINOR or MAJOR.MINOR.PATCH is required: "wfs20"
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4705)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5168)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:691)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1015)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1895)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:823)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDriverController': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: A version in the format MAJOR.MINOR or MAJOR.MINOR.PATCH is required: "wfs20"
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
... 28 more
Description
I cloned the project and wrote follwing Dockerfile
When I want to run a container with my image, I get follwing error: