-1

I'm working on a project which is built on GWT. When we deployed the project on centOS 6.9 version it works fine and all the content is accessible or visible. However, when we changed the OS version to centOS7.5. It deployed successfully but upon accessing the index page it only shows waiting gif and then unable to load the java content. Some of my observations during inspect element are as follow.

CentOS7.5

enter image description here

In centOS7.5 the content div is empty. I've no clue why the content isn't rendering by GWT. Didn't see any exception or stack trace in tomcat logs. I've also updates the dependency version in pom.xml but still getting the same results.

CentOS6.9 enter image description here

Also I've observed the difference source hierarchy. Same rpm is installed on both servers. CentOS7.5 doesn't showing the top_banner.jpg and /image directory.

enter image description here

The pom.xml is as follow, whereas the gwt.version = 2.9.0

<dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-dev</artifactId>
        <version>${gwt.version}</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <version>${gwt.version}</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <version>${gwt.version}</version>
        <scope>provided</scope>
    </dependency>

Application.gwt.xml

<!DOCTYPE module PUBLIC "//gwt-module/" "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="agentportal">

    <add-linker name="xsiframe" />
    <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE' />

    <!-- Dependencies -->
    <inherits name='com.google.gwt.user.User' />
    <inherits name='com.seamless.gwt.components.Module' />
    <inherits name='org.puremvc.PureMVC_Java_MultiCore' />
    <inherits name='com.seamless.common.GWTModule' />
    <inherits name='com.seamless.ers.interfaces.ersifcommon.GWTModule' />
    <inherits name='com.seamless.ers.interfaces.ersifclient.GWTModule' />
    <!-- ers-supportsystem-client-transport-ws -->
    <inherits name="com.seamless.ers.components.supportsystem.interfaces.GWTModule"/> 
    <!-- ers-supportsystem-client -->
    <inherits name="com.seamless.ers.interfaces.platform.clients.transaction.GWTModule"/>

    <!-- ers-txe-client-model -->
    <inherits name='com.seamless.ers.interfaces.platform.clients.GWTModule' />
    
    <!-- Enable Debug IDs -->
    <inherits name="com.google.gwt.user.Debug"/>
    <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />
    
    <extend-property name="log_level" values="DEBUG,WARN" />
    
    <!-- Disable DIV logger -->
     <set-property name="log_DivLogger" value="DISABLED" />


    <!--  What languages should be supported? -->
    <extend-property name="locale" values="en" />
    <extend-property name="locale" values="fr"/>
    <extend-property name="locale" values="ar"/>


    <inherits name='com.google.gwt.user.theme.chrome.Chrome' />


    <entry-point class='com.seamless.ers.client.agentPortal.client.Application' />

    <source path="client">
            <exclude name="**/tests/*" />
    </source>

    <stylesheet src='Application.css' />

    <servlet
        class="com.seamless.ers.client.agentPortal.server.AgentPortalServiceImpl"
        path="/agentportal_service" />
    <servlet path="/sessionService" class="com.seamless.ers.client.agentPortal.server.SessionServiceImpl"/>

</module>

Side by side difference of deployments on both servers

enter image description here

In the above image, I can clearly see that there is a different in /WEB-INF. The classes and the deploy directory is almost empty. Along with other marked

Can someone please guide me what I'm missing here and what's the root cause of this issue and why it's occurring on centOS7.5.

M A.
  • 949
  • 2
  • 12
  • 29
  • You say "same RPM installed on both servers". What is the RPM of? – Robert Newton Jun 16 '21 at 00:05
  • @RobNewton thanks for the response, RPM contains the war file. basically it's the whole web application. – M A. Jun 16 '21 at 04:35
  • does the rpm copy your WAR file, (e.g. myapp.war) into the tomcat '.../webapps/' directory, and Tomcat unpacks it for you. Or does the rpm install copy the unpacked web app directory into the tomcat '.../webapps/' directory? – Robert Newton Jun 16 '21 at 04:52
  • both the .war file and the unpacked directory exists in /www/webapps/. I've added another comment under your answer. it only fails for scenario iii) – M A. Jun 16 '21 at 04:57
  • **DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question. [ask] – Rob Jun 20 '21 at 09:56
  • The underlying Centos version should not matter. And I assume you are running Tomcat 9 on both hosts. Perhaps Tomcat is not configured the same on both hosts? Or you have not deployed the same WAR file for your webapp on both hosts? – Robert Newton Jun 16 '21 at 00:11
  • I've further investigated this issue and we've three different scenarios. i) centos7 with tomcat 7 and it works fine. ii) centos6 with tomcat 9 and it works fine. The third one we're facing issue. iii) centos7 with tomcat 9 and it doesn't work. What I believe, there might be some privileges issues or might some changes in war deployment with centos7 – M A. Jun 16 '21 at 04:37
  • if you put the war file in the webapps directory, and tomcat unpacks it, then all files will have the ownership of the tomcat process – Robert Newton Jun 16 '21 at 05:10
  • I've edited the post and add the tomcat directory structure. – M A. Jun 16 '21 at 05:11
  • OK. The WEB-INF directory contains all the "server-side" servlet/container java stuff. Even if that has stuff missing, the "client-side" GWT part (javascript, etc), in the 'agentportal' directory should still be served to the browser. But from what you say, even that has missing stuff? – Robert Newton Jun 16 '21 at 05:19
  • the login pages show but empty and when I inspect element. it shows the html as mentioned in the first image. but the `content
    ` is empty because that content in written in java and GWT transform those content in (javascript, HTML etc). and I believe this is because of the empty directories in `WEB-INF\classes\`
    – M A. Jun 16 '21 at 05:27
  • I agree. But why files are missing from the WAR??? That is indeed strange – Robert Newton Jun 16 '21 at 06:34
  • that's what I'm investigating, what tomcat configuration I'm missing. – M A. Jun 16 '21 at 06:38
  • @Rob Okay, So now you want to create the whole directory structure by copying the text or type it ? – M A. Jun 21 '21 at 10:03
  • I want you to copy your code and data output to text as stated in the rule linked to. – Rob Jun 21 '21 at 10:07

1 Answers1

1

I was facing the same issue against GWT. The issue is at parser level of GWT. I had "_" as variable in my Screen.java class which extended com.google.gwt.user.client.ui:Composite

Upon renaming the variable name and refactoring the code the screen loaded for me. Please try doing it this way.