Focal Point
HTML Composer designed page - How to debug problem in ibirls3.js?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6777030526

October 10, 2012, 09:59 PM
Francis Mariani
HTML Composer designed page - How to debug problem in ibirls3.js?
How does one debug a web page that triggers this error?

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; BTRS129830; MS-RTC LM 8)
Timestamp: Thu, 11 Oct 2012 01:49:58 UTC

Message: 'null' is null or not an object
Line: 12853
Char: 8
Code: 0
URI: http://localhost:8080/ibi_html...i/html/js/ibirls3.js

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 10, 2012, 10:24 PM
Francis Mariani
This supposed "Guided ad hoc" page has:

3 Calendar Controls;
1 Radio Button set;
1 Double List Box controlling the report dimensions;
1 Double List Box controlling the report measures;
7 List boxes for filters;
3 Double List boxes for filters;

I don't know where to start. You cannot disable all controls and then enable them one at a time until you trigger the error.

You cannot play around with the code because that is forbidden.

What to do?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 10, 2012, 10:37 PM
Waz
This can be difficult, and I would, just to find the root cause, debug the js file by adding an alert({something}) near where the line number is.

All depends on what is null, and where it came from, did it come from the controls on the web page.

The line number is in the middle of code that checks the returned xml data from some call.

Did the call fail ?

I have seen nulls produced when non xml is returned to an xmlhttp object.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 10, 2012, 11:05 PM
Francis Mariani
[whisper]In the past I have added alerts in ibirls3.js, even though it's forbidden.[/whisper]

Good news! I added SET XRETRIEVAL=OFF in all the dynamic, embedded procedures and I don't get the error. I will now remove these one by one...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 10, 2012, 11:15 PM
Waz
[EXTRA LOUD]Sometimes you just have to do what you have to do to get the job done!![EXTRA LOUD]

I guess its standard debug time.....

Good Luck


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 10, 2012, 11:29 PM
Francis Mariani
So far so good...

Off to bed to recuperate for the day (real) job...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 11, 2012, 02:23 AM
Norb Eckert
Most Amusing, Gentlemen. But you are doing what needs to be done regardless. Cool

Since you are willing to delve deep into the IBI code as Indiana Jones - I'm sure you will resolve the issue. And when you grow weary of that please add a line of <script> www.jquery.xxx and become productive once again.


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
October 11, 2012, 04:11 AM
Wep5622
I notice you're using IE8, which has a builtin debugger (F12). By default it doesn't trigger on errors, but you can uncheck the option that disables it (sigh...) in the Advanced Internet Settings.

Looking at that particular bit of code it probably only triggers in IE to begin with, if we are indeed looking at the same version of the file. Here the line you mentioned is in the method Ib_dataInfoObject.prototype.updateInfoData and the lines in question are:
12849		var xmlDoc = getXml(request, false, false, true);
12850
12851		if (typeof (xmlDoc) == 'object' && xmlDoc2String(xmlDoc))
12852			return getSingleNode(xmlDoc, '//report');
12853		else if (xmlDoc.search('<fxf ') != -1)
12854		{
12855			var index = xmlDoc.search('<fxf ');
12856			var fxf = xmlDoc.substr(index, xmlDoc.length - index);


Apparently xmlDoc is a null-value and hence doesn't have a search()-method. That could be traced back to getXml failing to parse the received XML. In my experience that probably means that what's being returned isn't actually XML but an IBI error message.

I would appreciate if IBI wouldn't return an HTTP-200 status (OK) on errors in procedures, as that makes it unnecessarily difficult to check HTTP-responses for success or failure.
Your problem seems to indicate that IBI is struggling with that very same issue as well...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
October 11, 2012, 07:21 AM
David Glick
You should open a case with Support Services so it can be fixed.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com