openArchitectureWare.org

oAW has moved to Eclipse.

At this site you will find information about the outdated version openArchitectureWare 4, only.
Please read our letter of intent for further information.

 
   

Example Workspace: Build fails with ZipException

Some users have experienced problems with building the Example Workspace and get the following Exception:
java.util.zip.ZipException: error in opening zip file
(or similar).

The reason is that there are .class files in the classpath (i.e. not a directory nor a jar file). Since version 1.6 Ant tries to open these files and searches for Manifest entries. This fails with with a java.util.zip.ZipException

How to avoid:

This problem occurs only when using Java 5 in combination with Ant 1.6. Using Ant 1.5 or Java 1.4 will fix the problem. Another solution is to kick .class files from the classpath (see exclude tag).
  <target name="build.class" depends="build.init">
    <javac srcdir="${SRC}" destdir="${BUILD.CLASSES}"
           debug="on" optimize="off" deprecation="on"
    	   nowarn="true">
      <classpath>
      	<fileset dir="${LIB}"/>
      	<!--fileset dir="${GENFWLIB}"/-->
      	<fileset dir="${GENFWLIB}">
      	        <include name="**/*.jar"/>
      	      	<exclude name="*.class"/>
      	</fileset>
      </classpath>
    </javac>
  	<copy todir="${BUILD.CLASSES}">
  		<fileset dir="${SRC}" includes="**/*.xml"/>
  	</copy>
  </target> <!-- build.class -->

Thanks to Wolfgang Frank for this hint!

Example Workspace: Build fails with ZipException | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.