PDA

View Full Version : Release 1.5.4 AdHoc Query Error



bpair
06-14-2007, 08:43 AM
I cannot run any AdHoc queries in this release. The problem seems to be with parsing the XML. I tried this in my XML editor and got a connection refused from SourceForge JFree Report. Is the code trying to validate the xml against an external dtd?

08:37:15,569 ERROR [Logger] misc-org.pentaho.core.util.XmlHelper: XmlHelper.ERRO
R_0014 - Failed to parse XML document in FileInputStream: <?xml version="1.0" en
coding="ISO-8859-1"?>
<!DOCTYPE report PUBLIC "-//JFreeReport//DTD report definition//EN//simple/versi
on 0.8.5"
"http://jfreereport.sourceforge.net/report-085.dtd">

<report bottommargin="36" leftmargin="36" name="template1" orientation="portrait
" pageformat="LETTER" rightmargin="36" topmargin="36">
<parser-config>
<property name="reportheader"><!-- label --></property>
<property name="reportfooter"><!-- label --></property>
<property name="pageheader"><!-- label --></property>
<property name="pagefooter"><!-- label --></property>
</parser-config>
<reportheader color="#ff7d17" fontname="Arial" fontsize="16">
<message-field alignment="left" height="18" vertical-alignment="
middle" width="100%" x="0%" y="0">${reportheader}</message-field>
</reportheader>
<reportfooter color="#ff7d17" fontname="Arial" fontsize="16">
<message-field alignment="center" height="18" vertical-alignment
="top" width="100%" x="0%" y="0">${reportfooter}</message-field>
</reportfooter>
<items></items>
<pageheader color="#c0c0c0" fontname="Arial" fontsize="8">
<message-field alignment="left" height="18" vertical-alignment="
middle" width="50%" x="0%" y="0">${pageheader}</message-field>
<message-field alignment="right" height="18" width="50%" x="50%"
y="0">$(report.date, date, MMMM dd, yyyy @ hh:mm )</message-field>
<line color="#9eaa36" height="3" weight="1" width="100%" x1="0%"
x2="100%" y1="18" y2="18"/>
</pageheader>
<pagefooter color="#c0c0c0" fontname="Arial" fontsize="8">
<line color="#9eaa36" height="3" weight="1" width="100%" x1="0%"
x2="100%" y1="0" y2="0"/>
<message-field alignment="left" height="18" width="50%" x="0" y=
"0">${pagefooter}</message-field>
<message-field alignment="right" height="18" width="50%" x="50%"
y="0">Page $(PageofPages)</message-field>
</pagefooter>
<functions>
<property-ref name="report.date"/>
<function class="org.jfree.report.function.PageOfPagesFunction"
name="PageofPages"/>
</functions>
</report>

org.dom4j.DocumentException: Connection refused: connect Nested exception: Conne
ction refused: connect
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.dom4j.io.SAXReader.read(SAXReader.java:343)
at org.pentaho.core.util.CleanXmlHelper.getDocFromStream(CleanXmlHelper.
java:196)
at org.pentaho.core.util.CleanXmlHelper.getDocFromString(CleanXmlHelper.
java:102)
at org.pentaho.core.util.XmlHelper.getDocFromString(XmlHelper.java:91)
at org.pentaho.core.repository.SolutionRepositoryBase.getResourceAsDocum
ent(SolutionRepositoryBase.java:389)
at org.pentaho.core.repository.SolutionRepositoryBase.getResourceAsDocum
ent(SolutionRepositoryBase.java:378)
at org.pentaho.ui.servlet.AdhocWebService.createJFreeReportFile(AdhocWeb
Service.java:397)
at org.pentaho.ui.servlet.AdhocWebService.saveReportSpec(AdhocWebService
.java:851)
at org.pentaho.ui.servlet.AdhocWebService.dispatch(AdhocWebService.java:
242)
at org.pentaho.ui.servlet.AdhocWebService.doGet(AdhocWebService.java:195
)
at org.pentaho.ui.servlet.AdhocWebService.doPost(AdhocWebService.java:26
6)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

MattCasters
06-15-2007, 06:14 PM
Thanks for the feedback, I filed a bug report for this one.

bpair
06-18-2007, 04:17 PM
I am behind a proxy and needed to pass info into the JBoss AS.

-Dhttp.proxyHost=proxy.url -Dhttp.proxyPort=portnumber -DproxySet=true

So it is working, but having a dependency on SourceForge JFreeReport seems like a problem waiting to happen.

thanks,

Brit

MattCasters
06-19-2007, 08:01 AM
FWIW, I couldn't agree more.

sbarkdull
06-19-2007, 11:03 AM
Thank you for raising this issue.

As you likely know, the problem is that when the Pentaho BI platform is reading an xml document, and the xml document's DOCTYPE specifies a URI for the dtd or schema that is not local (ie somewhere out on the internet), and the server running the platform does not have access to the internet, the parser fails because it can't get access to the dtd/schema.

We are currently working on a solution to this so that the server running the BI platform does not have to be connected to the internet in order to function properly.

sbarkdull
06-20-2007, 02:36 PM
A short term solution would be to edit the XML or HTML files and remove the DOCTYPE declaration.

An alternative would be to get a copy of the DTD refered to by the XML/HTML file (you can do this with any web browser by putting the URI in the DOCTYPE in the browsers's address bar).
Cache this copy somewhere that the application server can access.
Change all DOCTYPES by removing PUBLIC, the public id, and the URI to the remove DTD file. Add to the DOCTYPE: SYSTEM, and the local URI to the DTD. For instance:

<!DOCTYPE report PUBLIC "-//JFreeReport//DTD report definition//EN//simple/version 0.8.5" "http://jfreereport.sourceforge.net/report-085.dtd">

becomes:

<!DOCTYPE report SYSTEM "dtd/report-085.dtd">

This assumes that the DTD is in a subfolder called "dtd" relative to the XML document.

Useful URLs for better understanding DOCTYPE declarations are:
http://wdvl.internet.com/Authoring/Languages/XML/XMLFamily/XMLSyntax/sall5.html
http://www.xml.com/pub/a/2002/09/04/xslt.html?page=last