GWT compilation failed in eclipse - java

guys i am trying to make small app using gxt but it gives me GWT compilation failed and then [ERROR] Line 96: Value 'ie6' in not a valid value for property 'user.agent' appears in the console
here is my code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD GWT 2.7.0//EN"
"http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='gxt_project'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' />
<set-property name="user.agent" value="safari" />
<!-- GXT stylesheet -->
<stylesheet src="reset.css" />
<!-- Specify the app entry point class. -->
<entry-point class='com.sencha.gxt.project.client.GXT_Project' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>
and
public class GXT_Project implements EntryPoint {
#Override
public void onModuleLoad() {
TextButton textButton = new TextButton("Verify GXT Works");
RootPanel.get().add(textButton);
textButton.addSelectHandler(new SelectHandler() {
#Override
public void onSelect(SelectEvent event) {
MessageBox messageBox = new MessageBox("GXT Works.");
messageBox.show();
}
});
}
}
also here is the project trace
project trace
any help would be appreciated .. thanks a lot

GWT 2.7.0 does not support ie6, but GXT 3.0.1 uses it in itself .gwt.xml (com/sencha/gxt/core/Core.gwt.xml etc).
You should upgrade GXT version or downgrade GWT version.
See Also: GXT 4.0 Guides | GWT and GXT Versions

Related

vaadin superdevmode can't find custom widget classes

I'm trying to debug a Vaadin custom widgetset using superdevmode. In "normal" mode the custom widget shows up correctly in the browser. When using superdevmode though, it shows the following text instead of the custom widget:
Widgetset xxx does not contain implementation for yyy
Tried all the usual things such as recompile from command line, restart superdevmode server, to no avail.
The weird thing is that the class in the error message (yyy above) is a server side class, used in the client side code only in #Connect(yyy.class), in the client side Connector. Obviously compiled widgetsets do not contain server side classes. So why would it complain about this class?
Also the fact that it works in normal mode makes me wonder what can be wrong. Many similar questions throughout the forums are unanswered. Any help would be appreciated.
Using Vaadin 7.6.6
Contents of widgetset.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module>
<set-configuration-property name="devModeRedirectEnabled" value="true" />
<add-linker name="xsiframe" />
<inherits name="com.vaadin.DefaultWidgetSet" />
<inherits name="..." />
<source path='client' />
<source path='shared' />
<stylesheet src="resetbuttonfortextfield/styles.css" />
</module>
Solved it eventually by adding -src ${project_loc}/src/main/java to my superdevmode run configuration. Beats me why it wasn't able to figure that for itself.

vaadin 7: Widgetset does not contain implementation of my custom widget

I'm using vaadin 7.5.6 to create a custom GWT widget and use it in my application, but when I run it, my custom component is not shown and I get the message "Widgetset does not contain an implementation for ...".
I know there are several questions related to the same issue but I've already tried all the "solutions" like:
Re-compile the widgetset
Clear all caches from Ivy
Clean the project
Check the annotation #VaadinServletConfiguration, which already contains widgetset = "com.example.myapp.widgetset.MyAppWidgetset")
But nothing works... Any suggestions of what might be the problem?
To create the widget I followed the instructions given in Vaadin's Wiki.
My widgetset looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Uncomment the following to compile the widgetset for one browser only.
Multiple browsers can be specified as a comma separated list. The
supported user agents at the moment of writing were:
ie8,ie9,gecko1_8,safari,opera
The value gecko1_8 is used for Firefox and safari is used for webkit
based browsers including Google Chrome.
-->
<!-- <set-property name="user.agent" value="safari"/> -->
<!--
To enable SuperDevMode, uncomment this line.
See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more
information and instructions.
-->
<!-- <set-configuration-property name="devModeRedirectEnabled" value="true" /> -->
<inherits name="com.lexaden.business.chart.widgetset.OrganisationWidgetset" />
<inherits name="com.vaadin.addon.touchkit.gwt.TouchKitWidgetSet" />
<inherits name="org.vaadin.alump.beforeunload.gwt.BeforeUnloadWidgetSet" />
<inherits name="com.example.fieldcustomcomponents.FieldcustomcomponentsWidgetset" />
Thanks in advance,
Matías

Not able to run Gxt 3.1.1 application after upgrading from 3.0.0

I have tried upgrading my projects GWT and Gxt from 2.5.1,3.0.0 to 2.7,3.1.1 . I was able to build the project successfully with some workarounds but am not able to run it. Error I am getting is :
Loading inherited module 'com.ApplicationShellModule'
Loading inherited module 'com.sencha.gxt.ui.GXT'
Loading inherited module 'com.sencha.gxt.data.Data'
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] Line 96: Value 'ie6' in not a valid value for property 'user.agent'
I am trying to find the cause in applicationShellModule.gxt.xml which is my gxt configuration which is as follows near line 96:
<property-provider name="gxt.user.agent">
<![CDATA[
{window.alert("inside user agent gxt");
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('trident') != -1) {
if (11 == document.documentMode) return 'gecko1_9';
return 'ie8';
}
if (ua.indexOf('msie') != -1) {
return 'ie8';
}
return 'chrome';
} ]]>
</property-provider>
<property-provider name="user.agent">
<![CDATA[
{ window.alert("inside user agent");
return 'ie8';
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('trident') != -1) {
if (11 == document.documentMode) return 'gecko1_8';
return 'ie8';
}
if (ua.indexOf('msie') != -1) {
return 'ie8';
}
return 'safari';
} ]]>
</property-provider>
<property-provider name="user.agent.os">
<![CDATA[
{window.alert("inside user agent os");
return 'windows';
} ]]>
</property-provider>
<!-- Supported Browsers -->
<!-- uncomment this for dev after upgrade
<set-property name="gxt.user.agent" value="chrome, ie8, gecko1_9" />
<set-property name="user.agent.os" value="windows" />
<extend-property name="locale" values="en,es,ko,pt,ru,fr,hu,pl,zh_CN,zh_TW,tr,uk"/>
<set-property-fallback name="locale" value="en" />
<collapse-property name="locale" values="en, default" />
-->
<!-- changes for upgrade gwt -->
<set-property name="user.agent" value="ie8,ie9,opera,gecko1_8,safari" />
<set-property name="gxt.user.agent" value="ie8" />
<set-property name="user.agent.os" value="windows" />
<extend-property name="locale" values="en" />
<set-property-fallback name="locale" value="en" />
<collapse-property name="locale" values="en" />
<collapse-all-properties />
<set-configuration-property name="CssResource.obfuscationPrefix"
value="empty" />
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-property name="compiler.useSourceMaps" value="true"/>
<!-- upgrade changes over check last line setting to false below revert it to original-->
I have set the user agent manually here as can be seen to a list of browsers but not ie6 which is coming under the error. I have searched for the string 'ie6' but nowhere I am getting the actual reason for this error. Please help me get out of the issue.
Loading inherited module 'com.sencha.gxt.core.Core'
[ERROR] Line 96: Value 'ie6' in not a valid value for property 'user.agent'
If you are seeing this, you have at least one copy of GXT 3.0 still on your classpath - the Core.gwt.xml in 3.1.1 has a blank line on 96.
As El Hoss mentions in the comments, GWT 2.7 dropped support for IE6, and to be compatible, GXT 3.1 did the same. If you are seeing references to IE6, you either have customizations in your own project that use IE6, or are not actually using the correct versions of GWT or GXT.
There are some properties which are being set in the GWT and GXT jars like
Ex :- user.agent - for GWT lesser than 2.6.0 - they support ie6
:- user.agent - for GWT greater than 2.6.0 - they do not support ie6
So you will get compilation error if you have different versions of GWT and GXT.
Even if you find a work around - it may fail later when you use the different widgets of GWT and GXT. So it is better to change the version earlier.
If youe Base GWT version is lesser than 2.6.0 - then you need GXT jar version lesser than 3.0.1
If you base GWT version greater than or equal to 2.6.0 then you need to add GXT jar version 3.1.X

Gwt 2.7 logging dosn't work. Tested with java.util.logging

I've started a new GWT 2.7 project, and I am trying to set up logging, but I can't make it work.
I've followed these instructions:
GWT 2.7 Logging Is Not Working
https://groups.google.com/forum/#!topic/google-web-toolkit-contributors/Tqu5Zw5H-II
http://www.gwtproject.org/doc/latest/DevGuideLogging.html
But nothing helped.
Here is my module conf:
<?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='derp'>
<inherits name="com.google.gwt.logging.Logging"/>
<set-property name="gwt.logging.enabled" value="TRUE"/>
<set-property name="gwt.logging.consoleHandler" value="ENABLED"/>
<set-property name="gwt.logging.logLevel" value="INFO"/>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name='com.google.web.bindery.requestfactory.RequestFactory' />
<!-- 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' />
<stylesheet src="/public/css/theme/darkly.min.css" />
<stylesheet src="/public/css/bootstrapOverride.css" />
<stylesheet src="/public/css/gwtOverride.css" />
<stylesheet src="/public/css/Derp.css" />
<!-- Other module inherits -->
<!-- <inherits name="org.gwtbootstrap3.GwtBootstrap3" /> -->
<inherits name="org.gwtbootstrap3.GwtBootstrap3NoTheme" />
<stylesheet src="css/font-awesome-4.3.0.min.cache.css" />
<!-- <inherits name="org.gwtbootstrap3.extras.fullcalendar.FullCalendar" /> -->
<inherits name="org.gwtbootstrap3.extras.notify.Notify"/>
<!-- Specify the app entry point class. -->
<entry-point class='pl.dany.derp.client.Derp' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- allow Super Dev Mode -->
<add-linker name="xsiframe" />
</module>
and entry point class:
package pl.dany.derp.client;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Derp implements EntryPoint {
private static final Logger logger = Logger.getLogger(Derp.class.getName());
#Override
public void onModuleLoad() {
logger.log(Level.ALL, "----------------------------------------_>this message should get logged");
logger.log(Level.CONFIG, "----------------------------------------_>this message should get logged");
logger.log(Level.FINE, "----------------------------------------_>this message should get logged");
logger.log(Level.FINER, "----------------------------------------_>this message should get logged");
logger.log(Level.FINEST, "----------------------------------------_>this message should get logged");
logger.log(Level.INFO, "----------------------------------------_>this message should get logged");
logger.log(Level.OFF, "----------------------------------------_>this message should get logged");
logger.log(Level.SEVERE, "----------------------------------------_>this message should get logged");
logger.log(Level.WARNING, "----------------------------------------_>this message should get logged");
System.out.println("----------------------------------------_>this message should get logged");
logger.warning("----------------------------------------_>this message should get logged");
Window.alert("LLLLLLLLLLL 2222");
}
I am not getting output in eclipse console:
GET /recompile/derp
Job pl.korbeldaniel.derp.Derp_1_72
starting job: pl.dany.derp.Derp_1_72
binding: user.agent=safari
skipped compile because no input files have changed
0,022s total -- Compile completed
GET /sourcemaps/derp/ED2FD982D7D3CF133708FC4EC52FB0FB_sourcemap.json
sent source map for module 'derp' in 31 ms
I am getting no output in web browser console.
Please help.
You need add only <set-property name="gwt.logging.enabled" value="TRUE"
After adding this property, if server up and running you need to restart it. I found answer here

Gwt and Sencha, did you forget yo inherit a required module.

I am trying to implement a BarChart in GWT 2.6 using Sencha GXT 3.1 beta.
It compiles fine but i do get several
14:40:40.102 [ERROR] [comav200] Line 71: No source code is available for type com.sencha.gxt.chart.client.chart.Chart; did you forget to inherit a required module?
Errors. I do use the import com.sencha.gxt.chart.client.chart.Chart; (and several more).
Anyone has any thoughts on why this occur or what i have forgotten?
Best regards,
Kerrai
Please validate below inherits in gwt.xml
<inherits name='com.sencha.gxt.chart.Chart' />
For detailed information and basic chart example please have a look at
Getting started with GXT charts
Copied form the above link if you don't want to go to the link.
Project module setup
Using charts requires a library be added to the GWT project xml module.
Add com.sencha.gxt.chart.Chart to the GWT project module:
<inherits name='com.sencha.gxt.chart.Chart' />
Project.gwt.xml module example: (This is a complete example and much of this is optional.)
Please validate your gwt.xml
<!-- Project.gwt.xml module file -->
<?xml version="1.0" encoding="UTF-8"?>
<!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='project'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' />
<!-- Add this for using GXT charts -->
<inherits name='com.sencha.gxt.chart.Chart' />
<!-- GXT Stylesheet -->
<stylesheet src="reset.css" />
<!-- Override the blue theme -->
<inherits name="com.sencha.gxt.theme.gray.Gray" />
<!-- Specify the app entry point class. -->
<entry-point class='com.sencha.gxt.project.client.ProjectEntryPoint' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>

Categories

Resources