Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Issue on SmartGWT 4.1d + Spring: no response at server side

$
0
0
Dear all,

I use SmartGWT 4.1d Power Edition + Spring 3.0.5.RELEASE
Firefox 17.0.4

I try to migrate a existing application from SmartGWT 3.1 to 4.1d, when I try the case that client fetch data through DMI to Spring server service, I found 3.1 work normal but when I change to 4.1 library, it's not work

Symptom is as following
1. find http request from client side as following to server side from browser sniffer
<http://localhost:8080/testapp/ds/Account.ds.xml?isc_rpc=1&isc_v=SNAPSHOT_v9.1d_2013-11-24&isc_xhr=1>
2. cannot found any log in server side console and the Spring service cannot invoke

3. When I change the version from 4.1 to 3.1, I find it all work normally that the fetch can fire the server side and get back the data to client side

I have no change on the Spring version and any config for 3.1 test and 4.1 test but only the version # of of smartgwt lib in pom.xml
Is there any special steps if we want to migrate the application if SmartGWT upgrade from 3.1 to 4.1?



Some more finding that for 3.1 that I found it is work, we found the URL call from client to server is as following
http://localhost:8080/gwt-showcase/s...0-04&isc_xhr=1

But after I update the SmartGWT to 4.1, for same application code, same config, and same function call, it become
http://localhost:8080/gwt-showcase/d...1-24&isc_xhr=1


It's seem to be the error that when we call "ds/Account.ds.xml" and it cannot intercept the request and redirect the request to the Spring Bean, following is the ds.xml content

Code:

<DataSource
    ID="Account"
    serverType="generic"
>

    <fields>
        <field name="accountNo" type="text" title="Account No." length="6" required="true" primaryKey="true"/>
        <field name="accountType" type="text" title="Account Type" length="25" required="true">
            <valueMap>
                <value ID="I">Individual</value>
                <value ID="C">Corporate</value>
            </valueMap>
        </field>
        <field name="firstName" type="text" title="First Name" length="100" required="true"/>
        <field name="lastName" type="text" title="Last Name" length="40"/>
    </fields>

    <serverObject lookupStyle="spring" bean="accountServer"/>   
</DataSource>

And following is the web.xml
Code:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <!-- standard spring configuration -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
 
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener> 

    <!-- The IDACall servlet handles all Built-in DataSource operations -->
    <servlet>
        <servlet-name>IDACall</servlet-name>
        <servlet-class>com.isomorphic.servlet.IDACall</servlet-class>
    </servlet>

    <!-- The DataSourceLoader servlet returns Javascript representations of the dataSources whose
        ID's are passed to it - it is an alternative to using the <loadDS> JSP tag -->
    <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>/showcase/sc/IDACall/*</url-pattern>
    </servlet-mapping>

    <!-- Built-in DataSource operations backcompat -->
    <servlet-mapping>
        <servlet-name>IDACall</servlet-name>
        <url-pattern>/showcase/sc/IDACall.aspx/*</url-pattern>
    </servlet-mapping>

    <!-- DataSourceLoader requests -->
    <servlet-mapping>
        <servlet-name>DataSourceLoader</servlet-name>
        <url-pattern>/showcase/sc/DataSourceLoader</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>HttpProxy</servlet-name>
        <url-pattern>/showcase/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>/showcase/sc/skins/*</url-pattern>
    </servlet-mapping>

    <!-- serve ISC modules compressed, with expires headers -->
    <servlet-mapping>
        <servlet-name>FileDownload</servlet-name>
        <url-pattern>/showcase/sc/system/modules/*</url-pattern>
    </servlet-mapping>

    <!-- serve ISC development modules compressed, with expires headers -->
    <servlet-mapping>
        <servlet-name>FileDownload</servlet-name>
        <url-pattern>/showcase/sc/system/development/*</url-pattern>
    </servlet-mapping>

    <!-- server skin assets with expires headers -->
    <servlet-mapping>
        <servlet-name>FileDownload</servlet-name>
        <url-pattern>/showcase/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>

    <mime-mapping>
        <extension>manifest</extension>
        <mime-type>text/cache-manifest</mime-type>
    </mime-mapping>

        <!-- Default page to serve -->
        <welcome-file-list>
                <welcome-file>ShowCase.html</welcome-file>
        </welcome-file-list>

</web-app>



What's missing in config for SmartGWT 4.1 case?

Viewing all articles
Browse latest Browse all 4756

Trending Articles