You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Roger Adema <ad...@us.ibm.com> on 2002/06/26 15:28:39 UTC

ZipException: Access is denied

Hello, everyone -

This is my first post.  I am pretty much new to web development (not really
much of a Java expert either) and am just starting to play with Tomcat.
I've having problems just getting it to start and I know it must be a
config problem, but I haven't been able to figure it out yet.  I've
searched the archives and haven't found a recent post that described a
similar problem.

My environment:  Win2K, IBM JDK1.3.1, Tomcat 4.0.4 (trying to bring it up
standalone)

Whenever I try to start Tomcat using startup.bat, I receive the exception
and stack trace that's at the bottom of this note.  I found some posts that
referenced a "ZipException: Permission denied" problem that was caused by
duplicate jars - could this be another symptom of the same problem?  If so,
what exactly is the search path that Tomcat uses for jars?  I noticed that
CLASSPATH is set by setclasspath.bat to be %JAVA_HOME%\lib\tools.jar.  I
have tried both 4.0.3 and 4.0.4, both unzipping by hand and using the
installable image, but with no difference.

Any help is greatly appreciated!

Roger

---------------------------------

C:\Program Files\Apache Tomcat 4.0\bin>startup
Using CATALINA_BASE:   C:\program files\apache tomcat 4.0
Using CATALINA_HOME:   C:\program files\apache tomcat 4.0
Using CATALINA_TMPDIR: C:\program files\apache tomcat 4.0\temp
Using JAVA_HOME:       c:\Program Files\IBM\Java131
java.util.zip.ZipException: Access is denied
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:127)
        at java.util.jar.JarFile.<init>(JarFile.java:138)
        at java.util.jar.JarFile.<init>(JarFile.java:80)
        at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1216)
        at
org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java:200)
        at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:261)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:138)
Bootstrap: Class loader creation threw exception
java.lang.IllegalArgumentException: addRepositoryInternal:
java.util.zip.ZipException: Access is denied
        at
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1246)
        at
org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java:200)
        at
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:261)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:138)
C:\Program Files\Apache Tomcat 4.0\bin>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ZipException: Access is denied

Posted by Ben Walding <be...@walding.com>.
Another good one (which will result in a permission denied message) is 
if you unpack a jar file into a directory with a .jar extension eg...

%TOMCAT_HOME%/lib/xerces.jar/org...

TomCat will choke on it as it can't unpack the directory that it 
believes is a file.


Andy Eastham wrote:

>Roger,
>
>Try putting tomcat in a path with no spaces, eg c:\apache_tomcat_4.0
>
>As for classpath, any jars under tomcat\webapps\app_name\WEB_INF\lib (your
>webapps private classesd)or tomcat\common\lib (classes shared between
>webapps, usually db drivers etc) will be automatically included in the
>classpath.
>
>All the best,
>
>Andy
>
>  
>
>>-----Original Message-----
>>From: Roger Adema [mailto:ademarog@us.ibm.com]
>>Sent: 26 June 2002 14:29
>>To: tomcat-user@jakarta.apache.org
>>Subject: ZipException: Access is denied
>>
>>
>>Hello, everyone -
>>
>>This is my first post.  I am pretty much new to web development
>>(not really
>>much of a Java expert either) and am just starting to play with Tomcat.
>>I've having problems just getting it to start and I know it must be a
>>config problem, but I haven't been able to figure it out yet.  I've
>>searched the archives and haven't found a recent post that described a
>>similar problem.
>>
>>My environment:  Win2K, IBM JDK1.3.1, Tomcat 4.0.4 (trying to bring it up
>>standalone)
>>
>>Whenever I try to start Tomcat using startup.bat, I receive the exception
>>and stack trace that's at the bottom of this note.  I found some
>>posts that
>>referenced a "ZipException: Permission denied" problem that was caused by
>>duplicate jars - could this be another symptom of the same
>>problem?  If so,
>>what exactly is the search path that Tomcat uses for jars?  I noticed that
>>CLASSPATH is set by setclasspath.bat to be %JAVA_HOME%\lib\tools.jar.  I
>>have tried both 4.0.3 and 4.0.4, both unzipping by hand and using the
>>installable image, but with no difference.
>>
>>Any help is greatly appreciated!
>>
>>Roger
>>
>>---------------------------------
>>
>>C:\Program Files\Apache Tomcat 4.0\bin>startup
>>Using CATALINA_BASE:   C:\program files\apache tomcat 4.0
>>Using CATALINA_HOME:   C:\program files\apache tomcat 4.0
>>Using CATALINA_TMPDIR: C:\program files\apache tomcat 4.0\temp
>>Using JAVA_HOME:       c:\Program Files\IBM\Java131
>>java.util.zip.ZipException: Access is denied
>>        at java.util.zip.ZipFile.open(Native Method)
>>        at java.util.zip.ZipFile.<init>(ZipFile.java:127)
>>        at java.util.jar.JarFile.<init>(JarFile.java:138)
>>        at java.util.jar.JarFile.<init>(JarFile.java:80)
>>        at
>>org.apache.catalina.loader.StandardClassLoader.addRepositoryIntern
>>al(StandardClassLoader.java:1216)
>>        at
>>org.apache.catalina.loader.StandardClassLoader.<init>(StandardClas
>>sLoader.java:200)
>>        at
>>org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(C
>>lassLoaderFactory.java:261)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:138)
>>Bootstrap: Class loader creation threw exception
>>java.lang.IllegalArgumentException: addRepositoryInternal:
>>java.util.zip.ZipException: Access is denied
>>        at
>>org.apache.catalina.loader.StandardClassLoader.addRepositoryIntern
>>al(StandardClassLoader.java:1246)
>>        at
>>org.apache.catalina.loader.StandardClassLoader.<init>(StandardClas
>>sLoader.java:200)
>>        at
>>org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(C
>>lassLoaderFactory.java:261)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:138)
>>C:\Program Files\Apache Tomcat 4.0\bin>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><ma...@jakarta.apache.org>
>>For additional commands, e-mail:
>><ma...@jakarta.apache.org>
>>
>>
>>    
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: ZipException: Access is denied

Posted by Andy Eastham <an...@gliant.com>.
Roger,

Try putting tomcat in a path with no spaces, eg c:\apache_tomcat_4.0

As for classpath, any jars under tomcat\webapps\app_name\WEB_INF\lib (your
webapps private classesd)or tomcat\common\lib (classes shared between
webapps, usually db drivers etc) will be automatically included in the
classpath.

All the best,

Andy

> -----Original Message-----
> From: Roger Adema [mailto:ademarog@us.ibm.com]
> Sent: 26 June 2002 14:29
> To: tomcat-user@jakarta.apache.org
> Subject: ZipException: Access is denied
>
>
> Hello, everyone -
>
> This is my first post.  I am pretty much new to web development
> (not really
> much of a Java expert either) and am just starting to play with Tomcat.
> I've having problems just getting it to start and I know it must be a
> config problem, but I haven't been able to figure it out yet.  I've
> searched the archives and haven't found a recent post that described a
> similar problem.
>
> My environment:  Win2K, IBM JDK1.3.1, Tomcat 4.0.4 (trying to bring it up
> standalone)
>
> Whenever I try to start Tomcat using startup.bat, I receive the exception
> and stack trace that's at the bottom of this note.  I found some
> posts that
> referenced a "ZipException: Permission denied" problem that was caused by
> duplicate jars - could this be another symptom of the same
> problem?  If so,
> what exactly is the search path that Tomcat uses for jars?  I noticed that
> CLASSPATH is set by setclasspath.bat to be %JAVA_HOME%\lib\tools.jar.  I
> have tried both 4.0.3 and 4.0.4, both unzipping by hand and using the
> installable image, but with no difference.
>
> Any help is greatly appreciated!
>
> Roger
>
> ---------------------------------
>
> C:\Program Files\Apache Tomcat 4.0\bin>startup
> Using CATALINA_BASE:   C:\program files\apache tomcat 4.0
> Using CATALINA_HOME:   C:\program files\apache tomcat 4.0
> Using CATALINA_TMPDIR: C:\program files\apache tomcat 4.0\temp
> Using JAVA_HOME:       c:\Program Files\IBM\Java131
> java.util.zip.ZipException: Access is denied
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:127)
>         at java.util.jar.JarFile.<init>(JarFile.java:138)
>         at java.util.jar.JarFile.<init>(JarFile.java:80)
>         at
> org.apache.catalina.loader.StandardClassLoader.addRepositoryIntern
> al(StandardClassLoader.java:1216)
>         at
> org.apache.catalina.loader.StandardClassLoader.<init>(StandardClas
> sLoader.java:200)
>         at
> org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(C
> lassLoaderFactory.java:261)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:138)
> Bootstrap: Class loader creation threw exception
> java.lang.IllegalArgumentException: addRepositoryInternal:
> java.util.zip.ZipException: Access is denied
>         at
> org.apache.catalina.loader.StandardClassLoader.addRepositoryIntern
> al(StandardClassLoader.java:1246)
>         at
> org.apache.catalina.loader.StandardClassLoader.<init>(StandardClas
> sLoader.java:200)
>         at
> org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(C
> lassLoaderFactory.java:261)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:138)
> C:\Program Files\Apache Tomcat 4.0\bin>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>