ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Buckland, Ramon" <ramon.buckl...@csam.com>
Subject RE: ZipException from axis-java2wsdl
Date Thu, 22 Jan 2004 21:26:21 GMT
Ahh As often, 

I answered the problem 

Issue was:    
----------
	Getting a ZIPException when running the axis-java2wsdl task

Solution was: 
-------------
My classpath, when declaring the ant-task was including
the *.class files (compiled ready to be wsdl'd).

The Classloader found these .class files (on the classpath)
and assumed that, since they weren't a directory, were ZIP/Jar files and 
tried to load them.

Original Task Definition was:

          <path id="axis-ant.classpath">
             <fileset dir="${basedir}/lib">
             	<include name="**/*.jar" />
             </fileset>
             <fileset dir="${build.java.classes.dir}"/>
          </path>
          <taskdef resource="axis-tasks.properties"
classpathref="axis-ant.classpath" />

Solution, change the <fileset for the *.class's to be a pathelement
	   This: <fileset dir="${build.java.classes.dir}"/>
           to: <pathelement location="${build.java.classes.dir}"/>

I found my solution from : 

http://marc.theaimsgroup.com/?l=ant-user&m=106208501800761&w=2

(Thanks Stefan Bodewig - you have helped me also :-) )

Ramon


> 
> Hi,
>  
> Before I go diving into code (of the ant task :-/) 
> Has anyone an idea to what is causing
> axis-java2wsdl to throw a ZipException ?
> "java.util.zip.ZipException: error in opening zip file"
> (it repeats the stack trace until i CTRL-C.)
>  
> Is this axis-java2wsdl trying to open a JAR file somewhere ? 
> and, how can I find out what file is it having issues with ?
>  
> Any help is great .. thanks.
>  
> Gorey Details follows
>  
> <!-- --------- task  ---------------- -->
>     <axis-java2wsdl classname="${fullclassname}"
>          style="document"
>                    namespace="urn:package.my.com"
> location="${arg.tomcat.app.url}/${subpackagename}.${classname}"
>                    output="${wsdl.dir}/${fullclassname}.wsdl"
>                    >
>            <!-- if when trawling our classes, axis-ant finds 
> a class, we need
> to tell it how to remap the name -->
>         <mapping namespace="urn:package.my.com" 
> package="com.my.package"/>
>   </axis-java2wsdl> 
> <!-- --------- task  ---------------- -->  
>  
> do-java2wsdl:
>      [echo] fullclassname = com.my.package.soap.general.AnotherClass
>      [echo] classname = AnotherClass
>      [echo] subpackagename = general
>      [echo] arg.class.file =
> C:\Work\project\build\classes\j\com\my\package\soap\general\An
> otherClass.class
>      [echo] location =
> http://tomcatserver:8080/axis/services/general.AnotherClass
> <http://tomcatserver:8080/axis/services/general.AnotherClass> 
>      [echo] output =
> C:\Work\project\build\wsdl\general/com.my.package.soap.general
> .AnotherClass.wsdl
>      
> [axis-java2wsdl] java.util.zip.ZipException: error in opening zip file
> [axis-java2wsdl]        at java.util.zip.ZipFile.open(Native Method)
> [axis-java2wsdl]        at 
> java.util.zip.ZipFile.<init>(ZipFile.java:112)
> [axis-java2wsdl]        at 
> java.util.zip.ZipFile.<init>(ZipFile.java:128)
> [axis-java2wsdl]        at
> org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoa
> der.java:867)
> <... SNIP ...>
> Huge Stack trace repeats forever,
> 

==============================================================================
- NOTICE -

This message may contain confidential, proprietary or legally privileged 
information and is intended only for the use of the addressee named above.
No confidentiality or privilege is waived or lost by any mistransmission.
If you are not the intended recipient of this message you are hereby 
notified that you must not use, disseminate, copy it in any form or take
any action in reliance on it.  If you have received this message in error
please delete it and any copies of it and notify CREDIT SUISSE ASSET
MANAGEMENT
immediately.

Any views expressed in this message are those of the individual sender, 
except where the message specifically states otherwise and the sender is 
authorized to state them to be the views of CREDIT SUISSE ASSET MANAGEMENT.

CREDIT SUISSE GROUP, CREDIT SUISSE FIRST BOSTON, and each legal entity in
the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT  business
units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all e-mail
communications through its networks.

==============================================================================


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message