AntのClassLoaderでZipExceptionが起こる件

[MindProcessor]/[Slim3]をantから使う - A Prudencial Lifeで紹介した内容に関する作業中に発見したのですが、本質的に全く別なので書き留めておきます。

Java歴結構長いつもりなのですが、こんな現象は初めて知りました。
要は、classpathに含めるjarファイルがケンカした結果、AntのClassLoaderが以下のような例外を投げることがあります。

[httpmpost] java.util.zip.ZipException: error in opening zip file
[httpmpost] at java.util.zip.ZipFile.open(Native Method)
[httpmpost] at java.util.zip.ZipFile.(ZipFile.java:114)
[httpmpost] at java.util.zip.ZipFile.(ZipFile.java:131)
[httpmpost] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
[httpmpost] at org.apache.tools.ant.AntClassLoader.getResource(AntClassLoader.java:934)
[httpmpost] at org.apache.log4j.helpers.Loader.getResource(Loader.java:109)
[httpmpost] at org.apache.log4j.LogManager.(LogManager.java:105)
[httpmpost] at org.apache.log4j.Logger.getLogger(Logger.java:104)
[httpmpost] at org.apache.commons.logging.impl.Log4JLogger.(Log4JLogger.java:102)
[httpmpost] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[httpmpost] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[httpmpost] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[httpmpost] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[httpmpost] at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
[httpmpost] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
[httpmpost] at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
[httpmpost] at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
[httpmpost] at org.apache.commons.httpclient.HttpClient.(HttpClient.java:65)
[httpmpost] at net.sf.fikin.ant.httpclientanttask.BaseAntMethod.getHttpClient(BaseAntMethod.java:287)
[httpmpost] at net.sf.fikin.ant.httpclientanttask.BaseAntMethod.execute(BaseAntMethod.java:388)
[httpmpost] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[httpmpost] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[httpmpost] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[httpmpost] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[httpmpost] at java.lang.reflect.Method.invoke(Method.java:597)
[httpmpost] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[httpmpost] at org.apache.tools.ant.Task.perform(Task.java:348)
[httpmpost] at org.apache.tools.ant.Target.execute(Target.java:357)
[httpmpost] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[httpmpost] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[httpmpost] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[httpmpost] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[httpmpost] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[httpmpost] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[httpmpost] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[httpmpost] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)

そもそもがZipファイルを扱うスクリプトだったので、始め処理内容自体を疑っていたのですが、Antスクリプト内で参照するclasspathを調整した結果解決しました。
解決のヒントになったエントリがこちら:deployment - JBoss5: Cannot deploy due to java.util.zip.ZipException: error in opening zip file - Stack Overflow

どうやら、jarファイルを作った時のJDKのバージョンが違うと出たりするみたいです。
ちなみにAntのバージョンはHelios組み込みの1.7.1です今回。