designadda / pentaho-fc-plugin

Automatically exported from code.google.com/p/pentaho-fc-plugin
GNU Lesser General Public License v3.0
0 stars 0 forks source link

ERROR [FusionContentGenerator] Error : resultset is null -> see previous error #107

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi All,

I have Download fusion chart and keept in bi-developers/fusion-charts
I have changed database connection.

Note : Here I am using "org.gjt.mm.mysql.driver" driver because mysql server 
not having the password.

LineChart.cda:-
--------------

<?xml version="1.0" encoding="utf-8"?>
<CDADescriptor>
    <DataSources>
        <Connection id="1" type="sql.jdbc">
            <Driver>org.gjt.mm.mysql.driver</Driver>
            <Url>jdbc:mysql://10.12.17.11:3306/reports</Url>
            <User>root</User>
            <Pass></Pass>
    </DataSources>

    <DataAccess id="1" connection="1" type="mdx" access="public">
        <Query>
        select createddate as 'Date',views from views_daily where createddate between '2012-01-01' and '2013-04-16' group by createddate
                </Query>
                <Output indexes="1,2"/>
    </DataAccess>

</CDADescriptor>

LineChart.xfusion:
------------------
cdaName=LineChart.cda
cdaDataAccessId=1
cdaSolution=bi-developers
chartTitle=My Test Report
xAxisName=Date
yAxisName=views
chartType=Line
height=200
width=500
free=true

dashboard.html:-
----------------

<script type='text/javascript' 
src='GetCDFResource?resource=/system/fusion_plugin/fusioncharts/JSClass/FusionCh
arts.js'></script>
<script type="text/javascript" 
src="GetCDFResource?resource=/system/fusion_plugin/js/XDashFusionChartComponent.
js"></script>
<script type="text/javascript" 
src="GetCDFResource?resource=/bi-developers/fusion-charts/Dashboards/MetaLayerCh
arts.js"></script>

<div class="dashboardContent">
    <div id="dashboardRow1" style="position:relative; width:900px;">
        <div style="float:left; padding:10px;">
            <div style="text-align:center;font-weight:bold;">
                Line Chart
            </div>
            <div id="lineChart">
            </div>
        </div>
        <div style="float:right; padding:10px;">
            <div style="text-align:center;font-weight:bold;">
                Pie Chart
            </div>
            <div id="pieChart">
            </div>
        </div>
    </div>
    <div id="dashboardRow2" style="position:relative;width:900px;">
        <div style="float:left; padding:10px;">
            <div style="text-align:center;font-weight:bold;">
                Column Chart
            </div>
            <div id="columnChart">
            </div>
        </div>
        <div style="float:right; padding:10px;">
            <div style="text-align:center; font-weight:bold;">
                Bar Chart
            </div>
            <div id="barChart">
            </div>
        </div>
    </div>
    <div id="dashboardRow3" style="position:relative;width:900px;">
        <div style="float:left; padding:10px;">
            <div style="text-align:center;font-weight:bold;">
                Drill Bar Chart
            </div>
            <div id="drillBarChart">
            </div>
        </div>

        <div style="float:right; padding:10px;">
            <div style="text-align:center; font-weight:bold;">
               MS Column Chart 3D
            </div>
            <div id="msColumnChart">
            </div>
        </div>
    </div>
</div>
<script language="javascript" type="text/javascript">

    // Dashboard Parameters
    Dashboards.globalContext = false;

    var lineChart = {
        name: "lineChart",
        solution: "bi-developers",
        path: "fusion-charts/Fusion Charts Free",
        action: "LineChart.xfusion",
        executeAtStart: true,
        htmlObject: "lineChart",
        chartDefinition: MetaLayerCharts.lineChartDef,
        type: "XDashFusionChartComponent",
        postExecution: function(){
        }
    }

    var pieChart = {
        name: "pieChart",
        solution: "bi-developers",
        path: "fusion-charts/Fusion Charts Free",
        action: "PieChart3D.xfusion",
        executeAtStart: true,
        htmlObject: "pieChart",
        chartDefinition: MetaLayerCharts.pieChartDef,
        type: "XDashFusionChartComponent",
        postExecution: function(){
        }
    }

    var columnChart = {
        name: "columnChart",
        solution: "bi-developers",
        path: "fusion-charts/Fusion Charts Free",
        action: "ColumnChart3D.xfusion",
        executeAtStart: true,
        htmlObject: "columnChart",
        chartDefinition: MetaLayerCharts.columnChartDef,
        type: "XDashFusionChartComponent",
        postExecution: function(){
        }
    }

    var msColumnChart = {
            name: "columnChart",
            solution: "bi-developers",
            path: "fusion-charts/Fusion Charts Free",
            action: "MSColumnChart3D.xfusion",
            executeAtStart: true,
            htmlObject: "msColumnChart",
            chartDefinition: MetaLayerCharts.msColumnChartDef,
            type: "XDashFusionChartComponent",
            postExecution: function(){
            }
        }

    var barChart = {
            name: "barChart",
            solution: "bi-developers",
            path: "fusion-charts/Fusion Charts Free",
            action: "BarChart2D.xfusion",
            executeAtStart: true,
            htmlObject: "barChart",
            chartDefinition: MetaLayerCharts.barChartDef,
            type: "XDashFusionChartComponent",
            postExecution: function(){
            }
        }

    var drillBarChart = {
            name: "drillBarChart",
            executeAtStart: true,
            htmlObject: "drillBarChart",
            parameters: [["year","year"]],
            listeners: ["year"],
            chartDefinition: MetaLayerCharts.drillBarChartDef,
            type: "XDashFusionChartComponent",
            drillFunction:function(series,categories) {
                this.chartDefinition.cdaDataAccessId=3;     
                this.chartDefinition.chartLink=undefined;
                Dashboards.fireChange("year", categories);
            }
        }

    function load(){

        var components = [lineChart , pieChart , columnChart,msColumnChart , barChart,drillBarChart];

        Dashboards.init(components);

    }
    load();
</script>

MetaLayerCharts.js:-
------------------
var MetaLayerCharts = {
    lineChartDef: {
        width: "400",
        height: "150",
        chartType: "Line",
        cdaDataAccessId:"1"
    },
    pieChartDef: {
        width: "400",
        height: "150",
        chartType: "Pie3D",
        cdaDataAccessId:"2"
    },
    columnChartDef: {
        width: "400",
        height: "150",
        chartType: "Column3D",
        cdaDataAccessId:"2"
    },

    msColumnChartDef: {
        width: "400",
        height: "150",
        chartType: "MSColumn3D",
        cdaDataAccessId:"2",
        seriesName:"Sales 1;Sales 2"
    },

    barChartDef: {
        width: "400",
        height: "150",
        chartType: "Bar2D",
        cdaDataAccessId:"2",
        outputIndexId:"2"
    },
    drillBarChartDef: {
        width: "400",
        height: "150",
        chartType: "Bar2D",
        pathMode: "new",
        xFusionPath: "bi-developers/fusion-charts/Fusion Charts Free/DrillBarChart2D.xfusion",
        seriesParam:"SeriesParamName",
        categoriesParam:"categoriesParamName",
        chartLink:"JavaScript:drillBarChart.drillFunction('{SeriesParamName}','{categoriesParamName}')",    
        cdaDataAccessId:"2"
    }
};

I opened chart
http://mytest.report:8080
BI Developers Examples -> Fusion Charts Samples -> Fusion Charts Free and 
Select the LineChart . I am getting follwoing output.

Failed
null

Server Version: Pentaho Platform Engine Core 4.5.0-stable.49886

And I have checked tomcat logs , I am getting following error.

java.sql.SQLException: PentahoDatasourceConnectionProvider.ERROR_0002 - Unable 
to factory object for jndi name SampleData for reason 
javax.naming.NameNotFoundException: Name SampleData is not bound in this Context
at 
org.pentaho.reporting.platform.plugin.connection.PentahoJndiDatasourceConnection
Provider.createConnection(PentahoJndiDatasourceConnectionProvider.java:138)

02:17:58,369 ERROR [FusionContentGenerator] Error : resultset is null -> see 
previous error
02:17:58,369 ERROR [GenericServlet] GenericServlet.ERROR_0002 - Could not get 
content generator: 
solution=bi-developers&path=%2Ffusion-charts%2FFusion+Charts+Free&name=LineChart
.xfusion&dashboard-mode=false&pathMode=legacy

Please help me , How to resolve this issue.

Thanks.
Kiran

Original issue reported on code.google.com by kranthik...@gmail.com on 23 Apr 2013 at 9:43

GoogleCodeExporter commented 8 years ago
If anybody knows this issue. Please help me.

Original comment by kranthik...@gmail.com on 23 Apr 2013 at 9:44

GoogleCodeExporter commented 8 years ago
Hi,

I believe you have a problem in your CDA File.

<DataSources>
        <Connection id="1" type="sql.jdbc">
            <Driver>org.gjt.mm.mysql.driver</Driver>
            <Url>jdbc:mysql://10.12.17.11:3306/reports</Url>
            <User>root</User>
            <Pass></Pass>
    </DataSources>

Original comment by david.du...@xpand-it.com on 24 Apr 2013 at 3:05