martedì 5 settembre 2017

You drive me crazy!! JBAS018037 ... zip file is empty

I don't know if you ever seen this kind of awful message during your deployment on JBoss via Eclipse

"Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018037: Failed to process WEB-INF/lib/FIRSTAPP.jar
Caused by: java.util.zip.ZipException: error in opening zip file" 


If your answer is "Oh, yes I hope you may help me!" you have a chance.
Once upon a time, I had a need to include the FIRSTAPP web application as jar within my SECONDAPP  web application.
So after two sleepless googling days, I took a look at properties of my SECONDAPP  project and I discovered the "Resolved dependencies from Workspace projects" property ticked (it means that Eclipse during deployment phase is going to take FIRSTAPP.jar not from Maven dependency but directly from the the FIRSTAPP project).
You should just untick this property and everything will go easy.

Finally everything was quite and the sun shone bright.