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 Charles Brown <cn...@twcny.rr.com> on 2000/08/10 04:31:54 UTC

exception under JSP

All,

   I'm doing a homework problem where I'm trying to feed XML
to a java server page from an HTML form.  Underlying the JSP
is a pretty simple java bean, which replaces escape codes in
inbound text, and invokes a xerces DOM parser.

   From a command line, I can feed in form data and parse and
output results, but via the JSP, I get the following exception;

java.lang.NoSuchMethodError: org.w3c.dom.Document: method
createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
not found
	at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
Compiled Code)
	at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java, Compiled Code)
	at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java, Compiled Code)
	at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java, Compiled Code)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
	at javaBooks.FindJavaBooks.parse(FindJavaBooks.java:112)
	at
F_0003a.Program_00020Files.jswdk_0002d_00031_0005f_00030_0005f_00031.webpage
s.javaBooks.javaBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1._jspService(jav
aBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1.java, Compiled Code)
	at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
	at
com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:88)
	at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
	at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
	at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
	at com.sun.web.core.Context.handleRequest(Context.java:414)
	at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)

   I would suspect the escape code replacement, except that I
can feed the XML through the HTML page to the bean and back out
as plain XML to the browser, and the XML looks fine.

   Perhaps someone who knows more than I do might be interested.

--
Charles Brown
cnkbrown@twcny.rr.com


Re: exception under JSP

Posted by do...@time4you.de.
i had also quite a lot of trouble in getting
tomcat + cocoon to work; depending on at which
days you download the different jars, the dom 
implementations can be compatible or not.
especially as in parallel i used openxml that time.

finally as i decided to drop openxml and as
cocoon upgraded to a same xerces implemetation 
that also tomcat used, things fitted.

another (database-) dom implementation that i
also need to use in the same program, implemented 
an a bit different dom 2 draft version as xerxes did.

in one implementation this method was missing, in the other
another one. this way you can never get things to work.
this is the trouble with draft standards.

so i believe you need some luck to find fitting
implementations. 
especially the org.w3c.dom package that is copied
into the implementations jar files, was always 
a critical point in my experiences.

  -sven-


Eric Ye wrote:
> 
> You probably have 2 jar files that both have DOM implementions, and one
> implements DOM1, the other implements DOM2. And the DOM1 one comes before
> DOM2 one in your classpath.
> _____
> 
> Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org
> 
> ----- Original Message -----
> From: "Charles Brown" <cn...@twcny.rr.com>
> To: <xe...@xml.apache.org>
> Sent: Wednesday, August 09, 2000 7:57 PM
> Subject: RE: exception under JSP
> 
> >
> >    BTW, just tried it using a servlet, with same result.
> >
> > >
> > >
> > > All,
> > >
> > >    I'm doing a homework problem where I'm trying to feed XML
> > > to a java server page from an HTML form.  Underlying the JSP
> > > is a pretty simple java bean, which replaces escape codes in
> > > inbound text, and invokes a xerces DOM parser.
> > >
> > >    From a command line, I can feed in form data and parse and
> > > output results, but via the JSP, I get the following exception;
> > >
> > > java.lang.NoSuchMethodError: org.w3c.dom.Document: method
> > >
> createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
> > > not found
> > > at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
> > > Compiled Code)
> > > at
> > > org.apache.xerces.validators.common.XMLValidator.callStartElement(
> > > XMLValidat
> > > or.java, Compiled Code)
> > > at
> > > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
> > > ispatch(XM
> > > LDocumentScanner.java, Compiled Code)
> > > at
> > > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
> > > ntScanner.
> > > java, Compiled Code)
> > > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
> > > at javaBooks.FindJavaBooks.parse(FindJavaBooks.java:112)
> > > at
> > > F_0003a.Program_00020Files.jswdk_0002d_00031_0005f_00030_0005f_000
> > > 31.webpage
> > > s.javaBooks.javaBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1._jspS
> > > ervice(jav
> > > aBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1.java, Compiled Code)
> > > at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > > at
> > > com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServle
> > > t.java:88)
> > > at
> > > com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
> > > at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > > at
> > > com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
> > > at com.sun.web.core.Context.handleRequest(Context.java:414)
> > > at
> > > com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
> > >
> > >    I would suspect the escape code replacement, except that I
> > > can feed the XML through the HTML page to the bean and back out
> > > as plain XML to the browser, and the XML looks fine.
> > >
> > >    Perhaps someone who knows more than I do might be interested.
> > >
> > > --
> > > Charles Brown
> > > cnkbrown@twcny.rr.com
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org

-- 
time4you GmbH
Geschäftsleitung

PS: Online-Lernen 2000 am 21.09.2000.
Ab sofort können Sie sich unter http://www.online-lernen.de für den
3. Fachtag anmelden! Es erwartet Sie ein interessanter Tag.

***************************************************************************
ONLINE-LERNEN. BERATUNG BEI AUFBAU & EINFÜHRUNG. SW-ENTWICKLUNG.
WEB-HOSTING. QUALIFIZIERUNG. ONLINE-CONTENT-ENTWICKLUNG. SUPPORT.
***************************************************************************

click of the month - http://gc21.ibt.time4you.de !
enter the GLOBAL CAMPUS 21 - based on the IBT SERVER eLearning suite.

time4you GmbH
communication & learning
Maximilianstraße 4
76133 Karlsruhe

Telefon 0721.83.01.60
Telefax 0721.83.01.616
http://www.time4you.de

Re: exception under JSP

Posted by Edwin Goei <Ed...@eng.sun.com>.
Charles Brown wrote:
> 
>    BTW, the discussion "RE: Conflict problem with xerces and jaxp-parser?"
> seems much the same.  But, seems to have been posted by someone with
> more java experience than I have.

I think they are two separate problems.  The problem you have looks like
you have a DOM level 1 versions of org.w3c.dom classes before the level
2 version.  If you swap them, it should work.

The other thread you refer to is something else that I don't understand.

-Edwin

RE: exception under JSP

Posted by Charles Brown <cn...@twcny.rr.com>.

   BTW, the discussion "RE: Conflict problem with xerces and jaxp-parser?"
seems much the same.  But, seems to have been posted by someone with
more java experience than I have.

> -----Original Message-----
> From: Lawrence Fry [mailto:lwfry@bbnow.net]
> Sent: Thursday, August 10, 2000 7:00 PM
> To: xerces-j-dev@xml.apache.org
> Subject: RE: exception under JSP
> 
> 
> Charles,
> 
> what is your server?
> have you gone to the server vendors help desk?
> 
> This is a pretty common configuration in the server, so somebody 
> has done it
> before. I can't believe you will have to rebuild the server.
> 
> regards,
> 
> Lawrence
> 
> 
> -----Original Message-----
> From: Charles Brown [mailto:cnkbrown@twcny.rr.com]
> Sent: Thursday, August 10, 2000 3:55 PM
> To: xerces-j-dev@xml.apache.org
> Subject: RE: exception under JSP
> 
> 
> 
>    I was hoping this would do it, but it doesn't.  With
> xerces.jar first, the web server itself won't start.
> 
>    I have the feeling that the only solution would be to
> rebuild the web server, changing whatever it doesn't like
> about the xerces classes, or go into the xerces code
> and change it to be much more specific about which class
> it wants.
> 
>    For my part, I don't know enough to understand why
> this configuration has conflict.  But, given all the
> hype around java and beans, I'd expected the architecture
> to be much less fragile than this experience shows it
> to be.
> 
> 
> >
> > Charles Brown wrote:
> > >    Or, (ureka!) should I just make sure the xerces.jar
> > > is first in the CLASSPATH?
> >
> > That should solve the problem.
> >
> > --
> > Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> 

RE: exception under JSP

Posted by Charles Brown <cn...@twcny.rr.com>.
  It's the JSWDK from java.sun.com.

> -----Original Message-----
> From: Lawrence Fry [mailto:lwfry@bbnow.net]
> Sent: Thursday, August 10, 2000 7:00 PM
> To: xerces-j-dev@xml.apache.org
> Subject: RE: exception under JSP
> 
> 
> Charles,
> 
> what is your server?
> have you gone to the server vendors help desk?
> 
> This is a pretty common configuration in the server, so somebody 
> has done it
> before. I can't believe you will have to rebuild the server.
> 
> regards,
> 
> Lawrence
> 
> 
> -----Original Message-----
> From: Charles Brown [mailto:cnkbrown@twcny.rr.com]
> Sent: Thursday, August 10, 2000 3:55 PM
> To: xerces-j-dev@xml.apache.org
> Subject: RE: exception under JSP
> 
> 
> 
>    I was hoping this would do it, but it doesn't.  With
> xerces.jar first, the web server itself won't start.
> 
>    I have the feeling that the only solution would be to
> rebuild the web server, changing whatever it doesn't like
> about the xerces classes, or go into the xerces code
> and change it to be much more specific about which class
> it wants.
> 
>    For my part, I don't know enough to understand why
> this configuration has conflict.  But, given all the
> hype around java and beans, I'd expected the architecture
> to be much less fragile than this experience shows it
> to be.
> 
> 
> >
> > Charles Brown wrote:
> > >    Or, (ureka!) should I just make sure the xerces.jar
> > > is first in the CLASSPATH?
> >
> > That should solve the problem.
> >
> > --
> > Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> 

RE: exception under JSP

Posted by Lawrence Fry <lw...@bbnow.net>.
Charles,

what is your server?
have you gone to the server vendors help desk?

This is a pretty common configuration in the server, so somebody has done it
before. I can't believe you will have to rebuild the server.

regards,

Lawrence


-----Original Message-----
From: Charles Brown [mailto:cnkbrown@twcny.rr.com]
Sent: Thursday, August 10, 2000 3:55 PM
To: xerces-j-dev@xml.apache.org
Subject: RE: exception under JSP



   I was hoping this would do it, but it doesn't.  With
xerces.jar first, the web server itself won't start.

   I have the feeling that the only solution would be to
rebuild the web server, changing whatever it doesn't like
about the xerces classes, or go into the xerces code
and change it to be much more specific about which class
it wants.

   For my part, I don't know enough to understand why
this configuration has conflict.  But, given all the
hype around java and beans, I'd expected the architecture
to be much less fragile than this experience shows it
to be.


>
> Charles Brown wrote:
> >    Or, (ureka!) should I just make sure the xerces.jar
> > is first in the CLASSPATH?
>
> That should solve the problem.
>
> --
> Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>

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


RE: exception under JSP

Posted by Charles Brown <cn...@twcny.rr.com>.
   I was hoping this would do it, but it doesn't.  With
xerces.jar first, the web server itself won't start.  

   I have the feeling that the only solution would be to
rebuild the web server, changing whatever it doesn't like
about the xerces classes, or go into the xerces code
and change it to be much more specific about which class
it wants.

   For my part, I don't know enough to understand why
this configuration has conflict.  But, given all the
hype around java and beans, I'd expected the architecture
to be much less fragile than this experience shows it
to be.


> 
> Charles Brown wrote:
> >    Or, (ureka!) should I just make sure the xerces.jar
> > is first in the CLASSPATH?
> 
> That should solve the problem.
> 
> -- 
> Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> 
> 

Re: exception under JSP

Posted by Andy Clark <an...@apache.org>.
Charles Brown wrote:
>    Or, (ureka!) should I just make sure the xerces.jar
> is first in the CLASSPATH?

That should solve the problem.

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org

RE: exception under JSP

Posted by Charles Brown <cn...@twcny.rr.com>.
   Or, (ureka!) should I just make sure the xerces.jar
is first in the CLASSPATH?

> -----Original Message-----
> From: Charles Brown [mailto:cnkbrown@twcny.rr.com]
> Sent: Wednesday, August 09, 2000 11:40 PM
> To: xerces-j-dev@xml.apache.org
> Subject: RE: exception under JSP
>
>
>
>    I'm using the jswdk-1.0.1, and yes it has an xml.jar.
> If I delet it, the server won't start.  Should I replace
> the xml.jar with a newer one? From where?
>
> > -----Original Message-----
> > From: Lawrence Fry [mailto:lwfry@bbnow.net]
> > Sent: Wednesday, August 09, 2000 11:08 PM
> > To: xerces-j-dev@xml.apache.org
> > Subject: RE: exception under JSP
> >
> >
> > Check your jre/bin/ext directories... or if you are using one of
> > popular jsp
> > servers, its bin/ext directory. You may find an xml.jar file
> there...that
> > will be the offending file. It has org.w3c.dom for dom 1, while
> > xerces uses
> > org.w3c.dom for dom 2.
> >
> >
> >
> > -----Original Message-----
> > From: Eric Ye [mailto:ericye@locus.apache.org]
> > Sent: Wednesday, August 09, 2000 8:03 PM
> > To: xerces-j-dev@xml.apache.org
> > Subject: Re: exception under JSP
> >
> >
> > You probably have 2 jar files that both have DOM implementions, and one
> > implements DOM1, the other implements DOM2. And the DOM1 one
> comes before
> > DOM2 one in your classpath.
> > _____
> >
> >
> > Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org
> >
> > ----- Original Message -----
> > From: "Charles Brown" <cn...@twcny.rr.com>
> > To: <xe...@xml.apache.org>
> > Sent: Wednesday, August 09, 2000 7:57 PM
> > Subject: RE: exception under JSP
> >
> >
> > >
> > >    BTW, just tried it using a servlet, with same result.
> > >
> > > >
> > > >
> > > > All,
> > > >
> > > >    I'm doing a homework problem where I'm trying to feed XML
> > > > to a java server page from an HTML form.  Underlying the JSP
> > > > is a pretty simple java bean, which replaces escape codes in
> > > > inbound text, and invokes a xerces DOM parser.
> > > >
> > > >    From a command line, I can feed in form data and parse and
> > > > output results, but via the JSP, I get the following exception;
> > > >
> > > > java.lang.NoSuchMethodError: org.w3c.dom.Document: method
> > > >
> >
> createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
> > > > not found
> > > > at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
> > > > Compiled Code)
> > > > at
> > > > org.apache.xerces.validators.common.XMLValidator.callStartElement(
> > > > XMLValidat
> > > > or.java, Compiled Code)
> > > > at
> > > > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
> > > > ispatch(XM
> > > > LDocumentScanner.java, Compiled Code)
> > > > at
> > > > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
> > > > ntScanner.
> > > > java, Compiled Code)
> > > > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
> > > > at javaBooks.FindJavaBooks.parse(FindJavaBooks.java:112)
> > > > at
> > > > F_0003a.Program_00020Files.jswdk_0002d_00031_0005f_00030_0005f_000
> > > > 31.webpage
> > > > s.javaBooks.javaBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1._jspS
> > > > ervice(jav
> > > > aBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1.java, Compiled Code)
> > > > at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > > > at
> > > > com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServle
> > > > t.java:88)
> > > > at
> > > > com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
> > > > at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > > > at
> > > >
> com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
> > > > at com.sun.web.core.Context.handleRequest(Context.java:414)
> > > > at
> > > > com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
> > > >
> > > >    I would suspect the escape code replacement, except that I
> > > > can feed the XML through the HTML page to the bean and back out
> > > > as plain XML to the browser, and the XML looks fine.
> > > >
> > > >    Perhaps someone who knows more than I do might be interested.
> > > >
> > > > --
> > > > Charles Brown
> > > > cnkbrown@twcny.rr.com
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > > > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>


RE: exception under JSP

Posted by Charles Brown <cn...@twcny.rr.com>.
   I'm using the jswdk-1.0.1, and yes it has an xml.jar.
If I delet it, the server won't start.  Should I replace
the xml.jar with a newer one? From where?

> -----Original Message-----
> From: Lawrence Fry [mailto:lwfry@bbnow.net]
> Sent: Wednesday, August 09, 2000 11:08 PM
> To: xerces-j-dev@xml.apache.org
> Subject: RE: exception under JSP
>
>
> Check your jre/bin/ext directories... or if you are using one of
> popular jsp
> servers, its bin/ext directory. You may find an xml.jar file there...that
> will be the offending file. It has org.w3c.dom for dom 1, while
> xerces uses
> org.w3c.dom for dom 2.
>
>
>
> -----Original Message-----
> From: Eric Ye [mailto:ericye@locus.apache.org]
> Sent: Wednesday, August 09, 2000 8:03 PM
> To: xerces-j-dev@xml.apache.org
> Subject: Re: exception under JSP
>
>
> You probably have 2 jar files that both have DOM implementions, and one
> implements DOM1, the other implements DOM2. And the DOM1 one comes before
> DOM2 one in your classpath.
> _____
>
>
> Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org
>
> ----- Original Message -----
> From: "Charles Brown" <cn...@twcny.rr.com>
> To: <xe...@xml.apache.org>
> Sent: Wednesday, August 09, 2000 7:57 PM
> Subject: RE: exception under JSP
>
>
> >
> >    BTW, just tried it using a servlet, with same result.
> >
> > >
> > >
> > > All,
> > >
> > >    I'm doing a homework problem where I'm trying to feed XML
> > > to a java server page from an HTML form.  Underlying the JSP
> > > is a pretty simple java bean, which replaces escape codes in
> > > inbound text, and invokes a xerces DOM parser.
> > >
> > >    From a command line, I can feed in form data and parse and
> > > output results, but via the JSP, I get the following exception;
> > >
> > > java.lang.NoSuchMethodError: org.w3c.dom.Document: method
> > >
> createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
> > > not found
> > > at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
> > > Compiled Code)
> > > at
> > > org.apache.xerces.validators.common.XMLValidator.callStartElement(
> > > XMLValidat
> > > or.java, Compiled Code)
> > > at
> > > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
> > > ispatch(XM
> > > LDocumentScanner.java, Compiled Code)
> > > at
> > > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
> > > ntScanner.
> > > java, Compiled Code)
> > > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
> > > at javaBooks.FindJavaBooks.parse(FindJavaBooks.java:112)
> > > at
> > > F_0003a.Program_00020Files.jswdk_0002d_00031_0005f_00030_0005f_000
> > > 31.webpage
> > > s.javaBooks.javaBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1._jspS
> > > ervice(jav
> > > aBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1.java, Compiled Code)
> > > at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > > at
> > > com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServle
> > > t.java:88)
> > > at
> > > com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
> > > at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > > at
> > > com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
> > > at com.sun.web.core.Context.handleRequest(Context.java:414)
> > > at
> > > com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
> > >
> > >    I would suspect the escape code replacement, except that I
> > > can feed the XML through the HTML page to the bean and back out
> > > as plain XML to the browser, and the XML looks fine.
> > >
> > >    Perhaps someone who knows more than I do might be interested.
> > >
> > > --
> > > Charles Brown
> > > cnkbrown@twcny.rr.com
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>


RE: exception under JSP

Posted by Lawrence Fry <lw...@bbnow.net>.
Check your jre/bin/ext directories... or if you are using one of popular jsp
servers, its bin/ext directory. You may find an xml.jar file there...that
will be the offending file. It has org.w3c.dom for dom 1, while xerces uses
org.w3c.dom for dom 2.



-----Original Message-----
From: Eric Ye [mailto:ericye@locus.apache.org]
Sent: Wednesday, August 09, 2000 8:03 PM
To: xerces-j-dev@xml.apache.org
Subject: Re: exception under JSP


You probably have 2 jar files that both have DOM implementions, and one
implements DOM1, the other implements DOM2. And the DOM1 one comes before
DOM2 one in your classpath.
_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org

----- Original Message -----
From: "Charles Brown" <cn...@twcny.rr.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, August 09, 2000 7:57 PM
Subject: RE: exception under JSP


>
>    BTW, just tried it using a servlet, with same result.
>
> >
> >
> > All,
> >
> >    I'm doing a homework problem where I'm trying to feed XML
> > to a java server page from an HTML form.  Underlying the JSP
> > is a pretty simple java bean, which replaces escape codes in
> > inbound text, and invokes a xerces DOM parser.
> >
> >    From a command line, I can feed in form data and parse and
> > output results, but via the JSP, I get the following exception;
> >
> > java.lang.NoSuchMethodError: org.w3c.dom.Document: method
> >
createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
> > not found
> > at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
> > Compiled Code)
> > at
> > org.apache.xerces.validators.common.XMLValidator.callStartElement(
> > XMLValidat
> > or.java, Compiled Code)
> > at
> > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
> > ispatch(XM
> > LDocumentScanner.java, Compiled Code)
> > at
> > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
> > ntScanner.
> > java, Compiled Code)
> > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
> > at javaBooks.FindJavaBooks.parse(FindJavaBooks.java:112)
> > at
> > F_0003a.Program_00020Files.jswdk_0002d_00031_0005f_00030_0005f_000
> > 31.webpage
> > s.javaBooks.javaBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1._jspS
> > ervice(jav
> > aBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1.java, Compiled Code)
> > at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > at
> > com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServle
> > t.java:88)
> > at
> > com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
> > at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > at
> > com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
> > at com.sun.web.core.Context.handleRequest(Context.java:414)
> > at
> > com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
> >
> >    I would suspect the escape code replacement, except that I
> > can feed the XML through the HTML page to the bean and back out
> > as plain XML to the browser, and the XML looks fine.
> >
> >    Perhaps someone who knows more than I do might be interested.
> >
> > --
> > Charles Brown
> > cnkbrown@twcny.rr.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>


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


Re: exception under JSP

Posted by Eric Ye <er...@locus.apache.org>.
You probably have 2 jar files that both have DOM implementions, and one
implements DOM1, the other implements DOM2. And the DOM1 one comes before
DOM2 one in your classpath.
_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org

----- Original Message -----
From: "Charles Brown" <cn...@twcny.rr.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, August 09, 2000 7:57 PM
Subject: RE: exception under JSP


>
>    BTW, just tried it using a servlet, with same result.
>
> >
> >
> > All,
> >
> >    I'm doing a homework problem where I'm trying to feed XML
> > to a java server page from an HTML form.  Underlying the JSP
> > is a pretty simple java bean, which replaces escape codes in
> > inbound text, and invokes a xerces DOM parser.
> >
> >    From a command line, I can feed in form data and parse and
> > output results, but via the JSP, I get the following exception;
> >
> > java.lang.NoSuchMethodError: org.w3c.dom.Document: method
> >
createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
> > not found
> > at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
> > Compiled Code)
> > at
> > org.apache.xerces.validators.common.XMLValidator.callStartElement(
> > XMLValidat
> > or.java, Compiled Code)
> > at
> > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
> > ispatch(XM
> > LDocumentScanner.java, Compiled Code)
> > at
> > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
> > ntScanner.
> > java, Compiled Code)
> > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
> > at javaBooks.FindJavaBooks.parse(FindJavaBooks.java:112)
> > at
> > F_0003a.Program_00020Files.jswdk_0002d_00031_0005f_00030_0005f_000
> > 31.webpage
> > s.javaBooks.javaBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1._jspS
> > ervice(jav
> > aBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1.java, Compiled Code)
> > at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > at
> > com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServle
> > t.java:88)
> > at
> > com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
> > at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > at
> > com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
> > at com.sun.web.core.Context.handleRequest(Context.java:414)
> > at
> > com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
> >
> >    I would suspect the escape code replacement, except that I
> > can feed the XML through the HTML page to the bean and back out
> > as plain XML to the browser, and the XML looks fine.
> >
> >    Perhaps someone who knows more than I do might be interested.
> >
> > --
> > Charles Brown
> > cnkbrown@twcny.rr.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>


RE: exception under JSP

Posted by Charles Brown <cn...@twcny.rr.com>.
   BTW, just tried it using a servlet, with same result.

>
>
> All,
>
>    I'm doing a homework problem where I'm trying to feed XML
> to a java server page from an HTML form.  Underlying the JSP
> is a pretty simple java bean, which replaces escape codes in
> inbound text, and invokes a xerces DOM parser.
>
>    From a command line, I can feed in form data and parse and
> output results, but via the JSP, I get the following exception;
>
> java.lang.NoSuchMethodError: org.w3c.dom.Document: method
> createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
> not found
> 	at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
> Compiled Code)
> 	at
> org.apache.xerces.validators.common.XMLValidator.callStartElement(
> XMLValidat
> or.java, Compiled Code)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.d
> ispatch(XM
> LDocumentScanner.java, Compiled Code)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocume
> ntScanner.
> java, Compiled Code)
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
> 	at javaBooks.FindJavaBooks.parse(FindJavaBooks.java:112)
> 	at
> F_0003a.Program_00020Files.jswdk_0002d_00031_0005f_00030_0005f_000
> 31.webpage
> s.javaBooks.javaBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1._jspS
> ervice(jav
> aBooks_0005cjavaBooks_0002ejspjavaBooks_jsp_1.java, Compiled Code)
> 	at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> 	at
> com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServle
> t.java:88)
> 	at
> com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
> 	at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> 	at
> com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
> 	at com.sun.web.core.Context.handleRequest(Context.java:414)
> 	at
> com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
>
>    I would suspect the escape code replacement, except that I
> can feed the XML through the HTML page to the bean and back out
> as plain XML to the browser, and the XML looks fine.
>
>    Perhaps someone who knows more than I do might be interested.
>
> --
> Charles Brown
> cnkbrown@twcny.rr.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>