1
votes

I'm trying to update my GWT + NetBeans framework, installing GWT 2.7. The first thing I tried then was to run the sample application created by the GWT4NB wizard.
It simple does not work. It compiles OK, but, when I run the project, the web page appears empty in any browser.
The same project works perfectly using GWT 2.5.
Running the browser's debugger I get the following error:
Loading failed for the with source http://localhost:8080/WebApplication1/org.yournamehere.Main/org.yournamehere.Main.nocache.js

I am using:GWT 2.7, java 1.8, NetBeans 8.0.2, Ubuntu 14-64

The welcomeGWT.html created:

<html>
<head>
    <meta name='gwt:module' content='org.yournamehere.Main=org.yournamehere.Main'>
    <title>Main</title>
    <script type="text/javascript"  src="org.yournamehere.Main/org.yournamehere.Main.nocache.js"></script>
</head>
<body>
    <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
</body>

The Main.gwt.xml:

<module>
<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.standard.Standard'/> -->
<!-- <inherits name="com.google.gwt.user.theme.chrome.Chrome"/> -->
<!-- <inherits name="com.google.gwt.user.theme.dark.Dark"/> -->

<entry-point class="org.yournamehere.client.MainEntryPoint"/>

<!-- Do not define servlets here, use web.xml -->

Any idea?

2

2 Answers

1
votes

I've had similar issues with GWT4NB wizard, and I had to move some things around to get it to work (I knew this from experience setting up new projects, and also fully working on several). You have a couple of choices that are dependent on a few things:

  1. Your build tool matters. Using that wizard ultimately means that Ant would be your build tool. Maybe you should consider Gradle or Maven. GWT Projects are incredibly easy to set up with those build tools.

  2. Also, I have gotten GWT projects to work by using the Eclipse plugin instead. After I am done creating the project in Eclipse, I import it to Netbeans and continue work.

Cheers.

0
votes

I had the problem with this HelloGWT today too.

The solution is:

1. Rightclick on the progect within the project window
2. Click on 'properties'
3. In categories pane select Google Web Toolkit
4. In Module pane where there is 'GWT Compiler' paragraph set JVM Argumnts to -Xmx1024M (or more)
5. press ok and compile your project again.