Author Topic: JSON servlet returns string - HURRAY!, but cannot display in paramquery grid  (Read 9260 times)

dataSQL_

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 48
    • View Profile
runs but only says LOADING...
« Reply #15 on: January 04, 2017, 02:46:18 am »
Found the solution. The problem was two-fold. First Eclipse NEON has a bug that causes an AWT error, to resolve that error, you need to install WindowBuilder. Second, I converted my Project to a Maven project and added the JSTL 1.2 dependency -- note, I had it already in the lib folder and added to the build path, but for whatever reason, the JSTL jar was not being found. Now, the web application has no errors.

it runs locally on tomcat, but only says LOADING... when deployed.

Why does it not complete the loading of data when deployed, but does locally?

Eclipse IDE used to create JSF web app that runs locally loading remote MySQL data. But does not run when deployed to AWS. What could cause the 502 proxy error?

http://35.167.46.75/faces/index.xhtml

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core">

<h:head>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"/>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"/>
<h:outputStylesheet name="css/pqgrid.min.css"/>
<h:outputScript name="js/pqgrid.min.js"/>
<h:outputScript name="js/jquery.ui.touch-punch.js"/>

<script>
$(function()
{
var dataModel =
{
    error: function(a, b, c)
    { alert(b);
alert(c);
alert(a.responseText);
console.log(a.responseText);},

        location: "remote",
            dataType: "JSON",
            method: "GET",
            url: "queryreturn",
            getData: function (dataJSON)
          {  return { data: dataJSON.data };  }
    }
   
    var obj = {};
    obj.dataModel = dataModel;
    obj.width = 700;
    obj.height = 400;   
    obj.colModel = [
    { title: "Last Name", width:150,  dataType: "string", dataIndx: "lastname"},
    { title: "Person ID", width:100, dataType: "int", dataIndx: "person_id"},
    { title: "First Name", width:150, dataType: "string", dataIndx: "firstname"},
    { title: "Full Name", width:200, dataType: "string", dataIndx: "fullname"},
    ];
         
    $("div#grid_array").pqGrid( obj );
    });
</script>

</h:head>
<h:body>
Grid is below<br>
</br>
<div id="grid_array"></div>
</h:body>
</html>

It may be a time out issue.  Here are the logs from AWS:

-------------------------------------
/var/log/httpd/elasticbeanstalk-error_log
-------------------------------------
[Tue Jan 03 19:15:04 2017] [warn] [client 50.172.200.107] proxy: no HTTP 0.9 request (with no host line) on incoming request and preserve host set forcing hostname to be ip-172-31-41-207.us-west-2.compute.internal for uri /
[Tue Jan 03 21:19:11 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:19:11 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:19:40 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:19:40 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:19:58 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://sample-env.nkzp2qusma.us-west-2.elasticbeanstalk.com/faces/index.xhtml
[Tue Jan 03 21:19:58 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://sample-env.nkzp2qusma.us-west-2.elasticbeanstalk.com/faces/index.xhtml
[Tue Jan 03 21:20:30 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:20:30 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:25:53 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:25:53 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:38:57 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:38:57 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:40:05 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:40:05 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:40:29 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 21:40:29 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:12:46 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:12:46 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:30:58 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:30:58 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:32:13 2017] [error] [client 108.238.181.147] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:32:13 2017] [error] [client 108.238.181.147] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:37:32 2017] [error] [client 173.242.16.106] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:37:32 2017] [error] [client 173.242.16.106] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:43:25 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:43:25 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:48:24 2017] [error] [client 173.242.16.106] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:48:24 2017] [error] [client 173.242.16.106] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:52:34 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://sample-env.nkzp2qusma.us-west-2.elasticbeanstalk.com/faces/index.xhtml
[Tue Jan 03 22:52:34 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://sample-env.nkzp2qusma.us-west-2.elasticbeanstalk.com/faces/index.xhtml
[Tue Jan 03 22:52:36 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://sample-env.nkzp2qusma.us-west-2.elasticbeanstalk.com/faces/index.xhtml
[Tue Jan 03 22:52:36 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://sample-env.nkzp2qusma.us-west-2.elasticbeanstalk.com/faces/index.xhtml
[Tue Jan 03 22:55:23 2017] [error] [client 24.205.98.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 22:55:23 2017] [error] [client 24.205.98.8] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 23:43:22 2017] [error] [client 66.249.65.204] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 23:43:22 2017] [error] [client 66.249.65.204] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 23:57:44 2017] [error] [client 71.92.169.34] (70007)The timeout specified has expired: proxy: error reading status line from remote server localhost:8080, referer: http://35.167.46.75/faces/index.xhtml
[Tue Jan 03 23:57:44 2017] [error] [client 71.92.169.34] proxy: Error reading from remote server returned by /faces/queryreturn, referer: http://35.167.46.75/faces/index.xhtml
« Last Edit: January 04, 2017, 05:54:56 am by dataSQL_ »