Page 1 of 1

Error while deploying in Tomcat container

PostPosted: Wed Jul 12, 2023 6:11 pm
by 258.d.852
First, I build a WAR file from servoy platform by following this step

Image

Then, I start up a Tomcat container by executing

Code: Select all
docker container run -it -d --name tomcat -p 8081:8080 tomcat:jre17-temurin


I copied the WAR file from the host to the container by executing

Code: Select all
docker cp my_war_file.war tomcat:/usr/local/tomcat/webapps


Unfortunately, it is not successful and I got the error in log file

Code: Select all
11-Jul-2023 06:59:28.739 SEVERE [Catalina-utility-1] org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing docBase for context [/my_servoy_app]
    java.util.zip.ZipException: zip END header not found
            at java.base/java.util.zip.ZipFile$Source.findEND(Unknown Source)
            at java.base/java.util.zip.ZipFile$Source.initCEN(Unknown Source)
            at java.base/java.util.zip.ZipFile$Source.<init>(Unknown Source)
            ...


How can I overcome this issue?

Re: Error while deploying in Tomcat container

PostPosted: Thu Jul 13, 2023 10:34 am
by mboegem
What is the version of tomcat you are running on that docker instance?

I know a combination of tomcat v9 and java 17 should run fine.

Re: Error while deploying in Tomcat container

PostPosted: Thu Jul 13, 2023 11:04 am
by jcompagner
can you have a good look at your install? like application_server\lib and/or \drivers?

do you have there somewhere a 0 byte jar? please remove that.

you can also test the WAR itself so look inside and into WEB-INF/lib to see if you have a 0 bytes jar there