Hi all, I am new to Castor and so far - I am quite impressed. But I have one problem.
I am working on a project where performance is critical and the Java Objects have been created and can not be replaced by those created by the source code generator. So I am trying to map the java objects to xml using castor. So far this seems fine. But here are the problems I encountered that I do not know how to fix: However, how do I validate the contents of my java objects against the schema?? I tried using the setSchemaLocation method of the Marshaller but when I do this it includes the schema location in each element. Is there a way to validate the java object against the schema when your java objects only have get and set methods?? Also, if I am not using the source code generator - do I have to code my own validator - to ensure that the java objects incorporate the rules of the schema?? Thanks in advance for any help - I really appreciate it. Corina Corina Coughlan -----Original Message----- From: Keith Visco [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 9:51 PM To: coughlac Subject: Re: XML Mapping DTD Hi Corina, Castor XML used to work with JDK 1.1, but we no longer force that constraint. It still may work under 1.1, we just don't test it under 1.1 any longer. We test primarily using JDK 1.2.2 and 1.3.1. As for the error message, you'll need to make sure Xerces 1.4.0 jar is listed in your classpath. Example: set CLASSPATH=%CLASSPATH%;d:\castor\lib\xerces-j_1.4.0.jar You can obtain the jar file in the full castor archive available at our website (http://castor.exolab.org/download.html), or you can download it straight from apache (http://java.apache.org) --Keith coughlac wrote: > > Thanks Keith, > Sorry I am new to Castor and am very much in the dark about several > things - I have looked at the website until I am as blue as it is but > cannot find simple info such as: > Does Castor require a specific version of JDK - I am trying to get > Castor to convert a Schema into a Java object using JDK1.1.8 - is this > version of the JDK too old?? > I am using the following command > java org.exolab.castor.builder.SourceGenerator -i CoreHeader.xsd > -package ab.abc.defg.xml > > My classpath has all of the castor-0.9.3.21 jar files included on it and > the bin directory of the jdk > > The error I am getting is the infamous - NoClassDefFoundError: > org/xml/sax/InputSource > Any ideas?? > Corina > Corina Coughlan > > -----Original Message----- > From: Keith Visco [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 20, 2002 9:34 PM > To: coughlac > Subject: Re: XML Mapping DTD > > Hi Corina, > > Just remove the DOCTYPE tag from the mapping file. It's not required. > > Thanks, > > --Keith ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
