I don't know much about ant, however the exception basically says that JVM checked if JSourceWriter.class file was in castor*.properties, and found out that the properties files in the class path were not a JAR or ZIP file.
It looks like your <fileset... element adds these files into the CLASSPATH. However, the directory in which these files reside must be included in the CLASSPATH, not the files themselves. Ozgur -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 7:54 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] source generation of schema "included" schemas hi Keith Ok so I didn't wait to get to work. I have identified the issue but I'm not sure whether it is me or Castor or Ant or all three! So here goes Using Ant 1.4.1, if I include castor*.properties directly in a <path> <path id="library.classpath"> <fileset dir="${module.xmlbinding.inputs}"> <include name="castor.properties"/> <include name="castorbuilder.properties"/> </fileset> </path> and then use this <path> in the generation step: <target name="generateContact" > <java classname="org.exolab.castor.builder.SourceGenerator" fork="${java.fork}" failonerror="yes"> ... <classpath refid="library.classpath" /> </java> </target> Then If ${java.fork} == 'no' I get the following non-fatal error from every Castor class "Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource org/exolab/javasource/JSourceWriter.class from E:\projects\idea\sde\Development\Build\sourcemodules\castorIssue\castor.prop erties" If ${java.fork} == 'yes' no error but the properties file are ignored (although the Ant output shows the properties correctly in the -classpath set) But if I use a JAR file containing the same castor*.properties then every thing works fine regardless. How do you recommend that the inclusion of castor*.properties be performed :) I can send a small jar with the full test if this is useful, but didn't want to blast it to the list. thanks Jim Nicolson -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Keith Visco Sent: Saturday, 23 February 2002 9:04 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] source generation of schema "included" schemas Jim Nicolson wrote: > > hi Keith > > Just a followup on this. > > Is there any way to specify a different package > for the imported types. Yes...I do it myself... > > Under the default generation, the 'importing' classes > assume that the 'imported' classes are both in the same package. > Only when the proper namespaces have not been defined. > > I tried using the castorbuilder.properties to set the > org.exolab.castor.builder.nspackages property but > it had no effect. > > # XML namespace mapping to Java packages > # > #org.exolab.castor.builder.nspackages=\ > http://www.xyz.com/schemas/project=com.xyz.schemas.project,\ > http://www.xyz.com/schemas/person=com.xyz.schemas.person > > Am I misunderstanding the intent of this property and is > there a solution to this issue. > Have you also set up the namespace association within your Schema files? <schema targetNamespace="http://www.xyz.com/schemas/person" xmlns:prj="http://www.xyz.com/schemas/project"> <import schemaLocation="..."/> <element name="project" type="prj:projectType"/> </schema> --Keith ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
