You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by mu...@axa-sunlife.co.uk on 2002/01/28 19:39:29 UTC

validating xml against a schema using xerces 1.4.4


Hi,
I am using xerces 1.4.4 to validate an input xml document against a schema.
This schema includes two other schemas. I have registered a entity resolver with
the parser to resolve references to these included schemas but the resolution
fails at the parent itself. The following
exception is thrown:
org.xml.sax.SAXParseException: General Schema Error: Schema in
/Schema/v3_0/BQRequest.xsd has a different target namespace from the one
specified in the instance document :/MySchemas/Schema/v3_0/BQRequest.xsd.
How do I resolve this.
Thanks,
Murali




====================================================================
The contents and any attachments of this electronic mail message are
confidential and intended only for the named addressees. 

Dissemination, forwarding, publication or other use of the message 
or attachments by any unauthorised person is strictly prohibited.
Unless stated to the contrary, any opinions expressed in this message
are personal and may not be attributed to AXA Sun Life or any member
of the AXA Group of Companies.

Internet e-mails are not necessarily secure. AXA Group does not accept
responsibility for changes made to this message after it was sent.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


NoClassDefFoundError for org.xml.sax.ContentHandler

Posted by Paul Erion <p_...@yahoo.com>.
I've been staring at this problem for a while now and I can't
figure it out ... the worst part of it I have a sneaky suspicion
that I'm just being brain dead.

I've got a class "MyParserDriver" (that delegates to the Xerces
parser) and one of its methods is:

    public void setContentHandler( ContentHandler handler ) {}

(note: it doesn't matter the contents of the body, an empty body
still causes me grief)

I have another class "MyContentHandler" that implements the
"org.xml.sax.ContentHandler" interface.

Now, from a method in a third class I create my driver

    MyParserDriver driver  = new MyParserDriver();
    ContentHandler handler = new MyContentHandler();

    driver.setContHandler( handler );

Everything compiles fine.  I put the application jar file,
"xercesImpl.jar", and "xmlParserAPIs.jar" in the same directory
and then from that directory ...

    java -jar -classpath ".;xmlParserAPIs.jar;xercesImpl.jar" App.jar

and I get the following error:

    Exception in thread "main" java.lang.NoClassDefFoundError:
        org/xml/sax/ContentHandler

I'm using Win2K Pro, JDK 1.3.1_02, and Xerces-J 2.0.0 beta 4

Might anyone have a clue what silly thing I'm doing wrong?

Thanks,

:Paul

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org