Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Loading data from a datasource..

    Ok.. I got past my last hurdles but now that I'm ready to pull data from Postgres, I'm not getting anything but a blank page -- if I comment out the fetchData() call and I think the setDataSource() call then I get my page but with no data. I'm sure I'm missing something or doing something wrong.. Perhaps someone can spot what I'm missing (and yes, I've read the quickstart) :

    Below is what I have in my "Myapp.html" to load the datasource (is this needed if I'm programmatically doing it in Java below??)
    Code:
    ...
    <body>
    
    	<!--load datasources from server -->
    	<script src="sc/DataSourceLoader?dataSource=Organization"></script>
    ...
    Below are the lines on the client side to populate a listgrid..
    Code:
    ...
    // populate the List Grid
    DataSource ScripOrganizationDS = DataSource.get("Organization");
    this.setDataSource(OrganizationDS);
    this.fetchData();
    Below are the only lines in the log output after I removed the admin console..
    Code:
    2012-01-09 23:23:16.641 java[52995:407] [Java CocoaComponent compatibility mode]: Enabled
    2012-01-09 23:23:16.642 java[52995:407] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
    
    
    [WARN] Server class 'com.isomorphic.servlet.DataSourceLoader' could not be found in the web app, but was found on the system classpath
       [WARN] Adding classpath entry 'file:/usr/local/smartgwtpro-3.0/lib/isomorphic_core_rpc.jar' to the web app classpath for this session
       For additional info see: file:/Users/nrf/Desktop/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201112160242-rel-r37/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
    log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
    log4j:WARN Please initialize the log4j system properly.
    [WARN] 404 - GET /sc/DataSourceLoader?dataSource=Organization (127.0.0.1) 1405 bytes
       Request headers
          Host: 127.0.0.1:8888
          User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
          Accept: */*
          Accept-Language: en-us,en;q=0.5
          Accept-Encoding: gzip, deflate
          Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
          Connection: keep-alive
          Referer: http://127.0.0.1:8888/Myapp.html
          Cookie: isc_cState=ready; JSESSIONID=1rmggnvcdtpvj
          Cache-Control: max-age=0
       Response headers
          Content-Type: text/html; charset=iso-8859-1
          Content-Length: 1405
    [WARN] 404 - GET /sc/DataSourceLoader?dataSource=Organization (127.0.0.1) 1405 bytes
       Request headers
          Host: 127.0.0.1:8888
          User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
          Accept: */*
          Accept-Language: en-us,en;q=0.5
          Accept-Encoding: gzip, deflate
          Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
          Connection: keep-alive
          Referer: http://127.0.0.1:8888/Myapp.html
          Cookie: isc_cState=ready; JSESSIONID=1rmggnvcdtpvj
          Cache-Control: max-age=0
       Response headers
          Content-Type: text/html; charset=iso-8859-1
          Content-Length: 1405
    P.S. The data source for Organization is OK as I used it without changes in the admin console and it was completely happy with it and even loaded my test data without issue.

    #2
    Originally posted by Rick.F
    [WARN] 404 - GET /sc/DataSourceLoader?dataSource=Organization
    Did you see the 404 error in your log? You have the wrong url in your script tag.

    Comment


      #3
      Doh! I completely missed that!! I had focused on the 1405 bytes part at the end of the line and didn't notice the 404.. I'll have to check my server.properties file (if I recall that is where this is defined) since I'm away from my dev machine right now. It may be more like myapp/sc/DataSourceLoader or something like that.. Thanks Much!!!

      Comment


        #4
        Ok.. all fixed.. I spent a few hours poking through the settings without much luck -- a few stumbles here and there.. Eventually I read the setup docs for a project that was getting SmartGWT added on and fixed a few issues I had -- mostly with my web.xml which I believe was really the major problem once I fixed the URL issue mentioned earlier (I had issues afterwards with missing IDA files.. Anyway, all is good and my table is loading just fine! Thanks all!

        Comment

        Working...
        X