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 Romain Menetrier <ro...@artsum.fr> on 2002/11/14 11:43:47 UTC
problem with dom3 and jdk1.4
Hi,
I have to make my java application work with j2se 1.4. It currently runs
fine on 1.3 version, but when I run the program with java 1.4, there's a
problem of "method not found" (method setErrorHandler) on class
org.w3c.Document (I try to revalidate a dom3 document with Xerces and my
DomErrorHandler).
I think the class(interface) "org.w3c.Document" is loaded from inside the
jvm 1.4 and this interface in java 1.4 not have this method.
Can you say how to turn around this problem and have a program working on
java 1.3 & 1.4 ?
Here is my code :
DOMImplementationAS domImpl =
(DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
DOMASBuilder parser = domImpl.createDOMASBuilder();
DOMInputSource dom_input_source =
(((DOMImplementationLS)domImpl).createDOMInputSource());
dom_input_source.setStringData(getXmlString(xml));
Document doc = parser.parse(dom_input_source);
doc.setErrorHandler(this); //the class is the error handler too
doc.setNormalizationFeature("validate", true);
doc.normalizeDocument();
Thanks,
Romain
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: problem with dom3 and jdk1.4
Posted by Romain Menetrier <ro...@artsum.fr>.
Gregor,
Thanks for the link. I've already seen the "endorsed" way but I just want to
know if it's possible to do this in an other way (I mean without add jar
files in all client computers) : maybe get the method needed by the way of
casting to an other implementation made by xerces developpers to avoid this
problem and don't have to change jvm on client computers.
It's a software for customers of my company and it's difficult to say to
them : "just patch your jvm!".
If someone has a trick, please let me know.
Regards,
Romain.
----- Original Message -----
From: "Gregor Karlinger" <gr...@iaik.at>
To: <xe...@xml.apache.org>
Sent: Thursday, November 14, 2002 1:54 PM
Subject: RE: problem with dom3 and jdk1.4
> Roman,
>
> See http://java.sun.com/xml/jaxp/faq.html,
> especially question
>
> "Q. How do I override the JAXP implementation
> in J2SE SDK 1.4 and above?"
>
> Liebe Gruesse/Regards,
> Gregor Karlinger
>
>
> > -----Original Message-----
> > From: Romain Menetrier [mailto:romain@artsum.fr]
> > Sent: Thursday, November 14, 2002 11:44 AM
> > To: xerces-j-user@xml.apache.org
> > Subject: problem with dom3 and jdk1.4
> >
> >
> > Hi,
> >
> > I have to make my java application work with j2se 1.4. It
> > currently runs fine on 1.3 version, but when I run the
> > program with java 1.4, there's a problem of "method not
> > found" (method setErrorHandler) on class org.w3c.Document (I
> > try to revalidate a dom3 document with Xerces and my
> > DomErrorHandler). I think the class(interface)
> > "org.w3c.Document" is loaded from inside the jvm 1.4 and this
> > interface in java 1.4 not have this method.
> >
> > Can you say how to turn around this problem and have a
> > program working on java 1.3 & 1.4 ?
> >
> > Here is my code :
> >
> > DOMImplementationAS domImpl =
> > (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
> > DOMASBuilder parser = domImpl.createDOMASBuilder();
> > DOMInputSource dom_input_source =
> > (((DOMImplementationLS)domImpl).createDOMInputSource());
> > dom_input_source.setStringData(getXmlString(xml));
> > Document doc = parser.parse(dom_input_source);
> > doc.setErrorHandler(this); //the class is the error handler too
> > doc.setNormalizationFeature("validate", true);
> > doc.normalizeDocument();
> >
> > Thanks,
> > Romain
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
RE: problem with dom3 and jdk1.4
Posted by Gregor Karlinger <gr...@iaik.at>.
Roman,
See http://java.sun.com/xml/jaxp/faq.html,
especially question
"Q. How do I override the JAXP implementation
in J2SE SDK 1.4 and above?"
Liebe Gruesse/Regards,
Gregor Karlinger
> -----Original Message-----
> From: Romain Menetrier [mailto:romain@artsum.fr]
> Sent: Thursday, November 14, 2002 11:44 AM
> To: xerces-j-user@xml.apache.org
> Subject: problem with dom3 and jdk1.4
>
>
> Hi,
>
> I have to make my java application work with j2se 1.4. It
> currently runs fine on 1.3 version, but when I run the
> program with java 1.4, there's a problem of "method not
> found" (method setErrorHandler) on class org.w3c.Document (I
> try to revalidate a dom3 document with Xerces and my
> DomErrorHandler). I think the class(interface)
> "org.w3c.Document" is loaded from inside the jvm 1.4 and this
> interface in java 1.4 not have this method.
>
> Can you say how to turn around this problem and have a
> program working on java 1.3 & 1.4 ?
>
> Here is my code :
>
> DOMImplementationAS domImpl =
> (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
> DOMASBuilder parser = domImpl.createDOMASBuilder();
> DOMInputSource dom_input_source =
> (((DOMImplementationLS)domImpl).createDOMInputSource());
> dom_input_source.setStringData(getXmlString(xml));
> Document doc = parser.parse(dom_input_source);
> doc.setErrorHandler(this); //the class is the error handler too
> doc.setNormalizationFeature("validate", true);
> doc.normalizeDocument();
>
> Thanks,
> Romain
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>