• MobileControls400\MobileControlsLite.nsf - get Error 500

    By Arshad Mahmoud 1 decade ago

    Been looking at the MobileApps suite, superb set of applications.

    Can anyone please help me, I am trying to adapt the XPages Mobile Controls Lite

    (MobileControls400\MobileControlsLite.nsf) as a starting for an application for our internal use, the sample

    application is reproducting Error 500, HTTP Web Server: Command Not Handled Exception.


    I have investigated this and the MobileControlsLite.nsf has 4 errors (actually one error repeated 4 times) in

    Directories.java, lines 26, 34, 42 & 58.

    The method getDataDirectory() is undefined for the type AbstractNotesDominoPlatform in Directories.java in

    MobileControlsLite.nsf/WebContent/WEB-INF/src/org/openntf/util

    I am using Release 8.5.1 on Microsoft Windows 32 bit.

    Regards Arshad

    • 8.5.2

      By Niklas Heidloff 1 decade ago

      Oh, I assumed that getDataDirectory also existed in 8.5.1. So two choices:

       

      1. Update to 8.5.2

       

      2. Replace getDataDirectory with your own method to return the Domino data dir

       

      I'll do the real fix when I'll get to it.

      • I now only see lorem ipsum more ... Lorem ipsum

        By Arshad Mahmoud 1 decade ago

        Hi niklas,

        thanks Niklas, as a quick, I have modified directories.java so that it returns correct stuff for my install

        Method externalFilesInstalled() returns true

        Method getDojoVersion() returns "dojo-1.3.2"

        my 8.5.1 domino server has following directories as required,  D:\Data\Domino\Data\domino\js\dojo-1.3.2  &
        D:\Data\Domino\Data\domino\js\mobile

        The ViewAndEditDocument.xsp now works but only displayes the following, i.e. no documents, the database has lots of
        Lorem ipsum documents, I even created some opening the XPages page 'InitializeData' and pressing the button several times.

        Any guesses as to how is wrong, I get no errors in log.nsf.

        <h1>
            Lorem ipsum</h1>
        


          <li class="mblVariableHeight">
          
          
                      More ...
              </div>
          </li>
          

        Lorem ipsum

  • firebug

    By Niklas Heidloff 1 decade ago

    Can you pls tell me what you see on net tab in firebug?

     

    Looks like you still don't get all files transferred to the client.

    • Firebug Net Tab shows - error 404 Not found on GET xspClientDojo_en-gb.js

      By Arshad Mahmoud 1 decade ago

      Niklas,

      Looked at the firebug net tab, which shows an error 404 Not found on GET xspClientDojo_en-gb.js, this is the only error.

      I have actually started again from he original download, just in case i managed to delete something, but I still get the same error. What am I missing and how can I fix it. on 8.5.1. 

      PS: using 8.5.2 is not an option, since some our clients will be stuck on 8.5.1 for a while.

      I have listed all of the information given by Firebug Net Tab for this error below:

      GET xspClientDojo_en-gb.js
      http://tcc1:82/domjs/ibm/xsp/widget/layout/nls/xspClientDojo_en-gb.js
      404 Not Found
      tcc1:82
          
      159 B

      Headers Tab ->
      Response Headersview source
      Server    Lotus-Domino
      Date    Thu, 07 Apr 2011 10:39:22 GMT
      Connection    close
      Pragma    no-cache
      Cache-Control    no-cache
      Expires    Thu, 07 Apr 2011 10:39:22 GMT
      Content-Type    text/html
      Content-Length    159

      Request Headers ->

      Host    tcc1:82
      User-Agent    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16
      Accept    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language    en-gb,en;q=0.5
      Accept-Encoding    gzip,deflate
      Accept-Charset    ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive    115
      Connection    keep-alive
      Referer    http://tcc1:82/MobileControls400/MobileControlsLite.nsf/ViewAndDocumentDemo.xsp
      Cookie    SessionID=CTKXRMCXNL
          
      Response Tab ->

      Unable to Process Request

      Http Status Code: 404

      Reason:

      File not found or unable to read file



      HMTL Tab ->

      Http Status Code: 404
      Reason: File not found or unable to read file

      • need to look

        By Niklas Heidloff 1 decade ago

        that error can be ignored. pls send me a mail. I need to look at it via desktop sharing

        • which email address do I send remote desktop sharing request to

          By Arshad Mahmoud 1 decade ago

          thanks Niklas, which email address do I send remote desktop sharing request to?

          • left column

            By Niklas Heidloff 1 decade ago

            see left column - email project owners

             

            the js file you saw in firebug is not the issue

            • View working ok - but no document displayed

              By Arshad Mahmoud 1 decade ago

              Hi Niklas,

              Thanks for you help on Friday morning, much appreciated.

              The View is now working ok - but no document displayed, I get 'content is null' when I click on any of the documents

              <img class="errorBreak a11yFocus " role="checkbox" src="chrome://firebug/content/blank.gif" title="Break On This Error"/><a class="errorSource a11yFocus " title="if (docToBeOpened) content.innerHTML = "> error is in</a><span class="objectBox objectBox-errorMessage hasBreakSwitch opened" role="presentation"><a class="objectLink objectLink-sourceLink a11yFocus "> mobileControls.js (line 337</a></span><a class="errorSource a11yFocus " title="if (docToBeOpened) content.innerHTML = ">)</a></div>
              
              &nbsp;
              
              <a class="errorSource a11yFocus " title="if (docToBeOpened) content.innerHTML = ">if (docToBeOpened) content.innerHTML = &quot;&quot;; </a></div>
              

              Any idea what is wrong.

               

              For everyone elses benefit, changes that resulted from Niklas's debug are as follows:

              in mInitialize.xsp line 23 change dojo.parser.parse();  to dojox.mobile.parser.parse();

              in mobilecontrols.js line 252 change dojo.parser.parse(newdiv);  to dojox.mobile.parser.parse(newdiv);

              With above 2 changes, I now get the views displayed OK from ViewAndDocument.xsp & ViewAndDocumentDemo.xsp, but clicking on any of these view links results in but no document displayed.

              Regards Arshad
               

            • View working ok - but no document displayed

              By Arshad Mahmoud 1 decade ago

              Hi Niklas,

              Thanks for you help on Friday morning, much appreciated

              The view is now displaying correctly but no document is displayed, I get error 'content is null'

              if (docToBeOpened) content.innerHTML = "";  on line 337 in mobilecontrols.js

              Any ideas, what is wrong. It happens on both ViewAndDocument.xsp & ViewAndDocumentDemo.xsp


              For everyone elses benefit.Niklas debugging resulted in the following 2 changes:

              in mInitialize.xsp line 23 change dojo.parser.parse();  to dojox.mobile.parser.parse();

              in mobilecontrols.js line 252 change dojo.parser.parse(newdiv);  to dojox.mobile.parser.parse(newdiv);

              Regards Arshad
               

      • domjs/ibm/xsp/widget/layout/nls/xspClientDojo_en-gb.js does not exist

        By Arshad Mahmoud 1 decade ago

        Hi Niklas,

        I have done some further investigating, http://tcc1:82/domjs/ibm/xsp/widget/layout/nls/xspClientDojo_en-gb.js does not exist.

        Although D:\Data\Domino\Data\domino\js\dojo-1.3.2\ibm\xsp\widget\layout\nls\xspClientDojo_en-gb.js exists, looks as if dojo-1.3.2 is missing from the .js file path.

        I presume domjs is an alias to domino/js directory.

        I tried searching for xspClientDojo_en-gb.js with the database without any sucess, ith the intention of adding dojo-1.3.2 to filepath.

  • Directories class

    By Hermes Mosquera 1 decade ago

    I had an issue like that even after updating to 8.5.2 and installing dojo-1.50. I solved the problem making a little change to the Directories class in the MobileControlsLite project. I just added a method for checking if dojo-1.5.0 was installed.

    I hope it will be of any help.

    • can you please share this code with me

      By Arshad Mahmoud 1 decade ago

      Hi Hermes,

      Can you please share this extra method with me or the your modified directories.jave file.

      My understanding after reading readme.pdf was that dojo-1.5.0 was not needed, Niklas has incoporated the relevant dojo-1.5.0 inside the MobileControlsLite.nsf.  Do I need o install the dojo-1.50 directory on my server?

      • Directories.java

        By Hermes Mosquera 1 decade ago

        Here is the little changes to the Directories class. Even though I followed all the installation instructions, I might have messed something in the process. When I saw a few errors on Firebug related with loading the dojo library, one was dojo.Parser.parse() method not found, I decided to add dojo-1.5.0 to the Domino server and modified the class. Since then, xPages in the Mobile Control Lite database have been working as expected.

        There is one thing that seems inconsistent though it is the fact that some libraries are loaded from different sources, some from dojo15\... path, others from dojo-1.5.0\... path but I need to double check.

        • 8.5.1?

          By Niklas Heidloff 1 decade ago

          Hermes, I saw the issue with missing dojo.parser.parse(); on Arshad's machine. You can replace the two calls to dojox.mobile.parser.parse() as Arshad writes in this thread. Then you don't need to install Dojo 1.5.

           

          However I still don't understand why this happens and why it works for me. Are you also using 8.5.1? I'd like to able to reproduce this issue so that I can debug.

          • 8.5.2 in server and designer

            By Hermes Mosquera 1 decade ago

            Niklas,

            I've got 8.5.2 installed in both, the server and the designer. I am going to change the dojo.parser line and check in firebug if alll the libraries are being pulled from the same source.

            I'll keep you posted.

    • hmm

      By Niklas Heidloff 1 decade ago

      You sure you're using the MobileControlsLite.nsf? This one comes with all required Dojo code. You don't have to install Dojo 1.5 on your server.

      The only reason I need to know the installed Dojo version is because I need to know from which directory to read/ibm/xsp/widget/layout/xspClientDojo.js. All other JS code is in the db already.