Eager to Code, Enjoy to Debug ~ Embark into Each Stage with Your Heart

Tomcat Startup Error: Error in dependencyCheck

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.

3 Responses to "Tomcat Startup Error: Error in dependencyCheck"

one of the jar files in the problem project is corrupted, which jar is 420bytes in size?

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/.

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

Leave a Reply

Friday’s Java Snack


In Java, "thread" means:

  • An instance of class java.lang.Thread
  • A thread of execution


An instance of Thread is just an object that has variables and methods, and lives and dies on the heap.
 
A thread of execution is an individual process that has its own call stack (one thread per call stack).

 

February 2009
M T W T F S S
« Jan   Mar »
 1
2345678
9101112131415
16171819202122
232425262728  

Archives


  • Polprav: Hello from Russia! Can I quote a post in your blog with the link to you?
  • Alex: Huge Thanks! This bug has annoyed me for a long time.
  • Donnieboy: Just wanted to drop you a line to say, I enjoy reading your site. I thought about starting a blog myself but don't have the time. Oh well maybe one

StatCounter

free hit counters