I am using Eclipse Juno Service Release 1, instaled the latest GWT Designer plugin and run update. When I am in GWT Design and I select the CSS button in the StyleName row of a widget's properties I get the message "There are no CSS files referenced from module or HTML".
My gwt.xml is:
<module>
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.google.gwt.user.theme.standard.Standard"/>
<entry-point class="org.AwardTracker.client.AwardTracker"/>
<stylesheet src="org.AwardTracker.AwardTracker.css"/>
<!-- servelet context - path is arbitrary, but must match up with the rpc init inside java class -->
<!-- Tomcat will listen for this from the server and waits for rpc request in this context -->
<servlet class="org.AwardTracker.server.MySQLConnection" path="/MySQLConnection" />
<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"/>
</module>
My CSS is in org.AwardTracker (directly above the gwt.xml file).
All the hints that I have googled have been to update GWT Designer. These hints are all several years old and I have the latest version.
Any idea what I am doing wrong?
You have to first chk your css file in war folder bcoz css file and html file exist in war folder than check link in html file
<link type="text/css" rel="stylesheet" href="abc.css">
You need to have your project packages and references correct. You can follow the solution offered here regarding project/file organization - Editing CSS in Gwt WindowBuilder
It seems the file is not found due to the path.You are already in The xml file so try
<stylesheet src="AwardTracker.css"/>
Hope this will helpfull .
Related
I am trying to implement a Vaadin 8 framework project (8.0.5) but I can't get the widgetset to compile.
Using Glassfish 4 (alternatively, tried on Wildfly) DB: ObjectDB. I do have the charts and Timeline addon (Licensed). Theme compiles fine, using eclipse Vaadin plugin. WAR deploys fine.
After bringing up glassfish, tried accessing the UI - MyAppWidgetset.nocache.js not found error.
At this point tried compiling the widgetset Build failure with error com.vaadin.terminal.gwt.DefaultWidgetSet not found in project.
pom.xml reflects the same error at <execution> element.
Tried the fowllowing:
Added: #WidgetSet annotation to the MainUI class. Then added a gwt.xml class in ../resources/{package-folder structure} found on Vaadin forum:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.addon.charts.Widgetset" />
<inherits name="com.vaadin.addon.timeline.gwt.TimelineWidgetSet" />
<inherits name="com.vaadin.DefaultWidgetSet" />
</module>
I manually tried adding:
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
But as soon as I save, Eclipse editor deletes that row. Is that supposed to happen? Tried adding from an external editor, but it gets deleted as soon as I open it in Eclipse.
After selectivly adding dependencies, the problem seems to be with charts.
Apparently, Adding Vaadin Charts dependency is causing the compilation to fail.
But I do have the license key in my root folder.
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>2.0.0</version>
</dependency>
So I was doing 2 things wrong:
The location of the license file. A per the Demo code on github, it was in the root folder of the project. It has to be under \Users\(username) Directory.
Vaadin 8 works with Charts 4.0 and not earlier versions.
I'm trying to compile my gwt application. I'm having a parent project 'admin' and a maven module 'admin-app' with my web.xml *.gwt.xml admin.html.
Looks like:
admin package = com.admin
admin-app
src/main/resources
package=com.admin file=admin.gwt.xml
src/main/webapp
++ js
++ admin.css
++ admin.html
++ WEB-INF
+++ jsp
+++ lib
+++ applicationContextx.xml
+++ web.xml
The problem is my entry point or my paths and defaults names.
I included
<script type="text/javascript" src="admin/admin.nocache.js"></script>
To to generate the JS code for my application.
But My problem is within my *gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module SYSTEM "gwt-module.dtd">
<module rename-to='admin'>
<inherits name='com.google.gwt.user.User'/>
<!-- Specify the app entry point class. -->
<entry-point class='com.admin.client.AdminEntryPoint'/>
<source path='client'/>
</module>
My entry path is correct but I always get the error msg:
Loading modules
com.admin.admin
Loading inherited module 'com.admin.admin'
[ERROR] Unable to find 'com/admin/admin.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
Without the entry point I can successfully compile my project, so the problem is within the entry-point.
thx for any help :)
I fixed this problem by renaming the module to app like the project-module, the *.gwt.xml to app.gwt.xml and also the path in my admin-html to app/app.nocache.xml. It's running know but the main idea was to use another namespace. So if anybody can help me there i would be very happy.
app should be named admin, for easier searching and so on.
thx :)
Why gwt-recaptcha-1.0.0.Beta2.jar blocks script tags in recaptcha jar while linking modules?
In my web application using GWT, I am using captcha verification. For using captcha I used Claudius Hauptmann's gwt-recaptcha-1.0.0.Beta2.jar. In the gwt.xml file of this jar there is a script configuration as follows:
<module>
<inherits name="com.google.gwt.user.User"/>
<script src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"/>
</module>
When I run the project it ignores loading the scripts by giving these messages in console:
Linking modules
Bootstrap link for command-line module 'com.web.Ask'
Linking module 'ask'
Invoking Linker Cross-Site-Iframe
Ignoring the following script tags in the gwt.xml file
https://www.google.com/recaptcha/api/js/recaptcha_ajax.js
raphael.js
I would like to know what is the exact reason for ignoring these file. How to resolve it.
PS: before some days it was working perfectly and after some config changes it stopped.
I am not sure about this fix,
please try
Remove linker elements from your GWT module XML like
<add-linker name="xsiframe" />
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE' />
I am trying to get Googlemaps v3 to work with Google web tool kit.
I am using GWT 2.5.1. I have been trying to search for the lastest release of Google Maps with GWT and ended up on this page.
As per there instructions I have downloaded those 3 jar files.
gwt-maps-api-v3-3.8.1-javadoc.jar
gwt-maps-api-v3-3.8.1-sources.jar
gwt-maps-api-v3-3.8.1.jar
I have placed those jar files in my WEB-inf
I have added those jar files to my class path
In my map_geolocation.gwt.xml I have inherited the module.
<?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 rename-to="map_geolocation">
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.maps.gwt.GoogleMaps" />
<source path="client" />
<entry-point class="com.google.maps.gwt.samples.basics.client.MapGeolocation" />
</module>
When i try to run my code I get this error.
Loading modules
com.google.maps.gwt.samples.basics.map_geolocation
Loading inherited module 'com.google.maps.gwt.samples.basics.map_geolocation'
Loading inherited module 'com.google.maps.gwt.GoogleMaps'
[ERROR] Unable to find 'com/google/maps/gwt/GoogleMaps.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 6: Unexpected exception while processing element 'inherits
After doing some research I inherited
<inherits name='com.google.gwt.maps.Maps' />
instead of
<inherits name="com.google.maps.gwt.GoogleMaps" />
Still it fails. Does anyone know what is going on ?
UPDATE : I am not concerned with using V3. Where can I find the stable latest
Google map plugin for GWT ?
1- You only need a jar, download last version from maven repos, and put in your classpath just one jar:
gwt-maps-api-3.10.0-alpha-6.jar
2- gwt-maps-api depends on gwt-ajaxloader so download it as well, uncompress it, and add the gwt-ajaxloader.jar file to your classpath.
3- Check that you are inheriting the correct module in your .gwt.xml file:
<inherits name='com.google.gwt.maps.Maps' />
4- Normally, in your eclipse, the classpath of the GWT sdk should be before than 3party libraries
5- The [ERROR] Unable to find '....gwt.xml' on your classpath is always a problem of classpath. There is plenty of answers in stackoverflow about this common problem.
After doing this, if your problem persists, try to remove the 'run as' configuration of your project and set it up again.
I am starting to use GWT for a class project and wanted to know real use cases for RPC. So, I found this example on this same website: Stack Overflow - Simple RPC Use Case Problem (Code Included)
Why I did this example? because I was getting the same errors that the user posted on my own project and I decided to try and follow his code on my computer to see if I could really face my own mistakes.
So the point is that after copying the files on an Eclipse GWT project and deploy the app, I got this two errors on running time:
1st Error
12:14:07.874 [ERROR] [test] Line 17: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet; did you forget to inherit a required module?
2nd Error
12:42:54.547 [ERROR] [test] Unable to find type 'org.redboffin.worldhug.client.test.Test'
12:14:09.341 [ERROR] [test] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
So I tried to correct Test.gwt.xml as Craig suggested on the post. Unfortunately, that solution is not working to me because still I am getting the same errors.
1st error: I don't know what is happening because, for example, in the file it is depicted, RemoteServiceServlet is imported some rows before (despite it is not seen). This file is on package "org.redboffin.worldhug.server.test;"
2nd error: If user who posted initial thread did not need to "inherit" a new package in his project, I can't understand why do I need them. Anyway, I put a new inherit line one the .gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='test'>
<inherits name="com.google.gwt.user.User" />
<entry-point class="org.redboffin.worldhug.client.test.Test"></entry-point>
<source path="client" />
<source path="shared" />
<inherits name="org.redboffin.worldhug.client.test.Test" />
</module>
And that is what I got:
Loading inherited module 'org.redboffin.worldhug.client.test.Test'
[ERROR] Unable to find 'org/redboffin/worldhug/client/test/Test.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
(of course, it didn't compile)
So, I really don't know what is going on. Please, can someone bring some light to this issue? Why is this not working? What I am doing bad? What is this type that it is needed on the 2nd error?
Hello Irene and other Web-Wanderers,
Maybe this is a double post on a already answered post or let me say it is a try to clarify about includes of Java Source code in the xml file. I got stuck at the same point, but I couldn't point out what Adrian meant. The last two source tags will tell what packages and trailed source files shall be compiled. That is why you should name each package in the attribute called "path".
The file below was auto-generated in Eclipse Indigo in Framework version: appengine-java-sdk-1.6.4.1. It is bereft of unnecessary comments.
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='wk_cms'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.json.JSON'/>
<inherits name='com.google.gwt.http.HTTP'/>
<inherits name='com.google.gwt.user.theme.chrome.Chrome'/>
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='de.someproject.wkcms.client.Wk_cms'/>
<!-- Specify the paths for translatable code -->
<source path='client'/> <<-- my code (package client)
<source path='communication'/> <<-- my code (package communication)
</module>
I hope this keeps everyone afar from probing and testing before having success... =)
Best regards,
Semo
PS. The file edited was not web.xml but PROJECTNAME.gwt.xml.
Think I see it:
Test.java should be in the client.test package not just client, or everything should point to client.Test rather than client.test.Test.
Your server class seems to be under the package server.test, rather than just server, which is probably wrong. Check the mapping in web.xml correctly points to this class.
I suspect the real error is probably somewhere else though - I would have expected it still to compile.
(Not sure if I have to "answer your question" or not, first try on Stack Overflow site!)
Thanks for your comment, Adrian!
This is the content of "web.xml" file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Servlets -->
<servlet>
<servlet-name>testServlet</servlet-name>
<servlet-class>org.redboffin.worldhug.server.test.TestServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>testServlet</servlet-name>
<url-pattern>/worldhug/test/testService</url-pattern>
</servlet-mapping>
<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>test.html</welcome-file>
</welcome-file-list>
</web-app>
It seems that the servlet tag is pointing to the right place to my eyes: TestServiceImpl.java is inside package "org.redboffin.worldhug.server.test" Did you mean that?
Any other idea?
Thank you again! :)
You will have to include the following
<source path='client.test'/>