Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Error while generating report using BIRT designer(Error when trying to run report in BIRT)
icon9.gif  Error while generating report using BIRT designer [message #1565484] Thu, 15 January 2015 09:57 Go to next message
Hanumant Madane is currently offline Hanumant MadaneFriend
Messages: 1
Registered: January 2015
Junior Member
Hi Team,

I am very much new to the BIRT reporting and playing with some complex queries there.

My below SQL statement works fine when run in TOAD for DB2 but when use same in BIRT report designer, getting error:

SQL Statement

var sqlText = "select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where asset.assetnum not in(select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"

+" union"

+" select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum and asset.siteid = assetusercust.siteid"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where ASSET.ASSETNUM IN (select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"
+" and asset.status <> 'DECOMMISSIONED'"


it throws below error:

The following items have errors:


ReportDesign (id = 1):
+ There are errors evaluating script "maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var sqlText = new String();

var sqlText = "select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where asset.assetnum not in(select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"

+" union"

+" select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum and asset.siteid = assetusercust.siteid"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where ASSET.ASSETNUM IN (select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"
+" and asset.status <> 'DECOMMISSIONED'"
//+" where " + params["where"]

maximoDataSet.setQuery(sqlText);
":
Fail to execute script in function __bm_OPEN(). Source:
------
" + maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var sqlText = new String();

var sqlText = "select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where asset.assetnum not in(select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"

+" union"

+" select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum and asset.siteid = assetusercust.siteid"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where ASSET.ASSETNUM IN (select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"
+" and asset.status <> 'DECOMMISSIONED'"
//+" where " + params["where"]

maximoDataSet.setQuery(sqlText);
+ "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#2)
Script source: /report/data-sets/script-data-set[@id="5"]/method[@name="open"], line: 0, text:
__bm_OPEN(). (Element ID:1)
Error.ScriptEvaluationError ( 2 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var sqlText = new String();

var sqlText = "select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where asset.assetnum not in(select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"

+" union"

+" select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum and asset.siteid = assetusercust.siteid"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where ASSET.ASSETNUM IN (select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"
+" and asset.status <> 'DECOMMISSIONED'"
//+" where " + params["where"]

maximoDataSet.setQuery(sqlText);
":
Fail to execute script in function __bm_OPEN(). Source:
------
" + maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var sqlText = new String();

var sqlText = "select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where asset.assetnum not in(select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"

+" union"

+" select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum and asset.siteid = assetusercust.siteid"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where ASSET.ASSETNUM IN (select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"
+" and asset.status <> 'DECOMMISSIONED'"
//+" where " + params["where"]

maximoDataSet.setQuery(sqlText);
+ "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#2)
Script source: /report/data-sets/script-data-set[@id="5"]/method[@name="open"], line: 0, text:
__bm_OPEN(). (Element ID:1)
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:99)
at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:246)
at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleOpen(ScriptDataSetScriptExecutor.java:97)
at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.open(ScriptDataSetRuntime.java:80)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.open(PreparedScriptDSQuery.java:247)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:223)
at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1124)
at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:232)
at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:173)
at org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init>(QueryResultSet.java:98)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:267)
at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.executeQueries(ExtendedGenerateExecutor.java:205)
at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.execute(ExtendedGenerateExecutor.java:65)
at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:62)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(BirtRunAndRenderActionHandler.java:76)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(EngineFragment.java:318)
at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(AbstractBaseFragment.java:76)
at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(BirtEngineServlet.java:120)
at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(BaseReportEngineServlet.java:185)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.birt.report.servlet.BaseReportEngineServlet.service(BaseReportEngineServlet.java:116)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to execute script in function __bm_OPEN(). Source:
------
" + maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var sqlText = new String();

var sqlText = "select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where asset.assetnum not in(select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"

+" union"

+" select asset.assetnum as assetnum, asset.description as asset_description,asset.siteid as siteid,"
+" asset.ponumber as ponumber,"
+" asset.status as status, asset.parent as parent, asset.installdate as installdate,asset.warrantyexpdate as warrantyexpdate,"
+" asset.purchasedate as purchasedate,asset.subsidiary as entity,"
+" asset.assetuid as assetuid, asset.islinear as islinear,asset.classstructureid,"
+" asset.manufacturer as assetmanfact,"
+" (select description from asset asset_parent where asset.siteid = asset_parent.siteid and asset.parent = asset_parent.assetnum) as parent_description,"
+" asset.assettype as assettype, asset.priority as priority, asset.ramsize as ramsize,"
+" asset.serialnum as serialnum, asset.location as location,"
+" locations.description as location_description, asset.calnum as calnum,"
+" asset.shiftnum as shiftnum, asset.failurecode as failurecode, (select cs.description from classstructure cs where"
+" asset.classstructureid=cs.classstructureid) as cat,"
+" asset.conditioncode as conditioncode,"
+" asset.groupname as groupname , year(current date) - year(purchasedate) as diff, assetusercust.personid as primary_user from asset"
+" left outer join (select distinct assetnum,siteid,personid from assetusercust where isprimary=1)assetusercust"
+" on asset.assetnum=assetusercust.assetnum and asset.siteid = assetusercust.siteid"
+" left outer join"
+" locations on locations.location = asset.location and"
+" locations.siteid = asset.siteid"
+" left outer join"
+" longdescription on longdescription.ldownertable = 'ASSET' and"
+" longdescription.ldownercol = 'DESCRIPTION' and asset.assetuid = longdescription.ldkey"
+" where ASSET.ASSETNUM IN (select assetnum from (select asset.assetnum,count(1) from assetusercust asset where asset.isprimary=1"
+" group by asset.assetnum having count(1) > 1))"
+" and asset.status <> 'DECOMMISSIONED'"
//+" where " + params["where"]

maximoDataSet.setQuery(sqlText);
+ "
-----
A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#2)
Script source: /report/data-sets/script-data-set[@id="5"]/method[@name="open"], line: 0, text:
__bm_OPEN()
at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:147)
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:90)
... 53 more
Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#2)
Script source: /report/data-sets/script-data-set[@id="5"]/method[@name="open"], line: 0, text:
__bm_OPEN()
at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:123)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:996)
at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:138)
... 54 more
Caused by: org.eclipse.birt.core.exception.CoreException: Error evaluating Javascript expression. Script engine error: Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#2)
Script source: /report/data-sets/script-data-set[@id="5"]/method[@name="open"], line: 0, text:
__bm_OPEN()
at org.eclipse.birt.core.script.JavascriptEvalUtil.wrapRhinoException(JavascriptEvalUtil.java:303)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:102)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateScript(JavascriptEvalUtil.java:134)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:992)
... 55 more
Caused by: org.mozilla.javascript.WrappedException: Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#2)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1773)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
at org.mozilla.javascript.gen.c46._c1(/report/data-sets/script-data-set[@id="5"]/method[@name="open"]:2)
at org.mozilla.javascript.gen.c46.call(/report/data-sets/script-data-set[@id="5"]/method[@name="open"])
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
at org.mozilla.javascript.gen.c10._c0(/report/data-sets/script-data-set[@id="5"]/method[@name="open"]:0)
at org.mozilla.javascript.gen.c10.call(/report/data-sets/script-data-set[@id="5"]/method[@name="open"])
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c10.call(/report/data-sets/script-data-set[@id="5"]/method[@name="open"])
at org.mozilla.javascript.gen.c10.exec(/report/data-sets/script-data-set[@id="5"]/method[@name="open"])
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:95)
... 57 more
Caused by: com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
at com.ibm.tivoli.maximo.report.script.MXReportDataSetImpl.open(MXReportDataSetImpl.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
... 69 more
Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.ibm.tivoli.maximo.report.script.MXReportDataSourceImpl.getDesigntimeConnection(MXReportDataSourceImpl.java:294)
at com.ibm.tivoli.maximo.report.script.MXReportDataSourceImpl.getConnection(MXReportDataSourceImpl.java:204)
at com.ibm.tivoli.maximo.report.script.MXReportDataSetImpl.open(MXReportDataSetImpl.java:163)
... 74 more


can anyone please help me out with the error here.

this has become bottleneck for me.
Any help will be greatly appreciated.

Thanks in advance!

Regards,
Hanumant
Re: Error while generating report using BIRT designer [message #1565943 is a reply to message #1565484] Thu, 15 January 2015 15:26 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
BIRT has its own dedicated forum group. Moving this question there.
Re: Error while generating report using BIRT designer [message #1577165 is a reply to message #1565943] Wed, 21 January 2015 18:56 Go to previous message
Jesse Freeman is currently offline Jesse FreemanFriend
Messages: 184
Registered: January 2015
Senior Member
Based on the stack trace, it looks as through it cannot find the DB2 driver you are referencing within the classpath.
To start, verify this driver has been added to the classpath properly.
Previous Topic:What is the alternative to DrillDownGroupLevel function in Birt?
Next Topic:Getting more then one result in a single result field
Goto Forum:
  


Current Time: Sun Jul 14 03:03:49 GMT 2024

Powered by FUDForum. Page generated in 0.02746 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top