trouble deploying .WAR to tomcat

被刻印的时光 ゝ 提交于 2019-12-04 23:33:09

the war archive is corrupt or invalid.

check that the war generation procedure is not failing and that the war file is a valid zip file prior to copying to your pen drive etc.

if you're on windows you can do this by changing the file extension to .zip and opening with a zip program such as winzip or winrar.

if you're on another operating system you probably don't need to change the extension.

if the war is a valid zip it's probably being corrupted as a result of your transfer process ie going onto or from your pen drive.

This might be due to one of the following reasons.

  • Corrupted WAR file
  • Corrupted JAR files under WEB-INF/lib folder
Helmut

It could be a file protection issue, which you can fix by issuing something like: chmod 755 webapp.war

it happened to me that my sftp would just slap a 700 on the file transferred, causing that error.

have same error - with war all ok, restarting Tomcat resolve problem so i think it's becouse Tomcat start deploy war before it fully uploaded

First thing to check is if you have free space on your disk. If your partition is 100% full, then it will be impossible to extract the .WAR file.

I had the same problem, and rebuilding/uploading the war was NOT fixing the problem. What I ended up doing to fix it was uploading the war under a different name, then renaming the war once it had successfully deployed. A bit bizarre that this would work, but it was a better solution for me than restarting tomcat.

also possibly because of an incorrect entry in solr.xml It must point to where the .war file is located.

Also look out for file permissions of the .war file you have deployed. For me that was the cause.

In my case it was the manifest file.

Class-Path: 

should followed by a whitespace.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!