Thanks, John. Is "com.gs.ficc.cderiv.ant.taskdefs.XSDCompiler" identical to the file "org.exolab.castor.tools.XSDCompiler" in the latest snapshot of Castor in CVS? If not, will you please send me the source code for your XSDCompiler ant task?
Thanks for your help. Cheers, Dave -----Original Message----- From: Weir, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 1:15 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Problem executing SourceGenerator from Ant 1.4.1 with JDK 1.4 I use the taskdef supplied with the castor soure to run the generator and its cool even with 1.4 My ant script included for your perusal John <!-- We define our own local task ( need to be in ANT lib ) to run the XSD Compiler --> <taskdef name="XSDCompiler" classname="com.gs.ficc.cderiv.ant.taskdefs.XSDCompiler"/> <!-- Build the code generated by the XSD Compiler --> <target name="compile" depends="XSDCompile"> <javac srcdir="${temp}/CastorGen/src" destdir="${temp}/CastorGen/classes" includes="com/gs/ficc/cderiv/odyssey/fpml/**/*.java"> <classpath> <fileset dir="${Castor.dir}" > <include name="**/*.jar" /> </fileset> <fileset dir="${dist}" > <include name="external.jar" /> </fileset> <pathelement location="${temp}/CastorGen/classes" /> </classpath> </javac> </target> <target name="XSDCompile" depends="prepare, cleanCastor" description="Generate XML Binding Code deom XSD"> <XSDCompiler schema="${src}/com/gs/ficc/cderiv/odyssey/fpml/FpML-CD.xsd" package="com.gs.ficc.cderiv.odyssey.fpml" force="true" typeFactory="org.exolab.castor.builder.FieldInfoFactoryJ2" destDir="${temp}/CastorGen/src" /> </target> -----Original Message----- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: 03 April 2002 21:48 To: [EMAIL PROTECTED] Subject: [castor-dev] Problem executing SourceGenerator from Ant 1.4.1 with JDK 1.4 Has anybody found a solution to this problem? I'm executing the Castor source generator from within an ant build script. This worked fine until yesterday when I upgraded from jdk 1.3.2 to jdk 1.4. Now I get an IllegalAcessException when the build script executes the source generator. The same call to the source generator works with no errors when executed from the command line instead of from Ant. What can be going wrong? Thanks, Dave Ant version: 1.4.1 Jdk: 1.4 Castor: 0.9.3.9 Platform: Windows 2000 Pro Here's the relevant snippet from the ant build.xml: <java classname="org.exolab.castor.builder.SourceGenerator" classpathref="classpath" failonerror="true"> <arg value="-i"/> <arg value="${objects.dir}/${metadata.xsd}"/> <arg value="-dest"/> <arg value="${build.objects.src.dir}"/> <arg value="-package"/> <arg value="${objects.package}"/> </java> And here's The exception stack trace: java.lang.IllegalAccessError: class sun.reflect.GeneratedMethodAccessor15 cannot access its supercla ss sun.reflect.MethodAccessorImpl at sun.misc.Unsafe.defineClass(Native Method) at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45) at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381) at java.security.AccessController.doPrivileged(Native Method) at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:37 7) at sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.j ava:59) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.exolab.castor.xml.handlers.EnumFieldHandler.setValue(EnumFieldHandler.ja va:166) at org.exolab.castor.xml.UnmarshalHandler.processAttribute(UnmarshalHandler.jav a:1334) at org.exolab.castor.xml.UnmarshalHandler.processAttributes(UnmarshalHandler.ja va:1217) at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:10 87) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat or.java:1197) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne r.java:1862) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM LDocumentScan ner.java:1238) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner. java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:338) at org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:477) at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:409) at org.exolab.castor.xml.schema.SimpleTypesFactory.loadTypesDefinitions(SimpleT ypesFactory.j ava:397) at org.exolab.castor.xml.schema.SimpleTypesFactory.getType(SimpleTypesFactory.j ava:363) at org.exolab.castor.xml.schema.SimpleTypesFactory.getBuiltInType(SimpleTypesFa ctory.java:10 3) at org.exolab.castor.xml.schema.Schema.getSimpleType(Schema.java:824) at org.exolab.castor.xml.schema.Schema.getType(Schema.java:1170) at org.exolab.castor.xml.schema.reader.ExtensionUnmarshaller.<init>(ExtensionUn marshaller.ja va:114) at org.exolab.castor.xml.schema.reader.ComplexContentUnmarshaller.startElement( ComplexConten tUnmarshaller.java:164) at org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.startElement(Com plexTypeUnmar shaller.java:214) at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUn marshaller.ja va:334) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat or.java:1197) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne r.java:1862) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM LDocumentScan ner.java:1238) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner. java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035) at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.jav a:388) at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.jav a:441) at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:665) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:124) at org.apache.tools.ant.taskdefs.Java.run(Java.java:305) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:127) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:88) at org.apache.tools.ant.Task.perform(Task.java:217) at org.apache.tools.ant.Target.execute(Target.java:184) at org.apache.tools.ant.Target.performTasks(Target.java:202) at org.apache.tools.ant.Project.executeTarget(Project.java:601) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266) at org.apache.tools.ant.Task.perform(Task.java:217) at org.apache.tools.ant.Target.execute(Target.java:184) at org.apache.tools.ant.Target.performTasks(Target.java:202) at org.apache.tools.ant.Project.executeTarget(Project.java:601) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266) at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:120) at org.apache.tools.ant.Task.perform(Task.java:217) at org.apache.tools.ant.Target.execute(Target.java:184) at org.apache.tools.ant.Target.performTasks(Target.java:202) at org.apache.tools.ant.Project.executeTarget(Project.java:601) at org.apache.tools.ant.Project.executeTargets(Project.java:560) at org.apache.tools.ant.Main.runBuild(Main.java:454) at org.apache.tools.ant.Main.start(Main.java:153) at org.apache.tools.ant.Main.main(Main.java:176) ----------------------------------------------------------- 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
