When I run my APP under IE9 it fails with a lot of JS errors and I receive attached message even that I run my APP with IE9. This confuses my code, because elements in js do not accept addEventListener under IE6.
This is my GWT.xml file
<module rename-to="MyModuleName">
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.gwt.http.HTTP"/>
<inherits name="com.google.gwt.xml.XML"/>
<inherits name="com.google.gwt.i18n.I18N"/>
<inherits name="com.googlecode.gwt.charts.Charts"/>
<set-property name="user.agent" value="ie9"/>
<entry-point class="com.test.MyModuleName"/>
</module>
Thanks for the help in advance!
IE8+ will use the ie6 permutation if they switch to quirks mode. Make you you have a doctype that triggers standards mode (simplest is <!doctype HTML>) and/or include a <meta http-equiv="X-UA-Compatible" content="IE=Edge">
Related
I just did a checkout of a project with SVN, and is showing me the following error.
I am really new using gwt and be very grateful if you could help me.
This is the error:
Loading inherited module 'com.google.web.bindery.event.Event'
[ERROR] Unable to find 'com/google/web/bindery/event/Event.gwt.xml' on your classpath; could be a
a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 22: Unexpected exception while processing element 'inherits'
This is my xml file
<?xml version="1.0" encoding="UTF-8"?>
<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name="com.smartgwt.SmartGwt" />
<inherits name="com.smartgwt.tools.SmartGwtTools" />
<inherits name="com.google.gwt.activity.Activity" />
<inherits name="com.google.gwt.place.Place" />
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.google.web.bindery.event.Event" />
<inherits name="com.google.gwt.core.Core" />
<entry-point class='ch.datalynx.clessidra.client.Clessidra' />
<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'/> -->
<replace-with
class="ch.datalynx.clessidra.client.mvp.clientfactories.ClientFactoryImpl">
<when-type-is
class="ch.datalynx.clessidra.client.mvp.clientfactories.ClientFactory" />
</replace-with>
<source path='client' />
<source path='shared' />
</module>
Make sure the gwt-user.jar file is in your build path. It's part of the GWT SDK.
It is unable to find gwt-user.jar/com/google/web/bindery/event/Event.gwt.xml
I have a .jsp page (the main page of my gwt module) and I'm trying to enable super dev mode as I'm migrating to gwt 2.6.
Following the explanations I found out on internet, once I launch the codeserver and add the bookmarklets, next I gotta open the page in my browser, so I call the jsp page from my tomcat server.
The problem is that nothing happens, and looking at the chrome console it seems it is unable to find my module/module.nocache.js
Any idea?
EDIT : added .gwt.xml
<inherits name="XXX.frontend.gwt.Framework"/>
<inherits name="XXX.frontend.gwt.sample.frontend.module.blanc.Module"/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<!-- Specify the application entry point class -->
<entry-point class='XXX.frontend.gwt.client.FrameworkEntryPoint'/>
<!-- Compile for specific browser -->
<!-- <set-property name="user.agent" value="ie8,ie9,ie10,gecko1_8,safari" /-->
<!-- Compile for specific language -->
<extend-property name="locale" values="fr" />
<set-property-fallback name="locale" value="fr" />
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE' />
<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(localhost|127\.0\.0\.1)(:\d+)?/.*" />
<add-linker name="xsiframe" />
<set-property name="compiler.useSourceMaps" value="true" />
You have to load your .nocache.js file from your codeserver instance.
In your .jsp you must have something like this:
<script src="http://localhost:9876/myapp/myapp.nocache.js"></script>
In your gwt.xml you need these lines as well:
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-property name="compiler.useSourceMaps" value="true" />
Upon attempting to run my Google Web Application I've been working on in Eclipse using GWT, it gives me this error:
"Loading modules
com.example.pbot.Pbot
Loading inherited module 'com.example.pbot.Pbot'
[ERROR] Unable to find 'com/example/pbot/Pbot.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"
All of my packages are com.pbot, com.pbot.client, com.pbot.server, etc; I don't know where it's seeing com.example.
The entry-point class in the gwt.xml file is com.pbot.client.Pbot, which is my entry point class. Here's the full gwt.xml:
-->
<!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='pbot'>
<!-- 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='com.pbot.client.Pbot'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>
I've cleaned, refreshed and restarted the project, I don't know what else to do. Where is it reading "com.example?" Please help!
Check the run configurations -> Arguments. There will be a reference of com.example.pbot.Pbot.
I think, this is what Thomas mentioned.
Check the project properties, in the GWT page, it probably references the com.example that you initially created.
My GWT app, using UiBinder, won't load in Internet Explorer. However, it loads just fine in Firefox, Safari, and on the iPhone.
In trying to isolate the problem, I've been stripping out parts trying to find the root cause. I'm down to basically a Label and it still works in FF but not IE.
Here's the EntryPoint:
public class Core implements EntryPoint {
private static Core instance;
public static Core instance() {
return instance;
}
#Override
public void onModuleLoad() {
instance = this;
RootPanel container = RootPanel.get("container");
container.add(new Label("hi"));
}
}
Here's my index.jsp:
<!doctype html>
<html>
<head>
<script type="text/javascript" src="core/core.nocache.js"></script>
</head>
<body>
<div id="container"></div>
</body>
</html>
Here's my appengine-web.xml:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>realAppNameHere</application>
<version>andrew</version>
<static-files>
<include path="**" />
<!-- The following line requires App Engine 1.3.2 SDK -->
<include path="**.nocache.*" expiration="0s" />
<include path="**.cache.*" expiration="365d" />
<exclude path="**.gwt.rpc" />
</static-files>
<!-- Configure java.util.logging -->
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
</appengine-web-app>
And here's my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Even with this stripped-down version of everything, it still works in Firefox but not IE. Now there aren't even any bugs thrown, not even in Firebug... it just doesn't show the label in IE, but it will show the label in FF. I have no idea why this isn't running.
Anyone have any idea?
Edit 3:
Forgot the module.gwt.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='core'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.ajaxloader.AjaxLoader'/>
<inherits name="com.google.gwt.logging.Logging"/>
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<entry-point class='com.company.core.client.Core'/>
<source path='client'/>
<source path='shared'/>
<set-property name="gwt.logging.logLevel" value="SEVERE"/>
<set-property name="gwt.logging.enabled" value="FALSE"/>
<set-property name="gwt.logging.consoleHandler" value="ENABLED"/>
<set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
</module>
Some of the things won't come up in IE6 but it will definitely get loaded. The first thing you need to see is whether you have added an User agent for IE6 as
<set-property name="user.agent" value="ie6"/>
in your .gwt.xml file.
Next thing you need to check that whether you added an exception for localhost in your browser security settings.
If all this is done and still not working try to cleanup your project and recompile it.
From testing on an actual copy of IE (not the IE plugin for Firefox) we were able to see an error "console is not defined".
Turns out, this was throwing an exception in IE, preventing the page from loading:
public native static void log(String inString)
/*-{
console.log(inString);
}-*/;
So to solve this, we'll take out that reference to console and replace with a cross-browser logging library, such as GWT-Log
i can't get a comet chat example to run.
i get this error
[WARN] 404 - GET /birgit.chat.Chat.nocache.js (127.0.0.1) 1413 bytes
this is how my web.xml looks like
<servlet>
<servlet-name>chatComet</servlet-name>
<servlet-class>net.zschech.gwt.comet.server.CometServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>chatServiceImpl</servlet-name>
<servlet-class>birgit.chat.server.ChatServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>chatServiceImpl</servlet-name>
<url-pattern>/birgit.chat.Chat/chat</url-pattern>
</servlet-mapping>
This is my Chat.gwt.xml
<!DOCTYPE module SYSTEM "http://google-web-toolkit.googlecode.com/svn/trunk/distro- source/core/src/gwt-module.dtd">
<module >
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.gwt.user.theme.standard.Standard" />
<inherits name="net.zschech.gwt.comet.Comet" />
<servlet class="birgit.chat.server.ChatServiceImpl" path="/chat"/>
<entry-point class="birgit.chat.client.ChatEntryPoint" />
</module>
Those are packages i use
package birgit.chat.client;
package birgit.chat.server;
I think there is something wrong with path but i am out of ideas.
Please help.
Thank you.
First you should rename your module name in your *.gwt.xml , module has rename-to attribute which renames the module. After that you can reference your *.nocache.html with renamed module name.
<module rename-to="chatModule">
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.gwt.user.theme.standard.Standard" />
<inherits name="net.zschech.gwt.comet.Comet" />
<servlet class="birgit.chat.server.ChatServiceImpl" path="/chat"/>
<entry-point class="birgit.chat.client.ChatEntryPoint" />
</module>
and in your html page:
<script type="text/javascript" language="javascript"
src="chatModule/Chat.nocache.js"></script>