Error Deploying Java WAR File: SEVERE: Exception fixing docBase for context

Simon K picture Simon K · Jan 30, 2013 · Viewed 8.8k times · Source

I have already resolved this one but it may help someone out there who stumbles across this problem. Stackoverflow has saved me countless hours on seemingly obscure and mysterious IT issues in the past.

Here is the error I was getting when deploying a WAR file to Tomcat on Windows. The WAR file was built on a Mac using JRuby & Warbler.

SEVERE: Exception fixing docBase for context [/XYZ] java.io.IOException: 
The filename, directory name, or volume label syntax is incorrect

According to others on SO the WAR file is corrupt and should not open via any of the Zip tools. This was not the case.

Instead, after many hours of investigation it turns out that I had a file in the Warbler path that had in the file name the pipe "|" character. This file name was not assigned intentionally While this is fine on a Mac, Windows does not like it.

SOLUTION: Remove the files with "|" in the file name and voila the WAR file deploys successfully!

Answer

Simon K picture Simon K · Jan 31, 2013

As per above:
SOLUTION: Remove the files with "|" in the file name and voila the WAR file deploys successfully!