Providing another source table for reports

We finally got there!!!

Hope this will help other guys in future. So I will give you more strange information and the steps we used.

The error reported previousilly it comes on the browser. On the same there is one another on catalina.out:

···

==========================================================================

May 23, 2009 3:55:38 PM org.eclipse.birt.report.model.parser.ModuleReader readModule
SEVERE: Line Number:49 Error Code:Error.XMLParserException.SAX_ERROR Exception:org.xml.sax.SAXParseException: The reference to entity "characte
rEncoding" must end with the ';' delimiter. Message:SAX detected an error with the basic XML syntax of the file. May 23, 2009 3:55:38 PM org.eclipse.birt.report.engine.api.impl.ReportEngineHelper openReportDesign
SEVERE: invalid design file file:/opt/tomcatexp/webapps/birt/c03_param.rptdesign
org.eclipse.birt.report.exception.ViewerException: There is no report design object available.
        at org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:230)
        at org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:233)
        at org.eclipse.birt.report.context.ViewerAttributeBean.<init>(ViewerAttributeBean.java:113)
        at org.eclipse.birt.report.context.BirtContext.__init(BirtContext.java:44)
        at org.eclipse.birt.report.context.BaseContext.<init>(BaseContext.java:69)
        at org.eclipse.birt.report.context.BirtContext.<init>(BirtContext.java:30)
        at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:150)
        at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:137)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:636)

==========================================================================

And we realized that when you upload a report through dhis2, the data-sources section of the report is changed to something like this:
<property name="odaURL">jdbc:mysql://localhost/dhis2_exp?useUnicode=true&characterEncoding=UTF-8</property>

When we delete the "?useUnicode=true&characterEncoding=UTF-8" those errors dispair.

So we are uploding the reports then we delete that portion. And everything becames fine.

What is wrong with us to happen this?

Another thing that happened after we delete thing were the famous:
SEVERE: DriverClassLoader failed to load class: com.mysql.jdbc.Driver
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

We followed the instructions on BIRT BIRT | BIRT
to set the mysql connector jar file for birt.

Thanks Folks

Caveman

Cintia Marisa wrote:

Sorry 'bout that.

In attachment with data source and data set defined.

On Mon, May 18, 2009 at 3:23 PM, Murodullo Latifov > <murodlatifov@yahoo.com <mailto:murodlatifov@yahoo.com>> wrote:

    Hi Cintia,

    This report does not have any Data Sorce and Data Set defined. Can
    you please send report with data set definitions please?

    regards,
    murod

    ------------------------------------------------------------------------
    *From:* Cintia Marisa <cintia.banze@gmail.com
    <mailto:cintia.banze@gmail.com>>
    *To:* Murodullo Latifov <murodlatifov@yahoo.com
    <mailto:murodlatifov@yahoo.com>>; DHIS 2 developers
    <dhis2-devs@lists.launchpad.net <mailto:dhis2-devs@lists.launchpad.net>>
    *Sent:* Monday, May 18, 2009 2:50:51 PM

    *Subject:* Re: [Dhis2-devs] Providing another source table for reports

     Sure,
    In attachment the design.

    On Mon, May 18, 2009 at 9:19 AM, Murodullo Latifov > <murodlatifov@yahoo.com <mailto:murodlatifov@yahoo.com>> wrote:

        Hi Cintia,

        Could you please send me your report file?

        regards,
        murod

        ------------------------------------------------------------------------
        *From:* Cintia Marisa <cintia.banze@gmail.com
        <mailto:cintia.banze@gmail.com>>
        *To:* Ola Hodne Titlestad <olati@ifi.uio.no
        <mailto:olati@ifi.uio.no>>
        *Cc:* DHIS 2 developers <dhis2-devs@lists.launchpad.net
        <mailto:dhis2-devs@lists.launchpad.net>>
        *Sent:* Friday, May 15, 2009 3:52:31 PM
        *Subject:* Re: [Dhis2-devs] Providing another source table for
        reports

         Hi,

        Sorry, about the reply thing. I keep forgetting.

        And no, that doesn't happen with report tables. The report work
        just fine, with a report table. the problem is when I use
        another source table.

        On Fri, May 15, 2009 at 12:55 PM, Ola Hodne Titlestad > <olati@ifi.uio.no <mailto:olati@ifi.uio.no>> wrote:

            Hi Cintia,

            Remember to use Reply-all to make sure the list gets you
            reply as well.

            So it's not a BIRT viewer/designer incompatibility issue.

            Does BIRT work inside DHIS at all? I mean if you create a
            report in BIRT based on a report table in DHIS and then
            upload the design, link to report table, and run the report.
            Still the same problem then?

            best regards,
            Ola Hodne Titlestad
            HISP
            University of Oslo

            On Fri, May 15, 2009 at 12:19 PM, Cintia Marisa > <cintia.banze@gmail.com <mailto:cintia.banze@gmail.com>> wrote:

                I've checked, and it's not a version incompatibility
                issue. It happens with my designs too.

                Both my BIRT designer and viewer are the same version.

                On Fri, May 15, 2009 at 12:14 PM, Ola Hodne Titlestad > <olati@ifi.uio.no <mailto:olati@ifi.uio.no>> wrote:

                    On Fri, May 15, 2009 at 10:26 AM, Cintia Marisa > <cintia.banze@gmail.com > <mailto:cintia.banze@gmail.com>> wrote:

                        Hi all,
                        1st
                        Thank u guys for the help.

                        2nd
                        Murod,

                        Thanks for the samples you sent, they were helpful.

                        But still, even with the samples you sent to me,
                        when I try to upload and view the report in DHIS
                        I get "no report design available" error.

                        Here's the log:

                        ====================================================

                        * INFO 09:06:38,359 All startup routines done
                        (DefaultStartupRoutineExecutor.java [Thread-1])
                        * INFO 09:38:51,875 Upload file name:
                        sample_params.rptdesign, content type:
                        application/octet-stream (AddReportAction.java
                        [http-8080-1])
                        * INFO 09:38:51,875 New file: C:\Program
                        Files\Apache Software Foundation\Tomcat
                        6.0\webapps\birt-viewer\sample_params.rptdesign
                        (AddReportAction.java [http-8080-1])
                        * INFO 09:38:51,890 Report connection URL:
                        jdbc:mysql://localhost/dhis2_exp?useUnicode=true&characterEncoding=UTF-8
                        (AddReportAction.java [http-8080-1])
                        org.eclipse.birt.report.exception.ViewerException:
                        There is no report design object available.
                            at
                        org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:233)
                            at
                        org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:233)
                            at
                        org.eclipse.birt.report.context.ViewerAttributeBean.<init>(ViewerAttributeBean.java:116)
                            at
                        org.eclipse.birt.report.context.BirtContext.__init(BirtContext.java:44)
                            at
                        org.eclipse.birt.report.context.BaseContext.<init>(BaseContext.java:69)
                            at
                        org.eclipse.birt.report.context.BirtContext.<init>(BirtContext.java:30)
                            at
                        org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:150)
                            at
                        org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:151)
                            at
                        javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
                            at
                        org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
                            at
                        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                            at
                        org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
                            at
                        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                            at
                        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                            at
                        org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
                            at
                        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                            at
                        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                            at
                        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                            at
                        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                            at
                        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                            at
                        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                            at
                        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                            at
                        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
                            at
                        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
                            at
                        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                            at org.apache.tomcat.util.net
                        <http://org.apache.tomcat.util.net>.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                            at java.lang.Thread.run(Unknown Source)

                        ====================================================

                         The error disappears if I upLoad the design
                        without choose in BIRT a data source. But by
                        doing that i got no data displayed.

                    Just a guess, but this reminds me of version
                    incompatibility issues we have had before. I think
                    your BIRT viewer and Murod's deisgner (since he
                    designed the report) are different versions.
                    Have you tried your BIRT viewer with reports
                    designed with the same version? Try open Murod's
                    report in your report designer and preview it there
                    and see what happens.
                    I am using BIRT v. 2.3 for both designer and viewer.

                    Ola
                    ---------

                    _______________________________________________
                    Mailing list: https://launchpad.net/~dhis2-devs
                    <https://launchpad.net/~dhis2-devs&gt;
                    Post to : dhis2-devs@lists.launchpad.net
                    <mailto:dhis2-devs@lists.launchpad.net>
                    Unsubscribe : https://launchpad.net/~dhis2-devs
                    <https://launchpad.net/~dhis2-devs&gt;
                    More help : https://help.launchpad.net/ListHelp

                -- Cintia Marisa

            _______________________________________________
            Mailing list: https://launchpad.net/~dhis2-devs
            <https://launchpad.net/~dhis2-devs&gt;
            Post to : dhis2-devs@lists.launchpad.net
            <mailto:dhis2-devs@lists.launchpad.net>
            Unsubscribe : https://launchpad.net/~dhis2-devs
            <https://launchpad.net/~dhis2-devs&gt;
            More help : https://help.launchpad.net/ListHelp

        -- Cintia Marisa

    -- Cintia Marisa

--
Cintia Marisa

------------------------------------------------------------------------

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp

And we realized that when you upload a report through dhis2, the data-sources section of the report is changed to something like this:

jdbc:mysql://localhost/dhis2_exp?useUnicode=true&characterEncoding=UTF-8

When we delete the “?useUnicode=true&characterEncoding=UTF-8” those errors dispair.

So we are uploding the reports then we delete that portion. And everything becames fine.

What is wrong with us to happen this?

The database url is read from hibernate.properties. Apparently we need to make the routine that extracts the URL more intelligent. Thanks for providing feedback on this.

regards,

Lars