Keith Visco wrote:


Aaron Mulder wrote:

On Sun, 12 Oct 2003, Jacek Laskowski wrote:

Once Castor's team joined the mailing list and are ready to work out any
issues we've seen so far, who is in charge of deciding whether Castor is
the tool of our choice and we cease *immediatelly* writing POJOs and
handling mapping between XMLs and them by hand? I (and Aaron seemed
also) don't like writing them by hand, so let's hand it over to a tool
which is able to deal with it. If the only problem with Castor is the
above point, I don't see why Castor wouldn't be used.

I can certainly drive this decision.

       On this note, does anyone know of an authoritative yet free way to
validate a schema?  I'm trying to revise our Geronimo schemas to get out
of the J2EE namespace.  I'm at a point where Sun's "multi schema
validator" think my working Geronimo schema is valid but XMLBeans thinks
its not.  I have no idea "who's right".

       As far as Castor goes, every time I try to run Castor on
J2EE/Geronimo schemas, I get:

namespace 'http://www.w3.org/XML/1998/namespace' not declared in schema
at 
org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement(Sax2ComponentReader.java:256)

       This doesn't seem to be a fatal error, but no code is generated
either.  Aargh!  :)


Hi Aaron,

Which version of Castor are you using? It doesn't sound like you are
using 0.9.5.2.

I don't know about Aaron's build environment, but http://www.ibiblio.org/maven/castor/jars/ has only castor-0.9.5.jar which seems to not be the one we ought to use, doesn't it?


So, the problem boils down to the question how to upload the latest release of Castor?


Also, feel free to send me one of the schema you are having problems with and I will take a look at it.

The very similar issue you're able to take a look at once is to download Geronimo sources from CVS and while in modules/core run maven build. You should see something as follows:


[mkdir] Created dir: /disk/home/jacekl/cvs/geronimo/modules/core/target/castor/gen
[echo] Generating sources for /disk/home/jacekl/cvs/geronimo/modules/core/src/schema/geronimo-ejb-jar.xsd
[java] -- Suppressing non fatal warnings.
[java] namespace 'http://www.w3.org/XML/1998/namespace' not declared in schema
[java] at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement(Sax2ComponentReader.java:256)
[java] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[java] at org.exolab.castor.xml.schema.reader.IncludeUnmarshaller.<init>(IncludeUnmarshaller.java:126)
[java] at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:418)
[java] at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement(Sax2ComponentReader.java:253)
[java] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[java] at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:518)
[java] at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:571)
[java] at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:1126)
[touch] Creating /disk/home/jacekl/cvs/geronimo/modules/core/target/castor/geronimo-ejb-jar.xsd.tstamp
[echo] Compiling to /disk/home/jacekl/cvs/geronimo/modules/core/target/classes
[javac] Compiling 359 source files to /disk/home/jacekl/cvs/geronimo/modules/core/target/classes
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.


I'd bet Aaron sees a very similar message if not alike.


--Keith

Jacek



Reply via email to