[jdom-interest] Fw: Problem on XML-RPC Configuration File

Harish Kumar harish.kumar at patni.com
Sat Sep 2 10:48:35 PDT 2000


Correction:

            DOMBuilder builder =
                new DOMBuilder("org.jdom.adapters.XercesDOMAdapter");

            doc = builder.build(in); 


How can I put the explicit cast?

Regards

Harish



Hi

After making the correction Page No: 354( Java and Xml by Brett - Oreilly) for Writting XML From Java, When I am trying to compile the XmlRpcConfiguration.java file I am getting the following error:
 
E:\xml_test\jdom\src>javac XmlRpcConfiguration.java
XmlRpcConfiguration.java:195: Incompatible type for method. Explicit cast needed to convert java.io.Inpu
Stream to org.w3c.dom.Document.
            doc = builder.build(in);
                                ^
1 error
 
But when I have replace the colde  as shown below
 
           DOMBuilder builder =
                   new DOMBuilder("org.jdom.adapters.XercesDOMAdapter");
 
to        SAXBuilder builder = 
                   new SAXBuilder("org.jdom.adapters.XercesDOMAdapter");
 
It is compiling with the later code. What could be the reason?
 
But When I am Displaying the congiguration using the file "XmlRpcConfigurationServlet" (p.356), It is showing the following error:
 
Error: 500
Internal Servlet Error:

java.io.IOException: SAX2 driver class org.jdom.adapters.XercesDOMAdapter does not implement XMLReader: SAX2 driver class org.jdom.adapters.XercesDOMAdapter does not implement XMLReader
	at XmlRpcConfiguration.parseConfiguration(XmlRpcConfiguration.java, Compiled Code)
	at XmlRpcConfiguration.(XmlRpcConfiguration.java:83)
	at XmlRpcConfiguration.(XmlRpcConfiguration.java:62)
	at XmlRpcConfigurationServlet.doGet(XmlRpcConfigurationServlet.java, Compiled Code)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:715)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
	at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
	at com.sun.web.core.InvokerServlet.service(InvokerServlet.java:168)
	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)


Any body has tried this example? Please advice me how to proceed?
 
Advance Thanks
 
Regards
 
Harish (mailto:  harish.kumar at patni.com)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20000902/22b857a0/attachment.htm


More information about the jdom-interest mailing list