I have added -verbose:class to VM options, but it only prints out Loaded jar, not the error one. Tomcat version: apache-tomcat Given you have access to a Bash terminal, you can try this one-liner to test your jars assuming they are all in the same directory.
This is an older thread but I just ran into this issue. It turns out, if you package up your application using tar rather than creating a war file on Mac OS and then extract it on a Linux server, you'll end up with a ". Unfortunately, because Tomcat tries to load every jar in your lib directory, it picks up these additional files which aren't jars at all.
They contain extended file attribute data that Mac OS wants. This exception occurres when your war file is damaged. Not only jar files but also other files in war file may be damaged. In my case, I found a damaged png file and after removing it, war file deployed successfully. In order to find the damaged file use this command:. By running the command, name of each extracted file, will be printed and when it reaches to the damaged file, it prints the exception. So you can find it easily.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Copying the file to a local drive fixed the issue. In my case , my -Dloader. In my case SL4j-api. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. ZipException: error in opening zip file Ask Question.
Asked 13 years, 1 month ago. Active 1 year, 10 months ago. Viewed k times. When I invoke the new JarFile constructor on this file, I get an exception which says: java. ZipException: error in opening zip file When I manually unzip the contents of this Jar file and zip it up again, it works fine.
Sandhya Agarwal Sandhya Agarwal 1, 2 2 gold badges 9 9 silver badges 7 7 bronze badges. Thanks for the hint about rezipping the file -- that fixed for me. I've had this problem on Mac when Windows and Linux worked just fine. Using JarInputStream fixed the problem for me.
I have faced the same problem on Tomcat Start UP [catalina. Seems to be OS dependend. The jar is some 80 MBytes. Older jars are readable just fine on the same Windows 7.
Which there would be better debugging options for this. WarResourceSet a4] at org. IllegalArgumentException: java. ZipException: error in opening zip file at org.
IllegalStateException: ContainerBase. Driver] but failed to unregister it when the web application was stopped. WarResourceSet de4e35] at org. Tomcat may not be running. ClassLoaderLogManager Jun I found article on SDN about compressing and decompressing options in Java. I slightly modified one of example codes to produce method which was finally capable of handling the archive. This method is also capable of handling empty zip archive.
I believe you can adjust the method to suit your needs as all zip classes have equivalent subclasses for. Do you have log4j. If you do make sure that the log4j. It can also be related with the ant version may be not your case, but I do put it here for reference :.
You have a. Starting with ant 1. This attempted opening will fail with the error "java. The problem does not exist with ant 1. On a side note, did you consider having separate jars? You could in the manifest of your main jar, refer to the other jars with this attribute:. Then, place all of your jars in the same folder. Again, may be not valid for your case, but still there for reference.
I've seen this exception before when whatever the JVM considers to be a temp directory is not accessible due to not being there or not having permission to write. I solved this by clearing the jboss-x. I saw this with a specific Zip-file with Java 6, but it went away when I upgrade to Java 8 did not test Java 7 , so it seems newer versions of ZipFile in Java support more compression algorithms and thus can read files which fail with earlier versions. Liquibase was getting this error for me.
I resolved this after I debugged and watched liquibase try to load the libraries and found that it was erroring on the manifest files for commons-codec Essentially, there is either a corrupt zip file somewhere in your path or there is a incompatible version being used.
When I did an explore on Maven repository for this library, I found there were newer versions and added the newer version to the pom.
0コメント