I have already tried that with keeping the same exception. Her is the output of the EnvironmentChecker
#---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff found: ---- version.DOM.draftlevel=2.0fd java.class.path=C:\projects\example\_ws\xmlValidation\bin;C:\projects\exampl e\_ws\xmlValidation\lib\xercesImpl.jar;C:\projects\example\_ws\xmlValidation \lib\xml-apis.jar version.JAXP=1.1 java.ext.dirs=C:\java\sun\j2sdk1.4.2_13\jre\lib\ext #---- BEGIN Listing XML-related jars in: foundclasses.sun.boot.class.path ---- xercesImpl.jar-apparent.version=xercesImpl.jar WARNING.present-unknown-version xercesImpl.jar-path=C:\java\sun\j2sdk1.4.2_13\jre\lib\endorsed\xercesImpl.ja r xml-apis.jar-apparent.version=xml-apis.jar present-unknown-version xml-apis.jar-path=C:\java\sun\j2sdk1.4.2_13\jre\lib\endorsed\xml-apis.jar #----- END Listing XML-related jars in: foundclasses.sun.boot.class.path ----- version.xerces2=Xerces-J 2.9.0 version.xerces1=not-present version.xalan2_2=Xalan Java 2.4.1 version.xalan1=not-present version.ant=not-present java.version=1.4.2_13 version.DOM=2.0 version.crimson=present-unknown-version sun.boot.class.path=C:\java\sun\j2sdk1.4.2_13\jre\lib\endorsed\xercesImpl.ja r;C:\java\sun\j2sdk1.4.2_13\jre\lib\endorsed\xml-apis.jar;C:\java\sun\j2sdk1 .4.2_13\jre\lib\rt.jar;C:\java\sun\j2sdk1.4.2_13\jre\lib\i18n.jar;C:\java\su n\j2sdk1.4.2_13\jre\lib\sunrsasign.jar;C:\java\sun\j2sdk1.4.2_13\jre\lib\jss e.jar;C:\java\sun\j2sdk1.4.2_13\jre\lib\jce.jar;C:\java\sun\j2sdk1.4.2_13\jr e\lib\charsets.jar;C:\java\sun\j2sdk1.4.2_13\jre\classes #---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ---- xercesImpl.jar-apparent.version=xercesImpl.jar WARNING.present-unknown-version xercesImpl.jar-path=C:\projects\example\_ws\xmlValidation\lib\xercesImpl.jar xml-apis.jar-apparent.version=xml-apis.jar present-unknown-version xml-apis.jar-path=C:\projects\example\_ws\xmlValidation\lib\xml-apis.jar #----- END Listing XML-related jars in: foundclasses.java.class.path ----- version.SAX=2.0 version.xalan2x=Xalan Java 2.4.1 #----- END writeEnvironmentReport: Useful properties found: ----- # YAHOO! Your environment seems to be OK. If you'd like to, I can send the code to you Thanks again Bernd > -----Original Message----- > From: Michael Glavassevich [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 09, 2007 4:15 PM > To: j-users@xerces.apache.org > Subject: RE: Add schema to xmldocument > > "Bernd Kolb \([EMAIL PROTECTED])" <[EMAIL PROTECTED]> wrote on 01/09/2007 > 09:17:22 AM: > > > Hm. I have noticed something strange. > > > > When I am running the code with Sun JDK 1.5_6 everything > works nicely. > > When switching to JDK 1.4.2_13 I am getting this error. > > > > org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the > declaration > > of element 'log'. > > at > > > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExcep > tion(Unknown > > Source) > > at > org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) > > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > > Source) > > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > > Source) > > at > > > org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknow > > n > > Source) > > at > > org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown > > Source) > > at > > > org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown > > Source) > > at > > > org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown > > Source) > > at > > > org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown > > Source) > > at > org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown > > Source) > > at javax.xml.validation.Validator.validate(Unknown Source) > > at XMLValidation.<init>(XMLValidation.java:52) > > at XMLValidation.main(XMLValidation.java:23) > > Exception in thread "main" > > > > In case of jdk 1.5 xerces is part of the jdk, right? > > Not exactly. It's Sun's two to three year old fork off the > Xerces codebase. It has bugs which are unique to it and > others which have long been fixed in Apache. > > > So normally I should be able to just add xml-apis.jar and > > xercesImpl.jar to the classpath when using 1.4 and it should work, > shouldn't > > it???? > > Adding xml-apis.jar to the classpath doesn't work. You need > to use the Endorsed Standards Override Mechanism [1][2]. > > > I am a bit confuesd.... > > > > > > Best reagards > > > > Bernd Kolb > > [1] http://xerces.apache.org/xerces2-j/faq-general.html#faq-4 > [2] http://java.sun.com/j2se/1.4.2/docs/guide/standards/ > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: [EMAIL PROTECTED] > E-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]