Tuesday 14 September 2010

Help Wanted - Why do my Lotus Connections Business Cards intermittently not get returned to WebSphere Portal ?

As part of my ongoing mission to seek out new life, and explore the wonders of inter-product communication, I'm intermittently finding that my LC Business Card ( aka Person Card ) does NOT appear in my Portal page, either via the Profiles portlet or via People Finder.

This follows my earlier reports, perhaps mistimed, of success here.

Digging around,using Firefox's Error Console,  I did see this exception at some point yesterday: -

Error: BusinessCard.getProfileInfo is not a function
Source File: http://wps615.uk.ibm.com:10040/wps_semanticTag/javascript/semanticTagPerson.js?language=en
Line: 430

where semanticTagPerson.js is here: -

/opt/IBM/WebSphere/PortalServer/ui/wp.tagging.liveobject/semTagEar/Live_Object_Framework.ear/liveobjects.war/javascript/semanticTagPerson.js

It's my assumption that, at some point, we must import the BusinessCard "object" which has a number of methods, one of which should be getProfileInfo and, at some point, this import/include fails, which means that the calling JS ( semanticTagPerson.js ) no longer has access to the "right" version of the object.

If I open a browser to the URL that I have set under Resources -> URLs within the Integrated Solutions Console in WebSphere Portal : -

http://lc25.uk.ibm.com:9083/profiles/html/businessCard

I do see a BusinessCard object defined: -

var BusinessCard = {
profileServiceUrl : "http://lc25.uk.ibm.com:9083/profiles",
semanticTagServiceUrl : "http://lc25.uk.ibm.com:9083/profiles/ibm_semanticTagServlet",
request : null,

and an associated getProfileInfo function: -

getProfileInfo : function(crossDomainRequest, callback, keyValue, searchKey) {
var searchKeySpecified = !(searchKey == null);
if (!searchKeySpecified) searchKey = "email"; // default search is by email

// logic to detect whether key is email or not.  if not email and no search key was specified, then assume key to be userid
if (keyValue.indexOf("@") == -1 && !searchKeySpecified) searchKey =  "userid";

if (!crossDomainRequest) {
if (window.ActiveXObject) {
request = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
request = new XMLHttpRequest();
}

if (request) {
// synchronous request
request.open("GET", BusinessCard.profileServiceUrl + '/json/profile.do?' + searchKey + '=' + keyValue + '&variable=person', false);

request.send(null);

if (request.status == 200) {
eval(request.responseText);
return person;
}
}
}
else {
var script = document.createElement("script");
script.src = BusinessCard.profileServiceUrl + '/json/profile.do?' + searchKey + '=' + keyValue + '&callback=' + callback;
document.getElementsByTagName('head')[0].appendChild(script);
}
}

Therefore, it's my view that there's some kind of network inconsistency between Portal and Connections that intermittently fails to connect to the URL, and therefore returns the WRONG BusinessCard object, meaning that things don't work.

What I did find that, to move from this not working to working, I merely needed to suspend and resume my Ubuntu laptop on which I'm running LDAP, Portal and Connections in separate VMware images. My current view is that there's some kind of network inconsistency between Portal and Connections, that gets "cleared" by the suspend/resume operation of the host OS, even though all of the guests are using NAT rather than bridged networking.

So, over to the community - what AM i missing ?

For the record, I've got WebSphere Portal 6.1.5.1 ( upgraded from 6.1.5.0 ) and Lotus Connections 2.5.0.2 ( LC2502_Fixpack.jar,  LO51606.jar,  LO51608.jar,  LO51610.jar,  LO53141.jar, LO51605.jar, LO51607.jar,  LO51609.jar,  LO51615.jar ).



No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...