0

I've created a GWT 2.6 project and i want to add GXT to it. I tried first with 3.0.1 but then I found out that it has compatibility issues so I changed to GXT 3.1 beta.

But when I try to run the app i get these errors:

enter image description here

The changes I've made is to comment out this line in module xml

<inherits name='com.google.gwt.user.theme.clean.Clean'/>

and added these:

  <inherits name='com.sencha.gxt.ui.GXT' />

  <!-- GXT Stylesheet -->
  <stylesheet src="reset.css" />

Anybody have an idea?

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.6.0//EN"
  "http://google-web-toolkit.googlecode.com/svn/tags/2.6.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='comav200'>
  <!-- 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'/>   

  <inherits name="com.google.gwt.json.JSON" />

  <!-- Other module inherits                                      -->
  <inherits name="com.google.gwt.json.JSON" />
  <inherits name='com.sencha.gxt.ui.GXT' />

  <!-- GXT Stylesheet -->
  <stylesheet src="reset.css" />

  <!-- Specify the app entry point class.                         -->
  <entry-point class='com.coma.client.Main'/>

  <!-- Specify the paths for translatable code                    -->
  <source path='client'/>
  <source path='shared'/>

  <!-- allow Super Dev Mode -->
  <add-linker name="xsiframe"/>
</module>

Jars

Stack trace

maj 02, 2014 7:17:00 EM java.util.prefs.WindowsPreferences <init>
Varning: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner' could not be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/C:/Users/JoHanSolo/Documents/eclipse%20ee/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-dev.jar' to the web app classpath for this session
   For additional info see: file:/C:/Users/JoHanSolo/Documents/eclipse%20ee/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/doc/helpInfo/webAppClassPath.html
[WARN] 404 - GET /%7Bmodule%20name%7D/reset.css (127.0.0.1) 1394 bytes
   Request headers
      Host: 127.0.0.1:8888
      User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
      Accept: text/css,*/*;q=0.1
      Accept-Language: en-US,en;q=0.5
      Accept-Encoding: gzip, deflate
      Referer: http://127.0.0.1:8888/Comav200.html?gwt.codesvr=127.0.0.1:9997
      Connection: keep-alive
   Response headers
      Content-Type: text/html;charset=ISO-8859-1
      Cache-Control: must-revalidate,no-cache,no-store
      Content-Length: 1394
Exception in thread "Thread-1" java.lang.NullPointerException
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.JavaScriptException.getExceptionName0(JavaScriptException.java)
    at com.google.gwt.core.client.JavaScriptException.getExceptionName(JavaScriptException.java:66)
    at com.google.gwt.core.client.JavaScriptException.ensureInit(JavaScriptException.java:203)
    at com.google.gwt.core.client.JavaScriptException.getMessage(JavaScriptException.java:187)
    at com.google.gwt.dev.util.log.AbstractTreeLogger.getStackTraceAsString(AbstractTreeLogger.java:70)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceClient.generateLogData(ViewerServiceClient.java:296)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceClient.addLogEntry(ViewerServiceClient.java:118)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceTreeLogger.sendEntry(ViewerServiceTreeLogger.java:158)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceTreeLogger$PendingLog.send(ViewerServiceTreeLogger.java:72)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceTreeLogger.initLogHandle(ViewerServiceTreeLogger.java:134)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceTreeLogger$1.onDone(ViewerServiceTreeLogger.java:145)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceTreeLogger$1.onDone(ViewerServiceTreeLogger.java:143)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceClient$1.onDone(ViewerServiceClient.java:96)
    at com.google.gwt.dev.shell.remoteui.ViewerServiceClient$1.onDone(ViewerServiceClient.java:94)
    at com.google.gwt.dev.shell.remoteui.MessageTransport$PendingRequest.setResponse(MessageTransport.java:124)
    at com.google.gwt.dev.shell.remoteui.MessageTransport.processServerResponse(MessageTransport.java:428)
    at com.google.gwt.dev.shell.remoteui.MessageTransport.processMessage(MessageTransport.java:404)
    at com.google.gwt.dev.shell.remoteui.MessageTransport.access$400(MessageTransport.java:44)
    at com.google.gwt.dev.shell.remoteui.MessageTransport$3.run(MessageTransport.java:327)
    at java.lang.Thread.run(Unknown Source)
Mangs
  • 698
  • 1
  • 19
  • 40
  • please give me some time. time to dinner. :) – Braj May 02 '14 at 15:20
  • Does it work if you compile to JS? If not, can you share that log, as it is more likely to have additional detail than what you took from a screenshot. If so, can you click on the various errors in the dev mode window and get the error messages that show up in the lower console, if any. – Colin Alworth May 02 '14 at 17:10
  • Now I feel stupid, how do I compile it to JS? I've added the stack trace from when I hit run as web application. – Mangs May 02 '14 at 17:19
  • Are you using the latest GXT 3.1 beta version? – El Hoss May 04 '14 at 11:59
  • @ElHoss I'm using GXT 3.1.0, couldn't find any other. – Mangs May 06 '14 at 07:08
  • The early version of GXT 3.1.0 beta had some problems with GWT 2.6.0, especially with the user agent. Can you set the logLevel to TRACE and check if there are more informations inside the log. – El Hoss May 06 '14 at 08:46

2 Answers2

0

Please check your module-xml file and add if not already present:

<inherits name='com.google.gwt.user.User' />
Norbert
  • 1,391
  • 1
  • 8
  • 18
0

Some points that I noticed in your gwt.xml


Try with below options

For more info have a look at below links:


--EDIT--

try with below gwt.xml first

    ...
<module rename-to='comav200'>
    <inherits name='com.google.gwt.user.User' />

    <inherits name='com.sencha.gxt.ui.GXT' /> 
            <inherits name="com.google.gwt.json.JSON" />

    <stylesheet src="reset.css" /> 
    <entry-point class='com.coma.client.Main' />

    <source path='client' />
    <source path='shared' />    
</module>

Its working fine for me with GWT 2.5.0. Please have a look at the lib folder in below screenshots.

<?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='gxtproject'>
    <inherits name='com.google.gwt.user.User' />

    <inherits name='com.sencha.gxt.ui.GXT' />
    <stylesheet src="reset.css" />
    <entry-point class='com.gxt.client.GXTProject' />

    <source path='client' />
    <source path='shared' />

    <inherits name="com.google.gwt.json.JSON" />

</module>

enter image description here

Community
  • 1
  • 1
Braj
  • 46,415
  • 5
  • 60
  • 76
  • I've removed the double JSON import, changed the DTD and added the new set-property(Can I put this anywhere in the xml?) I'm not sure what more to do. Should I add the define-prop and extend-props too? – Mangs May 02 '14 at 16:13
  • First three "sub-errors" are solved by this. But there is still three more. – Mangs May 02 '14 at 16:14
  • No just change the DTD URL first. If it doesn't work then add `` any where in `gwt.xml` – Braj May 02 '14 at 16:15
  • OK Let me try to find out the other cause meanwhile you can search on it. – Braj May 02 '14 at 16:37
  • Read this link [deferred-binding-failed](http://www.sencha.com/forum/showthread.php?170786-deferred-binding-failed-...-GWT-BridgeImpl.create) – Braj May 02 '14 at 16:45
  • Try to run with simple `gwt.xml` as I have posted. – Braj May 02 '14 at 16:49
  • Working fine with `GWT 2.5.0`. – Braj May 02 '14 at 16:55
  • Adding that `set-property` says 'only work in firefox', which I'm almost certain is not what they want. The asker is also using GXT 3.1.0-beta (available in maven central), which requires GWT 2.6, so GWT 2.5.0 (or 2.5.1, etc) won't work with it. – Colin Alworth May 02 '14 at 17:08
  • I've tried the updated xml and it doesn't work. I use GWT 2.6.0 and GXT 3.1 Beta, so instead of your gxt jars I have the jars in the picture in the updated question. – Mangs May 02 '14 at 17:10
  • @JohanMagnusson `Add more user agent as mentioned below.` added in my post already. – Braj May 02 '14 at 17:11
  • Yes, I saw that line and i didn't know what more to add. But if I get it running with firefox first that would still be great. – Mangs May 02 '14 at 17:21