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

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>

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.

GWT compilation failed in eclipse

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

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

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

Using supressions by ID in checkstyle

I would like to make checkstyle ignore missing javadoc for #throws clauses in tests, but complain in non-tests.
Because supression files do not support subproperties of the JavadocMethod, I am forced to either ignore javadoc in tests altogether or not at all, with no granularity. This is also the conclusion of this other question.
Here's what I'm trying now: could I have two JavadocMethod modules with different id's (e.g. test and notest) in my checkstyle configuration, and selectively supress the test module on non-tests and viceversa?
I cannot get this to work, and I'm starting to think I can't have a duplicate module in checkstyle. Any insights?
Here are my rules regarding JavadocMethod in the configuration xml:
<module name="JavadocMethod">
<property name="id" value="nontest"/>
</module>
<module name="JavadocMethod">
<property name="id" value="test"/>
<property name="allowMissingThrowsTags" value="true"/>
</module>
And this is my supression file:
<suppressions>
<!-- Supress non-test-doc on tests -->
<suppress id="nontestdoc" files=".*(?:Test|IT).*java" />
<suppress id="testdoc" files=".*(?!Test|IT).*java" />
</suppressions>
Thanks!
You can have duplicate module in checkstyle.
Tried with 2 Indentation module with tab 2 and tab 4 respectively. And used the suppression.xml like following
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress id="IndnA" files=".*\.java"/>
<suppress id="IndnB" files=".*\.java"/>
</suppressions>
and what is the regex .*(?:Test|IT).*java and .*(?!Test|IT).*java for? Why are you using LookAhead?
please check with files as .*\.java whether that is working or not.

Categories

Resources