Re: NoSuchMethod Error??

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Kirk,

What version of Barracuda and XMLC are you using?  It must be pre-Barracuda 
1.2.0 based on the CVS weblog for HTMLSelectRenderer.  Read the note there.
http://tinyurl.com/wlbk

Also, here are the comments I made in that file...


                 //jkr_20030520.1 - setSelected(boolean) isn't actually 
part of the
                 //html dom level1 api. Xerces1 included an early version 
of the
                 //html dom level2 draft interfaces which were released 
with the
                 //same package as the level1 dom. The level2 dom is now in the
                 //namespace org.w3c.dom.html2. The switch in namespaces 
was made
                 //sometime between the following releases...
                 //<http://www.w3.org/TR/2001/WD-DOM-Level-2-HTML-20011210/java-binding.html>http://www.w3.org/TR/2001/WD-DOM-Level-2-HTML-20011210/java-binding.html
                 //and
                 //<http://www.w3.org/TR/2002/CR-DOM-Level-2-HTML-20020605/java-binding.html>http://www.w3.org/TR/2002/CR-DOM-Level-2-HTML-20020605/java-binding.html
                 //Xerces2 includes the original level1
                 //html dom. In order to be compatible with that, we can't 
use the
                 //setSelected(boolean) method (and, apparently, never 
should have).
//                opt.setSelected(lsm.isSelectedIndex(i));
                 if (lsm.isSelectedIndex(i)) opt.setAttribute("selected", 
"selected");
                 else opt.removeAttribute("selected");


Because of the non-standard use of setSelected(), you will run into 
problems when it is used.  Note that j2sdk1.4+ includes the bastardized 
version of the HTML DOM which, as explained above, was an unofficial 
release of the HTML DOM level2 interfaces, but in the same package 
namespace as the HTML DOM Level1 spec.  You will run into all sorts of 
classloader problems with this, especially if you put the latest XML Parser 
API's in Java's your container's "endorsed" directory (actually, I 
recommend this... along with an upgrade of Barracuda and XMLC).

If that's not clear, let me know.

Jake


At 08:33 PM 11/25/2003 +0200, you wrote:
>ok...
>I solved the problem.. but don't understand why.
>
>The problem was with the xerces parser in the class path somewhere.
>
>I don't understand why though.
>
>On my dev machine, all my jar files are in WEB-INF/lib.
>
>I can just deploy a application as a war and it works.
>
>This wasn't the case on the production box though.
>
>Had to dump xerces-1.4.4-xmlc-2.2.jar in the common/endorsed folder
>before it starting working.
>
>Jake? Urrm.... What gives ? ;)
>
>Regards
>KD
>
> >>> [email protected] 2003/11/25 19:07:40 >>>
>Hi guys,
>
>I'm getting a NoSuchMethodError on the production box?
>
>I can't understand why? It's basically the same setup I have on my dev
>box?
>
>Any body ran into this lately?
>
>Ps,
>Still using XMLC 2.2
>
>java.lang.NoSuchMethodError:
>org.w3c.dom.html.HTMLOptionElement.setSelected(Z)V
>         at
>org.enhydra.barracuda.core.comp.renderer.html.HTMLSelectRenderer.renderComponent(HTMLSelectRenderer.java:117)
>         at
>org.enhydra.barracuda.core.comp.BComponent.renderView(BComponent.java:567)
>         at
>org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:462)
>         at
>org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:480)
>         at
>org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:480)
>         at
>org.enhydra.barracuda.core.comp.BComponent.render(BComponent.java:388)
>         at
>sitawc.barraframework.eventListeners.response.privateEvent.RenderFindPage_Listener$RenderFindPage_Handler.handleViewEvent(RenderFindPage_Listener.java:116)
>         at
>org.enhydra.barracuda.core.event.DefaultBaseEventListener.handleEvent(DefaultBaseEventListener.java:66)
>         at
>org.enhydra.barracuda.core.event.DefaultEventDispatcher.notifyListeners(DefaultEventDispatcher.java:415)
>         at
>org.enhydra.barracuda.core.event.DefaultEventDispatcher.dispatch(DefaultEventDispatcher.java:185)
>         at
>org.enhydra.barracuda.core.event.DefaultEventDispatcher.dispatchEvent(DefaultEventDispatcher.java:122)
>         at
>org.enhydra.barracuda.core.event.DefaultEventBroker.dispatchEvent(DefaultEventBroker.java:494)
>         at
>org.enhydra.barracuda.core.event.ApplicationGateway.handleDefaultExt(ApplicationGateway.java:415)
>         at
>org.enhydra.barracuda.core.event.ApplicationGateway.handleDefault(ApplicationGateway.java:240)
>         at
>org.enhydra.barracuda.core.event.ApplicationGateway.doGet(ApplicationGateway.java:643)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>         at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>         at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>         at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>         at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>         at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>         at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>         at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>         at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>         at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>         at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>         at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>         at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>         at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>         at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>         at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>         at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
>         at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
>         at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
>         at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
>         at java.lang.Thread.run(Thread.java:534)
>
>
>---------------------------------------------------------------
>"All views or opinions expressed in this electronic message
>and its attachments are the view of the sender and do not
>necessarily reflect the views and opinions of the
>Provincial Government Western Cape ("the PGWC").
>No employee of the WCPG is entitled to conclude a
>binding contract on behalf of the PGWC unless he/she
>is an Accounting Officer of the PGWC, or his or her
>authorised representative.
>
>The information contained in this message and its attachments
>may be confidential or privileged and is for the use of the
>named recipient only, except where the sender specifically
>states otherwise.  If you are not the intended recipient you
>may not copy or deliver this message to anyone."
>
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda
>---------------------------------------------------------------
>"All views or opinions expressed in this electronic message
>and its attachments are the view of the sender and do not
>necessarily reflect the views and opinions of the
>Provincial Government Western Cape ("the PGWC").
>No employee of the WCPG is entitled to conclude a
>binding contract on behalf of the PGWC unless he/she
>is an Accounting Officer of the PGWC, or his or her
>authorised representative.
>
>The information contained in this message and its attachments
>may be confidential or privileged and is for the use of the
>named recipient only, except where the sender specifically
>states otherwise.  If you are not the intended recipient you
>may not copy or deliver this message to anyone."
>
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.