You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by rsanford <rs...@nolimitsystems.com> on 2000/08/12 20:01:58 UTC
xerces not finding schema...
i set validation to true. i have in my document the following:
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="fc.xsd"
just like the xerces documentation says i need to have. i
am getting an exception thrown saying that xerces cannot
find fc.xsd. exception details are at the bottom of this note.
i started out with my schema document in the same directory
as my .jar files. no luck. so i looked at the code where
xerces is looking for the file (hooray for open source!)
and they seem to want to look in:
System.getProperty("user.dir")
for the schema. so, i put my schema in that directory. still
no luck.
i then tried to explicitly set the path to the schema in my
source code to
e:\development\classpath\fc.xsd
but i get the same error message. i think that maybe java
has problems with long filenames under win2k so i cut it to
e:\develo~1\classp~1\fc.xsd
and i still get the same error.
what am i doing wrong?
thanks,
rjsjr
---------------------------------------------------------------
running on win2k SP1
using xerces binary distribution 1.1.3
using sun jdk 1.2.2
[Fatal Error] :0:0: File "fc.xsd" not found.
java.lang.NullPointerException
at
org.apache.xerces.validators.common.XMLValidator.resolveSchemaGrammar(XMLVal
idator.java:2049)
at
org.apache.xerces.validators.common.XMLValidator.bindNamespacesToElementAndA
ttributes(XMLValidator.java:1911)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:697)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1852)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1000)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)