Announcement

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

    Custom DataSource - Simple example

    I'm using SmartGWT 3.0 eval (until our Power purchase comes through).

    I'm trying to follow the EE Showcase example for a Simple Custom DataSource http://www.smartclient.com/smartgwtee/showcase/#simple_custom_ds and I can't get it to run. A null pointer exception is thrown when setting the data source on the ListGrid, so clearly the DataSource is not getting created. I think this looks like the best solution for my web app if I can just get it to work. Anyone has extended BasicDataSource, if you found any gotchas not pointed out in the Showcase, I'd really appreciate the help.

    Thanks-

    #2
    Take a look at the FAQ on DataSources not loading - it has complete troubleshooting steps.

    Comment


      #3
      Yes, thanks, I went through all of those checks before I posted.

      I notice that the server.properties provided in the example includes JPA properties that are not pertinent to the example (there is no Entity Manager - the data is declared as a static List in the server class). This makes me wonder whether the wrong file got uploaded.

      I want to use this approach because I have an API I must use to get the data to go into the ListGrid; the data is provided to me as a Collection of objects. If there is another solution you think would work please point me that way.

      Thanks!
      Last edited by susanpemble; 18 Apr 2012, 05:15.

      Comment


        #4
        Those checks are pretty much comprehensive, so, which check revealed the problem, and what error is occurring at that step?

        Comment


          #5
          Sorry but I don't understand. The problem is revealed by the browser displaying "onModuleLoad threw an exception" -- null pointer at ListGrid.setDataSource().

          I went through the FAQ and verified that all those points are satisfied:

          DataSourceLoader servlet is actually present in web.xml, that the required "Init" servlet is also present and that the <script src=> tag is pointing at the correct URL for the DataSourceLoader servlet. The easiest way to check the latter is to use Firebug's NET panel.

          DataSource ID I pass to DataSource.get() matches the file name (should be dataSourceId.ds.xml) and matches the ID attribute on the <DataSource> tag (note: attribute is "ID" not "id"). DataSource IDs are case sensitive, including the file name.

          server.properties setting for "project.datasources" matches the directory where you have placed my .ds.xml file

          server-side log does not have any errors such as malformed XML. If you see something about missing files, you have the wrong imports in your .gwt.xml file - do not import com.smartgwt.SmartGWT, import the Pro, Power or EE version instead (com.smartgwtee.SmartGwtEE, com.smartgwtpro.SmartGwtPro, or
          com.smartgwtpower.SmartGwtPower).

          the <script src=> tag pointing to the DataSourceLoader servlet is placed after the <script src=> for your GWT application (*.nocache.js).

          Comment


            #6
            One of these steps has to reveal an error, look very closely. For example, perhaps you are calling DataSource.get() with "foo.ds.xml" but it should be just "foo".

            If you need more help, use Firebug's Net panel to see the response of the DataSourceLoader servlet, and post it here along with your call to DataSource.get().

            Comment


              #7
              gwt.xml
              Code:
              <?xml version="1.0" encoding="UTF-8"?>
              <module rename-to='customdatasource'>
              	<inherits name='com.google.gwt.user.User' />
              	<inherits name='com.smartgwt.tools.SmartGwtTools' />
              	<inherits name='com.smartgwtee.SmartGwtEE' />
              	<inherits name='com.smartgwtee.tools.Tools' />
              	<entry-point class='s.pemble.client.CustomDataSource' />
              	<source path='client' />
              	<source path='shared' />
              </module>
              HTML
              Code:
              <!doctype html>
              <html>
                <head>
                  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
                  <title>Custom Data Source</title>    
                  <script> var isomorphicDir = "customdatasource/sc/"; </script>
                  <script type="text/javascript" src="customdatasource/customdatasource.nocache.js"></script>
                  <script type="text/javascript" src="customdatasource/sc/DataSourceLoader?dataSource=descriptor"></script>  
                </head>
                <body>
                </body>
              </html>
              Code:
              package s.pemble.client;
              
              import com.google.gwt.core.client.EntryPoint;
              import com.smartgwt.client.data.DataSource;
              import com.smartgwt.client.types.ExpansionMode;
              import com.smartgwt.client.widgets.grid.ListGrid;
              import com.smartgwt.client.widgets.grid.ListGridField;
              import com.smartgwt.client.widgets.layout.VLayout;
              
              /**
               * Entry point classes define <code>onModuleLoad()</code>.
               */
              public class CustomDataSource implements EntryPoint
              {
                 /**
                  * This is the entry point method.
                  */
                 public void onModuleLoad()
                 {
                    DataSource dataSource = DataSource.get("descriptor");
                    ListGrid table = new ListGrid();
                    
                    // configure data source
                    table.setDataSource(dataSource);
                    table.setUseAllDataSourceFields(true);
                    table.setAutoFetchData(true);
                    
                    table.setFields(new ListGridField("name"),
                                    new ListGridField("version"));
                    
                    // configure hover display
                    table.setCanHover(true);
                    table.setShowHover(true);
                    table.setShowHoverComponents(true);
                    
                    // configure row expansion
                    table.setCanExpandRecords(true);
                    table.setExpansionMode(ExpansionMode.DETAILS);
                    
                    
                    // enable filtering
                    table.setShowFilterEditor(true);
                    table.setFilterOnKeypress(true);
                    
                    VLayout layout = new VLayout();
                    layout.addMember(table);
                    
                    layout.draw();
                 }
              }
              Code:
              <DataSource 
              	ID="descriptor"
              	serverConstructor="s.pemble.server.DataDescriptorDS">
              	<fields>
              		<field name="ID" 	  type="number" primaryKey="true"/>
              		<field name="NAME" 	  type="text"   title="Name"/>
              		<field name="VERSION" type="number" title="State"/>
              	</fields>	
              </DataSource>
              Code:
              package s.pemble.server;
              
              import java.util.ArrayList;
              import java.util.HashMap;
              import java.util.List;
              import java.util.Map;
              
              import com.isomorphic.datasource.BasicDataSource;
              import com.isomorphic.datasource.DSRequest;
              import com.isomorphic.datasource.DSResponse;
              
              public class DataDescriptorDS extends BasicDataSource
              {
                 /**
                  * Generated serial version ID
                  */
                 private static final long serialVersionUID = 8753187481010610953L;
                 
                 private static List<Map<String, String>> data = new ArrayList<Map<String, String>>();
                 
                 static
                 {
                    String[] names = { "Blob1", "Blob2", "Blob3", "Image1", "Image2", "Image3" };
                    String[] versions = { "1","2","3","4","5","6"};
                    
                    for(int i=0;i<names.length;i++)
                    {
                       Map<String, String> d = new HashMap<String, String>();
                       d.put("name", names[i]);
                       d.put("version", versions[i]);
                       data.add(d);
                    }
                 }
                 
              
                 public DSResponse executeAdd(DSRequest aRequest) throws Exception
                 {
                    // addition of Descriptors is not implemented
                    return new DSResponse();
                 }
                 
                 public DSResponse executeFetch(DSRequest aRequest) throws Exception
                 {
                    List<Map<String, String>> records = fetchRecords();
                    return new DSResponse(records);  
                 }
              
                 public DSResponse executeRemove(DSRequest aRequest) throws Exception
                 {
                    // removal of Descriptors is not implemented
                    return new DSResponse();
                 }
                 
                 public DSResponse executeUpdate(DSRequest aRequest) throws Exception
                 {
                    // modification of Descriptors is not implemented
                    return new DSResponse();
                 }   
                 
                 private List<Map<String, String>> fetchRecords()   
                 {
                    return data;
                 }
              
              }
              web.xml
              Code:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app
                  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                  "http://java.sun.com/dtd/web-app_2_3.dtd">
              
              <web-app xmlns="http://java.sun.com/xml/ns/javaee" 
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              	     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                                           http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
              	     version="3.0">
              	
              	<!-- Dynamic Compression -->
              	<filter>
              		<filter-name>CompressionFilter</filter-name>
              		<filter-class>com.isomorphic.servlet.CompressionFilter</filter-class>
              	</filter>
              	
              	<!-- CompressionFilter for dynamic compression -->
              	<filter-mapping>
              		<filter-name>CompressionFilter</filter-name>
              		<url-pattern>/*</url-pattern>
              	</filter-mapping>
              
              	<!-- The IDACall servlet handles all Built-in DataSource operations -->
              	<servlet>
              		<servlet-name>IDACall</servlet-name>
              		<servlet-class>com.isomorphic.servlet.IDACall</servlet-class>
              	</servlet>
              
              	<servlet>
              		<servlet-name>DataSourceLoader</servlet-name>
              		<servlet-class>com.isomorphic.servlet.DataSourceLoader</servlet-class>
              	</servlet>  
              
              	<!-- The FileDownload servlet downloads static files, like a webserver -->
              	<servlet>
              		<servlet-name>FileDownload</servlet-name>
              		<servlet-class>com.isomorphic.servlet.FileDownload</servlet-class>
              	</servlet>
              
              	<!-- ISC init: initializes ISC framework -->
              	<servlet>
              		<servlet-name>Init</servlet-name>
              		<servlet-class>com.isomorphic.base.Init</servlet-class>
              		<load-on-startup>1</load-on-startup>
              	</servlet>
              
              	<servlet>
              		<servlet-name>HttpProxy</servlet-name>
              		<servlet-class>com.isomorphic.servlet.HttpProxyServlet</servlet-class>
              	</servlet>
              
              	<!-- The PreCache servlet initializes when the servlet engine starts up 
              		and pre-loads data need for all client requests. This is optional, and improves 
              		performance of the first few page requests. PreCache cannot be invoked by 
              		a browser, because there is no "servlet-mapping" defined for it. -->
              	<servlet>
              		<servlet-name>PreCache</servlet-name>
              		<servlet-class>com.isomorphic.servlet.PreCache</servlet-class>
              		<load-on-startup>2</load-on-startup>
              	</servlet>
              
              	<!-- RPCManager uses this URL by default for Built-in DataSource operations -->
              	<servlet-mapping>
              		<servlet-name>IDACall</servlet-name>
              		<url-pattern>/customdatasource/sc/IDACall</url-pattern>
              	</servlet-mapping>
              
              	<!-- DataSourceLoader requests -->
              	<servlet-mapping>
              		<servlet-name>DataSourceLoader</servlet-name>
              		<url-pattern>/customdatasource/sc/DataSourceLoader</url-pattern>
              	</servlet-mapping>	
              
              	<servlet-mapping>
              		<servlet-name>HttpProxy</servlet-name>
              		<url-pattern>/customdatasource/sc/HttpProxy/*</url-pattern>
              	</servlet-mapping>
              
              	<!-- Use FileDownload servlet to download all static content that's part 
              		of the skin, such as image files, so we can set Expires headers and other 
              		cache control directives. In a production deployment, you'd want to use a 
              		webserver such as Apache to do this. -->
              	<servlet-mapping>
              		<servlet-name>FileDownload</servlet-name>
              		<url-pattern>/customdatasource/sc/skins/*</url-pattern>
              	</servlet-mapping>
              
              	<!-- serve ISC modules compressed, with expires headers -->
              	<servlet-mapping>
              		<servlet-name>FileDownload</servlet-name>
              		<url-pattern>/customdatasource/sc/system/modules/*</url-pattern>
              	</servlet-mapping>
              
              	<!-- serve ISC development modules compressed, with expires headers -->
              	<servlet-mapping>
              		<servlet-name>FileDownload</servlet-name>
              		<url-pattern>/customdatasource/sc/system/development/*</url-pattern>
              	</servlet-mapping>
              
              	<!-- server skin assets with expires headers -->
              	<servlet-mapping>
              		<servlet-name>FileDownload</servlet-name>
              		<url-pattern>/customdatasource/sc/system/reference/skin/*</url-pattern>
              	</servlet-mapping>
              
              	<!-- General config -->
              	<session-config>
              		<session-timeout>30</session-timeout>
              	</session-config>
              
              	<jsp-config>
              		<!-- Isomorphic JSP tags -->
              		<taglib>
              			<taglib-uri>isomorphic</taglib-uri>
              			<taglib-location>/WEB-INF/iscTaglib.xml</taglib-location>
              		</taglib>
              	</jsp-config>
              	
                <!-- Default page to serve -->
                <welcome-file-list>
                  <welcome-file>CustomDataSource.html</welcome-file>
                </welcome-file-list>
              
              </web-app>
              server.properties
              Code:
              # The webRoot directory:
              webRoot: __AUTODETECT__
              
              gwtModuleName: customdatasource
              isomorphicPathRootRelative: $gwtModuleName/sc
              project.datasources: $webRoot/shared/ds
              
              RPCManager.enabledBuiltinMethods: *
              FilesystemDataSource.enabled: true
              Console output -- Firebug had no additional information
              Code:
              Loading modules
                 s.pemble.CustomDataSource
                    Loading inherited module 'com.smartgwt.tools.SmartGwtTools'
                       Loading inherited module 'com.smartgwt.SmartGwtNoSmartClient'
                          [WARN] Setting configuration property named document.compatMode in com.smartgwt.SmartGwtNoSmartClient that has not been previously defined.  This may be disallowed in the future.
              ISC: Configuring log4j from: file:/nethome/spemble/MAR28/CustomDataSource/war/WEB-INF/classes/log4j.isc.config.xml
              === 2012-04-18 17:03:06,791 [main] INFO  ISCInit - Isomorphic SmartClient Framework - Initializing
              === 2012-04-18 17:03:06,796 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
              === 2012-04-18 17:03:06,893 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/nethome/spemble/MAR28/CustomDataSource/war/WEB-INF/lib/isomorphic_core_rpc.jar!/framework.properties
              === 2012-04-18 17:03:06,893 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
              === 2012-04-18 17:03:06,894 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
              === 2012-04-18 17:03:06,898 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/nethome/spemble/MAR28/CustomDataSource/war/WEB-INF/lib/isomorphic_core_rpc.jar!/isc_interfaces.properties
              === 2012-04-18 17:03:06,898 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
              === 2012-04-18 17:03:06,900 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/nethome/spemble/MAR28/CustomDataSource/war/WEB-INF/classes/server.properties
              === 2012-04-18 17:03:06,905 [main] INFO  Logger - Logging system started.
              === 2012-04-18 17:03:06,906 [main] INFO  ISCInit - Isomorphic SmartClient Framework (v8.2p_2012-03-27/EVAL Deployment 2012-03-27) - Initialization Complete
              === 2012-04-18 17:03:06,908 [main] INFO  ISCInit - Auto-detected webRoot - using: /nethome/spemble/MAR28/CustomDataSource/war
              log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext).
              log4j:WARN Please initialize the log4j system properly.
              === 2012-04-18 17:03:07,119 [main] INFO  PreCache - Isomorphic PreCache servlet loading
              === 2012-04-18 17:03:07,131 [main] INFO  PoolManager - SmartClient pooling disabled for 'DataSource' objects
              === 2012-04-18 17:03:07,160 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/builtinTypes.xml: 6ms
              === 2012-04-18 17:03:07,237 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/DataSource.ds.xml: 4ms
              === 2012-04-18 17:03:07,300 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/DataSourceField.ds.xml: 5ms
              === 2012-04-18 17:03:07,337 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/Validator.ds.xml: 2ms
              === 2012-04-18 17:03:07,361 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/ValueMap.ds.xml: 1ms
              === 2012-04-18 17:03:07,367 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/InstantDataApp.ds.xml: 4ms
              === 2012-04-18 17:03:07,398 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/Application.ds.xml: 1ms
              === 2012-04-18 17:03:07,404 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/IDAPage.ds.xml: 1ms
              === 2012-04-18 17:03:07,410 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/IDAUserType.ds.xml: 1ms
              === 2012-04-18 17:03:07,419 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/IDAOperation.ds.xml: 2ms
              === 2012-04-18 17:03:07,443 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/Canvas.ds.xml: 13ms
              === 2012-04-18 17:03:07,487 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/MethodDeclaration.ds.xml: 2ms
              === 2012-04-18 17:03:07,496 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/Img.ds.xml: 2ms
              === 2012-04-18 17:03:07,504 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/StatefulCanvas.ds.xml: 3ms
              === 2012-04-18 17:03:07,521 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/Button.ds.xml: 2ms
              === 2012-04-18 17:03:07,529 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/ListViewer.ds.xml: 1ms
              === 2012-04-18 17:03:07,543 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/ListGrid.ds.xml: 11ms
              === 2012-04-18 17:03:07,579 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/DynamicForm.ds.xml: 5ms
              === 2012-04-18 17:03:07,603 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/FormItem.ds.xml: 8ms
              === 2012-04-18 17:03:07,627 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/DetailViewer.ds.xml: 4ms
              === 2012-04-18 17:03:07,637 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/DetailViewerField.ds.xml: 2ms
              === 2012-04-18 17:03:07,644 [main] DEBUG XML - Parsed XML from /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/system/schema/isomorphicXML.ds.xml: 2ms
              === 2012-04-18 17:03:07,646 [main] INFO  PreCache - Isomorphic PreCache complete (527ms)
              === 2012-04-18 17:03:47,133 [l0-0] INFO  RequestContext - URL: '/customdatasource/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23': Moz (Gecko) with Accept-Encoding header
              === 2012-04-18 17:03:47,141 [l0-0] ERROR DataSourceLoader - Exception while attempting to load a DataSource
              javax.servlet.jsp.JspException: Unable to load DataSource for ID: descriptor
              	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:111)
              	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:83)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.Server.handle(Server.java:324)
              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
              	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
              === 2012-04-18 17:03:47,141 [l0-0] ERROR DataSourceLoader - Top-level servlet error: 
              javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to load DataSource for ID: descriptor
              	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:111)
              	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:83)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.Server.handle(Server.java:324)
              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
              	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
              
              	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:124)
              	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:83)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.Server.handle(Server.java:324)
              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
              	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
              === 2012-04-18 17:03:47,144 [l0-0] INFO  Compression - /customdatasource/sc/DataSourceLoader: 3978 -> 610 bytes
              === 2012-04-18 17:03:47,154 [l0-0] INFO  Download - Returning 304: Not modified on conditional get of: /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/skins/Enterprise/load_skin.js
              === 2012-04-18 17:03:47,183 [l0-2] INFO  Compression - /customdatasource/sc/modules/ISC_Core.js: 711161 -> 184279 bytes
              === 2012-04-18 17:04:06,239 [l0-2] INFO  RequestContext - URL: '/favicon.ico', User-Agent: 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23': Moz (Gecko) with Accept-Encoding header
              === 2012-04-18 17:04:11,503 [l0-2] INFO  Compression - /customdatasource/customdatasource.nocache.js: 7340 -> 2812 bytes
              === 2012-04-18 17:04:11,504 [l0-0] INFO  RequestContext - URL: '/customdatasource/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23': Moz (Gecko) with Accept-Encoding header
              === 2012-04-18 17:04:11,504 [l0-0] ERROR DataSourceLoader - Exception while attempting to load a DataSource
              javax.servlet.jsp.JspException: Unable to load DataSource for ID: descriptor
              	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:111)
              	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:83)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.Server.handle(Server.java:324)
              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
              	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
              === 2012-04-18 17:04:11,505 [l0-0] ERROR DataSourceLoader - Top-level servlet error: 
              javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to load DataSource for ID: descriptor
              	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:111)
              	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:83)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.Server.handle(Server.java:324)
              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
              	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
              
              	at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:124)
              	at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:83)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
              	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
              	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
              	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
              	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
              	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
              	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
              	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
              	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              	at org.mortbay.jetty.Server.handle(Server.java:324)
              	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
              	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
              	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
              	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
              	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
              	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
              	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
              === 2012-04-18 17:04:11,506 [l0-0] INFO  Compression - /customdatasource/sc/DataSourceLoader: 3978 -> 610 bytes
              === 2012-04-18 17:04:11,545 [l0-7] INFO  Download - Returning 304: Not modified on conditional get of: /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/skins/Enterprise/load_skin.js
              === 2012-04-18 17:04:11,567 [l0-0] INFO  Compression - /customdatasource/sc/modules/ISC_Core.js: 711161 -> 184279 bytes
              === 2012-04-18 17:04:12,591 [l0-0] INFO  Download - Returning 304: Not modified on conditional get of: /nethome/spemble/MAR28/CustomDataSource/war/customdatasource/sc/skins/Enterprise/skin_styles.css
              === 2012-04-18 17:04:14,987 [l0-0] INFO  RequestContext - URL: '/favicon.ico', User-Agent: 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23': Moz (Gecko) with Accept-Encoding header

              Comment


                #8
                When you see a big exception in your server log, that's what to post :)

                Here's the problem:

                Code:
                ISC: Configuring log4j from: file:/nethome/spemble/MAR28/CustomDataSource/war/WEB-INF/classes/log4j.isc.config.xm
                You've got all your files in a directory called "CustomDataSource" but in server.properties you've set the directory as "customdatasource".

                Comment


                  #9
                  Are you sure??? The name of mt project folder has never entered into SmartGWT code configuration up until now, and the gwt.xml states
                  Code:
                  <module rename-to="customdatasource">
                  which agrees with the server properties
                  Code:
                  gwtModuleName: customdatasource

                  Comment


                    #10
                    Sorry, that directory is not actually the problem, you have a funky path setup of "CustomDataSource/war/customdatasource/" which looked wrong but should be OK.

                    With your settings, your DataSource file should be at

                    Code:
                    file:/nethome/spemble/MAR28/CustomDataSource/war/shared/ds/descriptor.ds.xml
                    .. is that where it is?

                    If so, try removing your static initializer temporarily. If that's crashing, the JVM's error reporting is often terrible.

                    Comment


                      #11
                      Removing the static data initialization had no effect on the error.

                      Comment


                        #12
                        Is the file at the indicated path?

                        Is it readable? It looks like you're using a network file server so perhaps the file is not owned by you?

                        Comment


                          #13
                          The path to the datasource descriptor is correct; the file is owned by me, created by me and readable.

                          Comment


                            #14
                            Has someone (possibly another developer) use DataSource.addDynamicDSGenerator() to add a generator? Maybe this is broken - try removing it.

                            Comment


                              #15
                              I'm the only SWE on this project, so no, no one has used DataSource.addDynamicDSGenerator -- the only place I can find this is deep inside Isomorphic-generated XML. How do I go about removing that?

                              Comment

                              Working...
                              X