GWT content not showing on centOS 7.5 - gwt

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
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
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.
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
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.

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.

Related

GWT Error: There is '1' error in 'gwt-module.dtd'

I am learning GWT and was trying to run this tutorial by Vogella
Using the Eclipse GWT plugin 3.0 on Windows 10 and JDK 11
I get this error on the first line Error: There is '1' error in 'gwt-module.dtd'.
/de.vogella.gwt.helloworld/src/de/vogella/gwt/helloworld/De_vogella_gwt_helloworld.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.1//EN"
"http://gwtproject.org/doctype/2.8.1/gwt-module.dtd">
<module rename-to='de_vogella_gwt_helloworld'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='de.vogella.gwt.helloworld.client.De_vogella_gwt_helloworld'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<!-- allow Super Dev Mode -->
<add-linker name="xsiframe"/>
</module>
I get the same error even from the official GWT tutorial http://www.gwtproject.org/doc/latest/tutorial/index.html
From this post, I found that the dtd generated is wrong.
"http://gwtproject.org/doctype/2.8.1/gwt-module.dtd"
I corrected it to
"http://www.gwtproject.org/doctype/2.8.1/gwt-module.dtd"
and the error went away!

Class 'java.io.' is not present in JRE Emulation library INTELLIJ IDEA

I am working on a GWT project in IntelliJ IDEA 15.0.4. This project compileds and runs. But IntelliJ keeps telling me that java class files are not present in JRE Emulation Library.
Please help me! Is there something missing in my maven pom.xml?
Here are the error messages:
My pom.xml:
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable>/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/javac</executable>
<compilerVersion>1.8</compilerVersion>
</configuration>
</plugin>
Here are my IntelliJ project config:
Timesheet.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='Timesheet'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name="com.vaadin.polymer.Elements"/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='com.campus.client.Timesheet' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- <inherits name="com.google.gwt.user.theme.standard.Standard"/> -->
<inherits name="com.google.gwt.user.theme.clean.Clean"/>
<!-- For production, most teams prefer to set the default log level to `OFF` -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-OFF" />
<!-- For development, a default of `DEBUG` is recommended -->
<!-- <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" /> -->
</module>
Unless you have the full version of IntelliJ I would strongly suggest you to use Eclipse + GWT Plugin for GWT development.
This is the reference for GWT Jre emulated class, all that is in here will work on the client side:
http://www.gwtproject.org/doc/latest/RefJreEmulation.html#Package_java_io
In your particular case seems like IntelliJ cannot find the String class either, that points out to a deeper configuration issue than a GWT related one.
I seemed to have this problem when I installed Oracle JDK 9 in Arch Linux and used that as the project SDK. After I uninstalled Oracle JDK 9 and installed OpenJDK 8, and set that as the project SDK, no errors occurred anymore. I wonder if either Java 9 or Oracle JDK is just not very nicely supported by GWT.
Another possible cause of error is that maybe I set up the SDK incorrectly. First I pointed the SDK path to /usr/lib/jvm/default-runtime, but later I changed it to the actual path (/usr/lib/jvm/java-8-openjdk).
This will help you solve your issue.. I had same issue and tried to add the dependencies..
<gwt.version>2.7.0</gwt.version>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>

GWT starter project doesn't work when inherit smartGWT is added

I'm brand new to GWT and am trying to use SmartGWT. I got GWT setup and created a new project. The starter project that's supplied with the new project works fine, but once I add the smartGWT jars and inherit the smartGWT tools in my .gwt.xml file the module doesn't load.
My .gwt.xml file looks like this now:
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
"http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='whydoyouhateme'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<inherits name= 'com.smartgwt.tools.SmartGwtTools' />
<!-- Specify the app entry point class. -->
<entry-point class='com.lmco.client.WhyDoYouHateMe'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<!-- allow Super Dev Mode -->
<add-linker name="xsiframe"/>
</module>
Is this normal?
Inherit tag for SmartGWT jar will be like this,try this
<inherits name="com.smartgwt.SmartGwt"/>

gwt.xml error: Content of element type module must match

I have a small GWT java program that has been running on google apps engine for about a year now. I recently made some changes to it, and then before I could deploy it had to update the JRE to 7.1. Once I did that, I am getting the following error on my gwt.xml file:
The content of element type "module" must match "(inherits|source|public|super-source|entry-point|stylesheet|script|servlet|replace-with|
generate-with|define-property|extend-property|set-property|set-property-fallback|clear-configuration-property|define-configuration-
property|extend-configuration-property|set-configuration-property|property-provider|define-linker|add-linker|collapse-all-properties|collapse-property)*".
I found this question which explained to me what the error meant, and I saw that my source elements were after my entry point element. I moved them around to match the order in the error message, but the error persists. Any thoughts?
Here is my gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='helpdesktest'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.xml.XML'/>
<inherits name='com.google.gwt.logging.Logging'/>
<inherits name='com.google.gwt.http.HTTP'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<!-- Specify the app entry point class. -->
<entry-point class='com.google.gwt.HelpDeskTest.client.HelpDeskTest'/>
<!-- Set logging parameters -->
<set-property name="gwt.logging.logLevel" value="SEVERE"/> #change default log level
<set-property name="gwt.logging.enabled" value="FALSE"/> #set to FALSE to disable logging
<set-property name="gwt.logging.consoleHandler" value="DISABLED"/> #to disable set to DISABLED
<set-property name="gwt.logging.popupHandler" value="DISABLED"/>
<set-property name="gwt.logging.developmentModeHandler" value="DISABLED"/>
</module>
<module> doesn't accept text content, yet you have those #change default log level bits in your file.
Convert them to XML comments (<!-- change default log leve -->) or remove them.
BTW, the order of the elements doesn't matter wrt XML validation (it matters in what they mean though; some things sometimes have to be processed for others because one overrides the other)

How To Find Root Cause for GWT Permutations

I have rather large GWT project that depends on a number of third party libraries. When compiling the GWT part of the application, I see that the GWT compiler goes through 10 permutations. But I'm only compiling for 5 different browsers, and for one locale. How can I figure out what is causing the each permutation? Is there some setting I can enable that prints out what each permutation is for when it is compiled. Something that would give me output like:
Compiling Permutation 0 - Browser ie8 and Locale En ....
Compiling Permutation 1 - Browser ie9 and Locale En ....
My gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.0//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='LibraryPlace'>
<inherits name="com.github.gwtbootstrap.BootstrapNoResources"/>
<inherits name='com.biglibrary.libraryplace.model.LibraryModel'/>
<inherits name="com.biglibrary.common.LiCommon"/>
<inherits name="org.atmosphere.gwt20.AtmosphereGwt20"/>
<inherits name='com.google.web.bindery.event.EventBinder'/>
<inherits name="com.google.gwt.logging.Logging"/>
<stylesheet src="/css/datepicker.css"/>
<!-- LATO font -->
<!--<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic">-->
<!-- Bootstrap CSS -->
<stylesheet src="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic"/>
<!--<stylesheet src="/css/bootstrap.css"/>
<stylesheet src="/css/bootstrap-responsive.css"/>-->
<stylesheet src="/css/toastr.css"/>
<stylesheet src="/css/fullcalendar.css"/>
<!-- Library Place New Custom CSS based on MyAdmin Theme Custom CSS -->
<stylesheet src="/css/style.css"/>
<stylesheet src="/css/clock/clock-style.css"/>
<source path='resources'/>
<replace-with class="com.biglibrary.libraryplace.resources.LibraryConfigurator">
<when-type-is class="com.github.gwtbootstrap.client.ui.config.Configurator"/>
</replace-with>
<public path="resources">
<exclude name="** /*.java"/>
<exclude name="** /*.class"/>
</public>
<!-- Other module inherits-->
<inherits name="de.devbliss.gwt.xdm.XDM"/>
<inherits name="com.watopi.chosen.Chosen"/>
<!-- enable #CORS annotations in restygwt -->
<extend-configuration-property
name="org.fusesource.restygwt.annotationresolver"
value="org.fusesource.restygwt.rebind.CORSAnnotationResolver"/>
<replace-with class="de.devbliss.gwt.xdm.client.impl.CORSTransportLayer">
<when-type-is class="com.biglibrary.libraryplace.client.xdr.XDRTransportLayer"/>
<any>
<when-property-is name="user.agent"
value="gecko1_8"/>
<when-property-is name="user.agent"
value="safari"/>
</any>
</replace-with>
<inherits name="com.google.gwt.logging.Logging"/>
<!-- gwt logging properties -->
<set-property name="gwt.logging.logLevel"
value="FINE"/>
<set-property name="gwt.logging.popupHandler"
value="ENABLED">
<any>
<when-property-is name="user.agent"
value="ie8"/>
<when-property-is name="user.agent"
value="ie9"/>
</any>
</set-property>
<!--Gives java like stack trace for errors that come up in js-->
<set-property name="compiler.emulatedStack"
value="true"/>
<set-configuration-property
name="compiler.emulatedStack.recordFileNames"
value="true"/>
<!-- Specify the app entry point class. -->
<entry-point class='com.biglibrary.libraryplace.client.LibraryPlace'/>
<!--Chrome or Safari-->
<set-property name="user.agent" value="opera,ie8, gecko1_8, safari, ie9"/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<define-configuration-property name="gin.ginjector"
is-multi-valued="false"/>
<set-configuration-property name="gin.ginjector"
value="com.biglibrary.libraryplace.client.gin.AppGinjector"/>
<!--
Ensure Ui Binder files are using Safe HTML to prevent XSS.
-->
<set-configuration-property name="UiBinder.useSafeHtmlTemplates"
value="true"/>
<!-- English language, independent of country. -->
<extend-property name="locale"
values="en"/>
<!-- Default language (English) -->
<set-property-fallback name="locale"
value="en"/>
<add-linker name="xsiframe"/>
<set-configuration-property name="gwt.superdevmode"
value="on"/>
<set-configuration-property name="devModeRedirectEnabled"
value="true"/>
<set-property name="compiler.useSourceMaps"
value="true"/>
</module>
As you are compiling your project using the xsiframe linker you will have a compilation-mappings.txt file in your javascript folder.
It contains a very useful list with all permutations and the properties which triggers each one.
F7437BC8947642CC76A8E491E7E52DB4.cache.js
mgwt.os desktop
user.agent safari
F7437BC8947642CC76A8E491E7E52DB4.cache.js
mgwt.os desktop
user.agent gecko1_8
[...]
Once you know which properties produce each permutation, you can dive into *.gwt.xml files to know which properties are increasing the permutation number.
In your case, if you are using just en language, it is better not set it at all, so as gwt will compile only default, otherwise it is compiling default and en languages.
Another useful option for reducing permutations is to use the collapse-property feature.
<collapse-property name="language" values="*" />
My guess is that it's compiling 5xfor english and 5xfor the default locale (which happens to be English as well).
Thomas Broyer's comment led me to discover that GWT can make a compile report:
http://www.gwtproject.org/doc/latest/DevGuideCompileReport.html
It gave me a nice print out of why each permutation was being created. Thanks!