From: Suman Nath (sknath@cs.cmu.edu)
Date: 02/02/03
>
> Does anyone know why the cannedqueries program would throw this exception?
>
> javax.xml.transform.TransformerException: Can't have more than one root on a DOM!
>
> It occurs when I try to submit a canned query (#2 or #3 from canned.html).
> If I query the database using the command line tool, the database looks
> ok.
It first seemed to me that there is some problem in the database itself
-- but you confirm that it is not the case. So, it probably happens
within the the post processing of the raw query answer.
> What changes need to be made to CannedQueries to get it to work with our
> own database? I did a replace of "parkingone" with the name of the root
> node in my database ("mukesh-psf-ROOT"). But there is also a
> "parking.intel-iris.net" string in the CannedQueries code. Do we need to
> change this to reflect our database, and domain?
> ("mukesh-psf-ROOT.dsan.net" instead of "parking.intel-iris.net")
For each query, CannedQuerries performs two steps.
First, it issues the query and gathers the raw answer.
Then it postprocess the raw output to print it in a nicely formated way
in the browser. To do this, it
performs XSLT processing to convert it into a nicely formated, colored XML
output (I guess this is the step where you get the exception). It also
tries to recognize the LCA node, and print the corresponding DSN style
name (thats what "parking.intel-iris.net" is used for, if you look at the
code you will see that the query answer has already been gathered).
For this project, you can ommit the 2nd step and print only the raw query
response. And in that case, you need to change the hard-coded queries
only. The hard coded queries should reflect the 4 queries given in the
project handout.
If someone wants to pretty print the output, he is most welcome. Modifying
the code to do that should not be difficult.
- Suman
This archive was generated by hypermail 2.1.5 : 02/02/03 EST