Why Am I Getting NullPointerException When I Run the HTML Playn Samples? - gwt

I'm trying to run the Playn html web application samples in Eclipse. I've followed the steps here:
http://code.google.com/p/playn/wiki/GettingStarted#Running_via_Eclipse
I'm running Eclipse 3.7 on Ubuntu 11.10. I installed the plugins and I was able to run the Java version successfully.
However, when I run GWT Compile by right-clicking the html listing in the Package Explorer, I get the following error:
An internal error occurred during: "playn-showcase-html - GWT Compile".
java.lang.NullPointerException
This occurs with the other samples too. When I get to the GWT Compile dialogue box, a message at top says "The project has errors."
When I start Eclipse, I get the following message in the console:
GWT SDK not installed.
However, the SDK is installed. I double-checked by redoing the steps here:
http://code.google.com/intl/da-DK/eclipse/docs/install-eclipse-3.7.html
And I get the following message:
"Google Web Toolkit SDK 2.4.0" will be ignored because it is already installed.

By reinstalling the GWT plugin and then editing the configuration settings in Eclipse, I was able to solve this problem. The general problem seems to be one of wiring the correct paths together. I'm not sure what exactly resolved it as I did a bit of fiddling but this is how I think I did it:
Clicked Preferences > Google > Web Toolkit
Added path: ..com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37/gwt-2.4.0/ and hit OK
Right-clicked playn-showcase-html in Package Explorer
Selected Build Path > Configure Build Path...
Selected Google > Web Tool Kit from list in left panel
In GWT SDK box, clicked Use specific SDK, selected only option there, and hit OK
I was able to compile and generate a web server link.
I then loaded the link in Chrome. If you get a message saying the module needs to be recompiled, go back to Eclipse and recompile the HTML dir (right-click on the HTML directory > Google > GWT compile.) Then reload (F5) page in Chrome.

Related

Javascripts debug error in Eclipse (Eclipse IDE for JavaScript Web Developers Packages)

I have downloaded Eclipse IDE for JavaScript Web Developers Packages. I tried to create a JavaScript project and a .html file inside it. When I tried to debug it by right click it and selected "Chrome and Chromium Debugger" to debug JavaScript inside the .html file. This error prompt out with the message:
"Unable to run Chrome / Chromium. Verify you have a configured Chrome / Chromium runtime environment and try again."
May you know how to solve it? I have spent a week to struggle with it.
I found the cause. Please refer to this link youtube.com/watch?v=l1FmC7aQzbk You should go to Eclipse Preferences → JavaScript → Runtimes and define Chrome / Chromium there.

GWT SuperDev - Can't find GWT Modules

I have followed the steps given on this page - getting-started-with-the-superdevmode
but I am still getting message - Can't find any GWT Modules on this page. I did some more googling but could not find any solution until now.
I am using GWT 2.6.1 and eclipse kepler 64 bit on ubuntu.
Here are the steps I did.
Created a new Web app project for GAE, using GWT 2.6.1 and GAE sdk 1.9.6.
Go to Run configurations. Create a new configuration for a "Java Application". Change the main class, Argument and add jar file as shown in the screenshot.
Check the apps .gwt.xml file. It already has <add-linker name="xsiframe"/>. I have tried adding devModeRedirectEnabled property also. It did not help.
GWT compile the project.
Run the application as Web application. Default jetty config serves the application at
http://localhost:8888/SuperDev.html.
I opened up this page in firefox. I can see the page content.
Launch the Java application configuration. It does compile again and gives a success message and tells me to launch
http://localhost:9876/
I opened it in firefox and it shows -
Dragged Dev Mode On to firefox's bookmark. And clicked.
I get the message - Can't find any GWT Modules on this page.
Following are the configurations for my superdev mode java app. Did I miss anything?
You need to click the bookmarklet when viewing your compiled web app.
The last steps should therefore be:
Dragged Dev Mode On to firefox's bookmark.
Switched back to my application at http://localhost:8888/SuperDev.html and clicked the bookmark
Once you have the bookmarklets, you actually don't really need to open http://localhost:9876 anymore (you'll find compile logs there, and can browser your code, including the code generated by GWT generators; so it can still be useful).
I tried to do it with Eclipse Oxygen, Java7 (for run application, for oxygen you have to have java 8), and GWT Eclipse Plugin 3.0.0.
In such an environment all you need to do is:
On project right click > Debug As > GWT Legacy Development Mode with Jetty.
PS:
you have to have address like this
http://127.0.0.1:8888/StockWatcher.html?gwt.codesvr=127.0.0.1:9997
NOT like :http://127.0.0.1:8888/StockWatcher.html
After openning addres you must additionally install the plugin in the browser - you will be asked for it
It work on IE11

Error in eclipse: “The project cannot be built until build path errors are resolved”

My eclipse project shows up but with a red exclamation mark and an error saying:
Build path specifies execution envoirnment JRE-1.1. There are no compatible JREs installed in the workspace
Unbound classpath container : 'JRE System Library [JRE -1.1]' in project Automation
I checked if all the libraries are present or not as mentioned in the error, and tried to import the missing jar into project but when I clicked on JRE System Library [JRE -1.1] to import it. its showing
"An error has occurred. See error log for more details.
java.lang.NullPointerException"
Can somebody help me out with this?
I was getting the same NullPointerException in Eclipse that came with Android SDK, then I did the following (explaining in step by step process):
Go to Help and click on Install New Softwares.
A Install window will open, click on "All available sites' and then there will be a text box to search for the softwares you want to install, enter 'Eclipse' there.
A lots of Eclipse related softwares will come up. Select Eclipse Platform, Eclipse Platform SDK and Eclipse SDK and then click Next...Next...(and all the Next)...Accept All the Agreements...Finish.
In some time it will install all the softwares and you'll have to restart the eclipse and you'll be good to go.
This resolved my issue. Hope this helps you.

Error: Could not find or load main class com.google.gwt.dev.Compiler

What steps will reproduce the problem? and how i can solve this problem
IN Eclipse Indigo, right click on project name --> google --> GWT Compile --> Compile
I got error that says
GWT compilation failed
In Eclipse console window, I got error message that says
Error: Could not find or load main class com.google.gwt.dev.Compiler
I am using windows 7 , eclipse juno 4.2 , and GWT sdk 2.5.1
During Gwt installation i left unchecked all app engine SDK options.
And also configure build path for jar files for projects i have.
but still this problem is coming .
Thanks for answering . well I tried that before but nothing happened. Then I uninstall all all. And go to HELP--->Install new Software---> in text area i used this link Google Update Site for Eclipse 4.2 - http://dl.google.com/eclipse/plugin/4.2 then whenever i checked Google Plugin for eclipse (required) and hit next it shows Cannot complete the install because one or more required items could not be found.
Software being installed: Google Plugin for Eclipse 4.2 3.2.4.v201306061638-rel-r42 (com.google.gdt.eclipse.suite.e42.feature.feature.group 3.2.4.v201306061638-rel-r42)
Missing requirement: Google Plugin for Eclipse 4.2 3.2.4.v201306061638-rel-r42 (com.google.gdt.eclipse.suite.e42.feature.feature.group 3.2.4.v201306061638-rel-r42) requires 'org.objectweb.asm 0.0.0' but it could not be found i didn't understand what and where is the problem coming .
I would double check your GWT install. Right click on a project in eclipse, and select Properties. Then under the Google option, click Web Toolkint. On the panel to the right there should be an option "Use Google Web Toolkit". Make sure that is checked. Also Click "Configure SDKs", and ensure that the selected SDKs are indeed pointing to the correct file location. Finally, Make sure that your entry points are correctly added in the "Entry Point Modules" panel.
I was facing the similar problem. I changed the proxy of my eclipse to manual and put in proxy settings for HTTP, HTTPs and port as 8080. This allowed the eclipse to connect to the network and download the required plugins. Try this out and let us know if it helps.

playn-showcase-html is not a GWT project

As per the getting started wiki page, I had Indigo with the Android plugin installed; I installed the Maven Integration for WTP and Google plugins (in that order). I can run the Java version of the showcase fine; when I try to Google > GWT Compile the showcase-html, Eclipse tells me that this is "not a GWT project."
What am I doing wrong? Or is this broken?
Source can be found here for the next seven days: http://www.sendspace.com/file/zc2af3
With all of those plugins installed Eclipse should auto-detect the GWT "nature" of the yourgame-html subproject. It works fine for me and at least a few other people.
In any case, you can simply right click on that project, select "Google -> Web Toolkit Settings..." and click "Use Google Web Toolkit" on the dialog that pops up.
Right click on the project "Run As -> Run Configurations". We should at-least create one configuration for web application. Click on New Configuration and eclipse will automatically fill the information(ie.playn-showcase-html & the class information ). Go ahead and click on Run and you should be able to get you server to run. Hope this helps.