• PageNotFoundException

    By Janet Holthe 1 decade ago

    I tried the sample database, but the graphs are not appearing on the XPages. In xpages.log, here is what I'm getting:

    mm/dd/yy hh:mm PM: Exception Thrown
    com.ibm.designer.runtime.domino.adapter.util.PageNotFoundException: Could not create the page/xsp/XJFC.xsp because the class xsp.xsp.XJFC could not be found. Please check your spelling.
        at com.ibm.domino.xsp.module.nsf.NSFService.doService(Unknown Source)
        at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(Unknown Source)
        at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(Unknown Source)
        at com.ibm.domino.xsp.bridge.websrv.servlets.DispatcherServlet.service(Unknown Source)
        at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(Unknown Source)
        at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(Unknown Source)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(Unknown Source)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(Unknown Source)
        at com.ibm.pvc.webhttpservice.BridgeServlet.service(Unknown Source)
        at com.ibm.pvc.internal.webcontainer.VirtualHost.handleRequest(Unknown Source)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(Unknown Source)
        at com.ibm.wsspi.webcontainer.WebContainer.handleRequest(Unknown Source)
        at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Unknown Source)
        at com.ibm.ws.http.HttpConnection.readAndHandleRequest(Unknown Source)
        at com.ibm.ws.http.HttpConnection.run(Unknown Source)
        at com.ibm.ws.util.ThreadPool$Worker.run(Unknown Source)

    • Some queries

      By Naveen Maurya 1 decade ago

      Hi Janet,

      Where did you try to run the application - Notes client or browser? Are you running it on local machine or server? 

      This can be an signature issue so try to sign the database with your ID. Try one more thing - in your database where error is showing you can go to Domino Designer, in "Project" menu click on "Clean" - this would effectively recompile the XPages and Java code. It worked in case Thom.

      Regards,

      Naveen Maurya

      • Additional Information

        By Janet Holthe 1 decade ago

        It is not working on my Notes 8.5.3 client. I have tried to use the database locally or on a server. When I use the database with a Firefox browser from a Domino 8.5.3 server, it shows up correctly. Using the same database with an 8.5.3 client does not show any graphs and gives the xpages.log errors mentioned earlier.

        I have cleaned the project, signed the database, and even went through all the individual Custom Controls and XPages and re-saved them. Build Automatically is enabled in Designer.

        On an aside, with the Notes client I can click on the "export to PDF" button and see the graph in the PDF that gets created. But the graph just simply doesn't show in the Notes 8.5.3 client.

        • This should solve it.

          By Naveen Maurya 1 decade ago

          Hi Janet,

          When you run the XPage on Notes client it adds /xsp/ in the path of XJFC.xsp (this XPage generates the chart image). So your <IMG> tag in Notes client looks something like this:

          <img id="view:_id1:_id2:imgChart" src="/xsp/Naveen/JavaCharts.nsf/xsp/XJFC.xsp?chartID=sngleifw1beo&amp;type=pie">

          In your error message you get like this:

          com.ibm.designer.runtime.domino.adapter.util.PageNotFoundException: Could not create the page /xsp/XJFC.xsp because the class xsp.xsp.XJFC could not be found.

          At that path (/xsp/XJFC.xsp) there is no XPage so the error. I don't know why Notes client does it that way and I even raised this question in XPages forum and they suggested me to use a normal <IMG> tag. In case of browser it works because it does not add anything to it.

          Regarding the PDF generation, the reason it works in Notes client is because in my JavaChartsCSJS.js file I explicitly call the XPDF.xsp (this XPage generates the PDF file) thus preventing Notes client from poking its nose in it.

          Now coming to the solution. What I have done is to create a computed field which will generate the <IMG> tag that will be shown in Notes client while the current <xp:image> tag will be shown in browser. 

          For this go to the Custom Control, say, PieChart. There you will find a code snippet:

           

          &lt;xp:image id=&quot;imgChart&quot;&gt;
          
          &lt;xp:this.url&gt;&lt;![CDATA[#{javascript:&quot;XJFC.xsp?chartID=&quot; + compositeData.chartID + &quot;&amp;type=pie&quot;}]]&gt;&lt;/xp:this.url&gt;
          
          &lt;/xp:image&gt;
          

          Replace the above code with this:

           

          <span style="color:#008000;">&lt;xp:image id=&quot;imgChart&quot;&gt;</span></div>
          
          <span style="color:#008000;">&lt;xp:this.url&gt;&lt;![CDATA[#{javascript:&quot;XJFC.xsp?chartID=&quot; + compositeData.chartID + &quot;&amp;type=pie&quot;}]]&gt;&lt;/xp:this.url&gt;</span></div>
          
          <span style="color:#008000;">&lt;xp:this.rendered&gt;&lt;![CDATA[#{javascript:@ClientType() != &quot;Notes&quot;}]]&gt;&lt;/xp:this.rendered&gt;</span></div>
          
          <span style="color:#008000;">&lt;/xp:image&gt;</span></div>
          
          &nbsp;
          
          <span style="color:#008000;">&lt;xp:text escape=&quot;false&quot; disableTheme=&quot;true&quot;&gt;</span></div>
          
          <span style="color:#008000;">&lt;xp:this.value&gt;&lt;![CDATA[#{javascript:&quot;&lt;img src=\&quot;XJFC.xsp?chartID=&quot; + compositeData.chartID + &quot;&amp;type=pie\&quot;&gt;&quot;}]]&gt;&lt;/xp:this.value&gt;</span></div>
          
          <span style="color:#008000;">&lt;xp:this.rendered&gt;&lt;![CDATA[#{javascript:@ClientType() != &quot;Web&quot;}]]&gt;&lt;/xp:this.rendered&gt;</span></div>
          
          <span style="color:#008000;">&lt;/xp:text&gt;</span></div>
          

          This should do the trick. Do let me know if this works and if it does then I will surely include it in Java Charts v1.3 Smile

          Also, if you want it for other charts then you will have update the code of BALChart, GanttChart, HistogramChart & ScatterChart accordingly (with minor tweaks).

          Regards,

          Naveen Maurya

          • That solved it! Thanks!

            By Janet Holthe 1 decade ago

            Thanks, Naveen. That indeed solved the issue. All the example charts now show up in the Notes client. Thank you very much for your help.

            I would suggest that you change the @ClientType() != "Web" to @ClientType() == "Notes" -- not a big deal since Notes and Web are the only options, but in reality you want this to show up only for the Notes client, and there's no guarantee that Notes and Web will be the only choices in the future (I could easily see "Mobile" as being an option in the future)