Posted by: Chyne on: February 1, 2009
When everytime I start up the Tomcat in MyEclipse, the console will show up the following error message:-
SEVERE: Error in dependencyCheck
java.util.zip.ZipException: invalid entry size (expected 8389028 but got 420 bytes)
at java.util.zip.ZipInputStream.readEnd(Unknown Source)
at java.util.zip.ZipInputStream.read(Unknown Source)
at java.util.jar.JarInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.util.jar.JarInputStream.getBytes(Unknown Source)
at java.util.jar.JarInputStream.(Unknown Source)
at java.util.jar.JarInputStream.(Unknown Source)
at org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:373)
at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:184)
...
...
(more)
At first, I have no idea with this error and I just ignored it since I still able to start up the Tomcat without any problems but recently I figured out that this error will bring some impact to the deployed projects. If you had made some changes in the project, you will not be able to test in the browser except for files that serves for front-end purpose (e.g. HTML).
So, I did a research and found this page which is useful for me to resolve the problem:-
http://dev.eclipse.org/newslists/news.eclipse.webtools/msg17203.html
As I referred from the page, it specified that there is a problem with the MANIFEST.MF file but there are many projects in the Tomcat\webapps folder. I have no idea which project causes the error. So, I checked the log again and found this message:-
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/asip10-prj2] has not been started
Based from the log file, it is obvious telling me that the project ‘asip10-prj2’ is the root of the problem. I did a several testing with this project and I came out with the following scenarios:-
1. Remove the project
• Restart the Tomcat and no errors during the startup
2. Copy the project back to the webapps folder
• Error message:-
SEVERE: Error in dependencyCheck
java.util.zip.ZipException: invalid entry size (expected 8389028 but got 420 bytes)
3. Create a new folder in webapps and copy the contents of the project into the new folder
• Error message:-
SEVERE: Error in dependencyCheck
java.util.zip.ZipException: invalid entry size (expected 8389028 but got 420 bytes)
4. Remove MANIFEST.MF in the META-INF
• Error message:-
SEVERE: Error in dependencyCheck
java.util.zip.ZipException: invalid entry size (expected 8389028 but got 420 bytes)
After I removed the project from the webapps folder, everything is back to normal and the error does not show up again in the console when I restarted the Tomcat.
Hi Chyne, Could you please let me know how to resolve this issue. I too have the same problem. I was getting the following exception on tomcat startup.
EVERE: Error in dependencyCheck
java.io.IOException: invalid header field
February 2, 2009 at 12:20 am
one of the jar files in the problem project is corrupted, which jar is 420bytes in size?
February 2, 2009 at 9:42 pm
I did tried by replacing the catalina.jar in Tomcat/lib folder since the error log shows that most of the related java files are in the catalina but the error still exist in the console. This problem definitely happened between the IDE environment and the Tomcat. It’s not related with the Tomcat itself because the error not appears in the Tomcat log files and the error does not show up once the project has been removed from the workspace. More accurately to say, this problem is related in getting the MANIFEST file from the jar file as the log file showing this message:
at org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:373)
Based from your question, you remind me of the jar files in the WEB-INF\lib in the project folder. I found this page which proves my assumption is correct:-
http://kickjava.com/src/org/apache/catalina/util/ExtensionValidator.java.htm
As the log file showing that the error came from the (ExtensionValidator.java:184) and (ExtensionValidator.java:373), the two methods are about getting the jar’s manifest and also searching the manifest from the /WEB-INF/lib/.