Eclipse - Tomcat 7 - java.lang.IndexOutOfBoundsException on publish

后端 未结 4 1428
时光取名叫无心
时光取名叫无心 2021-02-18 18:32

I have a Webproject using maven and when I try to deploy it to Tomcat 7, I get the following message:

Publishing failed
Could not publish to the server.
java.lan         


        
4条回答
  •  既然无缘
    2021-02-18 18:35

    Most probably some jar of your local maven repo that are included in your .war as dependency are corrupted. As jtsnr suggested, you can deploy your .war outside Eclipse to discover which jar is corrupted. But there is a quicker solution. Just locate the /target dir of your maven project (or just unzip the .war) and locate inside the *.jar files (should be under WEB-INF/lib). Now, with a simple zip tool (e.g.: 7-Zip) select all and extract. You will receive a prompt for each corrupted file you have: after this, locate the file in your Maven repo and delete the entire version for that file. In this way, if you have a big repo, you gain a lot of time avoiding to re-download the entire jar ecosystem :) HTH..

提交回复
热议问题