ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luis Andrei Cobo <>
Date Wed, 18 Dec 2002 14:55:32 GMT
<jar destfile="${wardir}\lib\myjar.jar" basedir="${buildclient}"/> ( I've
been known to put index="true" when compiling against 1.3+ )
<signjar jar="${wardir}\lib\myjar.jar"
keystore="${}\somekeystore" storepass="nyob"
alias="something" verbose="true"/>

the jar appears to be generated fine. The jar is signed correctly and the
load of the applet prompts with the certificate as we require.

Not doing anything I haven't done before a million times with previous
versions of ant.

However, the problem is not with the signing, but the jar files themselves.

I get the stack trace after I try to run the applets- in fact the first
class called in the applet runs fine. The next 'screen' which is a second
call to the applet, I get the exception and can not recover. The exception
only occurs after the first interaction with the applet. The initial load
goes smoothly. Subsequent calls fail:

java.lang.IllegalStateException: Zip File is Closed

I switched to using <exec> to run jar instead and the jars work fine. I have
not seen that problem again since doing so either, but that leads me to
beleive there is something not quite perfect with the jar/zip implementation
provided in ant. Unlike the SignJar task, which makes a call directly to the
sun tool jarsigner.exe, jar is an implementation of the java.util.jar and packages, which may be flawed, and I don't have time to track
down what that flaw might be.

needless to say it is somewhat disconcerting to have discovered that NOT
using the jar tool has been more reliable than using it has proven to be
since I have been using ant for as long as its been available and never
encountered this problem before.


-----Original Message-----
From: Conor MacNeill []
Sent: Wednesday, December 18, 2002 9:50 AM
To: Ant Users List

Luis Andrei Cobo wrote:
> HI all,
> I am having a difficult issue regarding the use of JAR task. WE jar and
> some applets and deploy them. When we do this we get all sorts of ZIP
> Exceptions after the jars are loaded with IllegalStateExceptions-Zip Entry
> Not Found. This is Java Plugin 1.4.1_01 and ant is running on 1.4.1_01.
> we use the jar tool manually on the command line, the jars that are
> generated and signed work perfectly. But I dont want to resort to running
> batch script for this process. We've been trying to track down any
> problem. We've tried with indexing on/off and although indexing off has
> successful behaviour its still unpredictable and that is unacceptable. 
> IF anyone has any information about this it would help a great deal. I
> the jar implementation is not using the sun jar tools but instead works
> the jar/zip api.  

Could you please give me a step-by-step process for what you do to generate 
the jars and then sign them. Where do you get the error? Could we see a 
stack trace? We need more info to reproduce problems.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message