Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Exception sql script Report
roshan.g
<p>Hi,</p><p> </p><p>Could you please any help on understanding the exception which is attached for reference.</p><p> </p><p>Report developed using Scripted Data set Please find the script as below.</p><p> </p><p><span class='bbc_underline'>open trigger:</span></p><p> </p><p>maximoIncident = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());<br />
maximoIncident.open();<br />
<br />
var sqlText = "select asset.assetnum, asset.description as asset_description, longdescription.ldtext, "<br />
+ " asset.siteid, asset.status, asset.parent, asset.mainthierchy, asset.assetuid, asset.islinear, "<br />
+ " asset_parent.description as parent_description, asset.assettype, asset.priority, asset.serialnum, "<br />
+ " asset.location, locations.description as location_description, asset.calnum, asset.shiftnum, "<br />
+ " asset.failurecode, asset.conditioncode, asset.groupname "<br />
+ " from maximo.asset "<br />
+ " left outer join maximo.asset maximo.asset_parent on asset.parent = asset_parent.assetnum "<br />
+ " left outer join maximo.locations "<br />
+ " on locations.location = asset.location "<br />
+ " and locations.siteid = asset.siteid "<br />
+ " left outer join maximo.longdescription on longdescription.ldownertable = 'ASSET' "<br />
+ " and longdescription.ldownercol = 'DESCRIPTION' "<br />
+ " and asset.assetuid = longdescription.ldkey "<br />
+ " where " + params["where"]<br />
+ " order by asset.assetnum "<br />
;<br />
<br />
maximoDataSet.setQuery(sqlText);</p><p> </p><p> </p><p><span class='bbc_underline'>Fetch trigger:</span></p><p> </p><p>if (!maximoIncident.fetch())<br />
return (false);<br />
<br />
row["assetnum"] = maximoIncident.getString("assetnum");<br />
row["description"] = maximoIncident.getString("asset_description");<br />
row["ldtext"] = maximoIncident.getString("ldtext");<br />
row["siteid"] = maximoIncident.getString("siteid");<br />
row["status"] = maximoIncident.getString("status");<br />
row["mainthierchy"] = maximoIncident.getBooleanString("mainthierchy");<br />
row["parent"] = maximoIncident.getString("parent");<br />
row["parent_description"] = maximoIncident.getString("parent_description");<br />
row["assettype"] = maximoIncident.getString("assettype");<br />
row["priority"] = maximoIncident.getString("priority");<br />
row["serialnum"] = maximoIncident.getString("serialnum");<br />
row["location"] = maximoIncident.getString("location");<br />
row["location_description"] = maximoIncident.getString("location_description");<br />
row["calnum"] = maximoIncident.getString("calnum");<br />
row["shiftnum"] = maximoIncident.getString("shiftnum");<br />
row["failurecode"] = maximoDataSet.getString("failurecode");<br />
row["conditioncode"] = maximoIncident.getString("conditioncode");<br />
row["groupname"] = maximoIncident.getString("groupname");<br />
row["assetuid"] = maximoIncident.getInteger("assetuid");<br />
row["islinear"] = maximoIncident.getInteger("islinear");<br />
return (true);</p><p> </p><p><span class='bbc_underline'>Initialize trigger :</span></p><p> </p><p>importPackage(Packages.com.ibm.tivoli.maximo.report.script);<br />
<br />
mxReportScriptContext = MXReportScriptContext.initialize(reportContext);</p><p> </p><p><span class='bbc_underline'>after factory :</span></p><p> </p><p>MXReportScriptContext.close();</p><p> </p><p>Hope I will get support to understand it beter, if above topic is already kindly let me know.</p><p> </p>
Find more posts tagged with
Comments
micajblock
<p>First of all there is a forum specific to Maximo, you might get additional help there. In the meantime what is the error you are getting?</p>
roshan.g
<p>Hi mblock,</p><p> </p><p>Thanks for your reply on mentioned topic, the exception occurred as below specified.</p><p> </p><p>I am designing the birt report for maximo on incident management.kindly help me if you know the below issue.</p><p> </p><p> </p><p>A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.3.2.r232_v20090211
Error Code:data.engine.BirtException
Error Message:A BIRT exception occurred: There are errors evaluating script "__bm_open()":
Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.NullPointerException (<inline>#3).. See next exception for more information.
There are errors evaluating script "__bm_open()":
Wrapped com.ibm.tivoli.maximo.report.script.MXReportRuntimeException: java.lang.NullPointerException (<inline>#3).</p>
micajblock
<p>I have not seen that one before. Maybe other Maximo experts have seen this one.</p>
roshan.g
<p>Hi mblock,</p><p> </p><p>Report is design in local environment (Desktop) which is having Db2 database using eclipse version: 3.7.1 Build id: M20110909-1335.</p><p> </p><p>If you go through attached expection.txt file and it may be more understandalbe.</p><p> </p><p>Error :</p><p> </p><p>org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script</p>
micajblock
<p>BTW, in the stack trace do you see something like class def not found?</p>
roshan.g
<p>Hi mblock,</p><p> </p><p>Thanks for your patience,</p><p> </p><p> </p><p>Here the exception for class,I think there datasource is not available, correct if i'm wrong.</p><p> </p><p> </p><p>Caused by: java.lang.NullPointerException
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:285)
at com.ibm.tivoli.maximo.report.script.MXReportDataSourceImpl.getConnection(MXReportDataSourceImpl.java:200)
at com.ibm.tivoli.maximo.report.script.MXReportDataSetImpl.open(MXReportDataSetImpl.java:160)</p>
micajblock
<p>Could be. Have you set the mxreportdatasources.properties file correctly?</p>
roshan.g
<p>Hi mblock,</p><p> </p><p>Yes, it is in resource folder.</p>
micajblock
<p>and the connection properties in the file are correct? What id you use the JDBC driver directly?</p>
roshan.g
<p>Hi mlblock</p><p> </p><p> </p><p>Here is details.</p><p> </p><p>maximoDataSource.driver=com.ibm.db2.jcc.DB2Driver
maximoDataSource.username=ctginst1
maximoDataSource.password=pwd
maximoDataSource.schemaowner=owner</p>