Question

I'm following this guideline to get started with IBM Social Business ToolKit: https://www.ibmdw.net/social/getting-started-as-java-developer/

And trying to get communities listed (/myapp.contextroot/GetMyCommunity.jsp) I'm getting a response (application/javascript):

if(typeof _sbt=='undefined' || window._sbt_bridge_compat)
{_sbt=0;
    if(typeof define=='undefined'){
        dojo.registerModulePath('sbt','http://localhost:8080/sbt/js/sdk/sbt');
        dojo.registerModulePath('sbt._bridge','http://localhost:8080/sbt/js/sdk/_bridges/dojo');
        dojo.registerModulePath('sbt.widget','http://localhost:8080/sbt/js/sdk/dojo');
        dojo.require('sbt._bridge.amdcompat');
    }
         else {
            dojo.registerModulePath('sbt','http://localhost:8080/sbt/js/sdk/sbt');
            dojo.registerModulePath('sbt/_bridge','http://localhost:8080/sbt/js/sdk/_bridges/dojo-amd');
            dojo.registerModulePath('sbt/widget','http://localhost:8080/sbt/js/sdk/dojo2');
         }

            define('sbt/config',['sbt/ErrorTransport','sbt/Endpoint'],
                function(ErrorTransport,Endpoint){
                    window.sbt = {};
                    sbt.Properties={"libraryUrl":"http:\/\/localhost:8080\/social.helloworld\/library","serviceUrl":"http:\/\/localhost:8080\/social.helloworld\/service","sbtUrl":"http:\/\/localhost:8080\/sbt\/js\/sdk"};
                    sbt.Endpoints={
                        'sametime':new Endpoint({"invalid":"true","transport":new ErrorTransport('sametime','Required endpoint is not available: sametime')}),
                        'domino':new Endpoint({"invalid":"true","transport":new ErrorTransport('domino','Required endpoint is not available: domino')}),
                        'smartcloud':new Endpoint({"invalid":"true","transport":new ErrorTransport('smartcloud','Required endpoint is not available: smartcloud')}),
                        'connections':new Endpoint({"invalid":"true","transport":new ErrorTransport('connections','Required endpoint is not available: connections')})};
                    return sbt;
                }
                );
 }

It seems I need to configure JS runtime somehow. Am I right?

and

At point #8 in guideline document said to create the file managed-beans.xml in the WebContent\WEB-INF folder. Should it be empty? How to configure it?

FYI: com.ibm.sbt.sample.web works against own IBM Connections installation like a charm.

Using:

  1. sbtsdk-1.0.0.20130603-0843
  2. preconfigured apache-tomcat-7.0.30
  3. eclipse Juno (for EE developers)
  4. IBM Connection 4 on own server

UPDATE: I wrote to ibmsbt teem about that mistake and it was corrected. So, now there is no errors in that tutorial. Go ahead!

Was it helpful?

Solution

I think the cause of the problem is there is a mistake in the documentation in point #5. The url pattern for the library servlet is /library/* instead of /*.

If this does not resolve the problem, can you point me the code of the GetMyCommunity.jsp ? That will give me a better idea of the reason of the problem.

For managed-beans.xml, you need to populate the endpoint and environment configurations in the file. As a reference, you can refer to a sample file that is used by com.ibm.sbt.sample.web application. Go to sbtsdk\samples\war\sbt.sample.web\WEB-INF in the SDK build. You would need to expand the sbt.sample.web application. Note that the variable %{connections.url} in the "connections" endpoint can be replaced with the URL to your own connections instance, or you can modify the value for the variable connections.url in the file sbt.properties.

Also here a link which gives more information on managed-beans.xml http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Social+Business+Toolkit+SDK+documentation#action=openDocument&res_title=Connecting_to_other_systems_SDK1.0&content=pdcontent

Hope this resolves your problem

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top