GWT Super Development Mode issue while loading the application - maven

I have installed the GWT SDK version as 2.8.1. I am able to run the application in GWT with Jersy. But, when I try to run the application in GWT Development mode(Super), URL is generating like http://127.0.0.1:9876. When I place this URL in browser not loading the expected UI page. I am getting the page like,
When I click on Dev Mode On button, I am getting this page.
Even I clicked on module name (gwtsample), then I am getting the page like below,
I have even added the GWT extension in browser level and tried the same. But, still no luck.
Instead of trying with the eclipse downloaded GWT SDK, I have externally downloaded the same version of GWT SDK and applied in the Project Properties > GWT > General Settings. Still, facing the same issue only.
I have observed one more thing is, in project facets GWT version is showing like 1.0 where originally I am using 2.8.1 version of SDK. My project is configured with Maven.
I have even gone through multiple questions and solutions which are mentioned in stackoverflow as well as other websites, still, no solution found.
Links which I referred was,
GWT Super Dev Mode
Debugging in GWT Super Dev Mode?
GWT Super Dev mode and in production
some other as well...

You have to compile your GWT application and host in a webserver.
Then navigate to this webserver with your browser. And finally press the DevModeOn bookmarklet to switch to superdevmode.
Drag the bookmarklets (Dev mode on/off) to your bookmarks bar
Compile your gwtsample project into a war
Deploy the war into a webserver like tomcat or jetty
Take your browser (Chrome highly recommended for GWT debugging) and navigate to your installation : for example http://localhost:8080/gwtsample
Now you are just seeing your compiled version in the browser
Next hit the "Dev mode on" bookmarklet.
You will see a message in the browser that compilation is taking place
Now you are in SuperDevMode
Change something in your code
Hit F5 in the browser. Now a recompile will happen and you will see your changes
You can always hit "Dev mode off" to switch off superdevmode. Now you will just see your original compiled application.
Extra : if you are using Eclipse I highly recommend using the branflake plugin : https://github.com/gwt-plugins/gwt-eclipse-plugin
He has some great videos of how to use it : https://www.youtube.com/watch?v=DU7ZQVLR5Zo&list=PLBbgqtDgdc_TqzA-qXrjgTFMC_6DKAQyT
This way you don't even need to compile and host in some webserver as you can run with an embedded Jetty webserver.

You need a HTTP server to serve your HTML host page and webapp (Tomcat, Jetty, Wildfly, Apache+PHP, Rails, choose whatever you need).
Then, launch GWT's CodeServer with -launcherDir pointing to where your webapp lives. It will create a *.nocache.js specific for SuperDevMode, possibly overwriting your production one.
Now, load your webapp as usual from the web server, the specific *.nocache.js will compile your sources on the fly.
If you can live with a simple servlet container, then DevMode (instead of CodeServer) will do all the above setup automatically: use -war instead of -launcherDir.
You shouldn't need to open the CodeServer URL (on port 9876 by default) or use the bookmarklets with any recent GWT version, starting with 2.7.

Related

Problems with Osgi plugins in Domino Designer after 9.01. FP4

We have our own OSGI plugin with a set of custom code and some java libraries that we use cross projects. It is installed on servers via an update site and imported on developers Domino Designer.
It is working fine up to FP4, but in Domino Designer it is not added to bundles after FP4. For servers and Notes clients it works fine up to FP6 for which we have tested so far.
Tested now with FP7 on my Domino Designer, and the plugin installs fine both via update site and via manual import. However each time I open a database using this library I get build errors. It solves by going to the code, on the error select correct project configuration and adding our plugin to the required bundles. When I close the database and open again, I have to do the same process and we have the same problem with all databases using this plugin.
I have tested starting Notes with the osgi console, but all reports as it is installed normal there.
When viewing in package explorer before fixing the bundle I can see that the plugin is missing from Plugin dependecies and gets added there when doing the fix.
I just installed a fresh Domino Designer for a new user now and upgraded him directly to FP7. He got exactly the same problem. Downgrading him to FP4 solves the problem.
Anyone having the same problem or have ideas to how it can be solved?

How can I debug a GWT project in Netbeans

I am developing a GWT project with Netbeans. When I debug it I always get the screen saying "Development Mode requires the GWT Developer Plugin". The problem is that my version of firefox is too recent to run that plugin. So what can I do?
Update to GWT 2.7, DevMode no longer requires a browser plugin (uses so-called "super dev mode" instead; where you debug in the browser rather than the IDE)
There's documentation for using the GWT Hosted Mode debugging in Netbeans, but you should be better able to use the newer GWT Super Dev Mode. To be able to set breakpoints in Netbeans though, you'd need to properly configure the source map support in Netbeans to map between the compiled JavaScript and the source Java files. I wasn't able to find an obvious reference for doing that with Netbeans.
The fun thing was that gwtproject.org made the sourcemaps part of the released site, and there was a tutorial to using them against their site to step you through how to setup your IDE... But again I didn't find that for Netbeans... Here's an example java source that's linked from gwtproject.org's JavaScript sourcemaps:
http://www.gwtproject.org/src/com/google/gwt/site/webapp/client/GWTProjectEntryPoint.java

Tomcat requires restart to take Jasper Reports changes

I'm using Jasper Reports as part of my Spring application. I deploy my application on a Tomcat 6 server through eclipse, so my project is a WTP project. The problem I have is that when I change a Jasper Reports file (jrxml) I need to restart the server in order to get the changes published. I already checked on the deployment folder and the .jrxml is updated, but for some reason the browser keeps getting the old report, I already cleaned the cache on the browser without luck.
Any ideas on how to solve this, is super annoying when doing development.
I suppose that you use ireport to change .jrxml, when you save changes in that, the eclipse will not be immediately notified that. So you need to fresh your project in eclipse, if necessary, clean and rebuild the project, and redeploy to tomcat.
Also, you can set eclipse to auto build project (Porject-->check Build automatically) and keep refresh the project. When you see the status 'Synchronized' of your project changes to 'Republic' in the 'Server' View, you can restart the server and see the changes. Press 'ctrl+f5' to fresh the page with refreshing all the cache.

IntelliJ forcing me to restart my app on every code change

I am on Grails 1.3.5 and IntelliJ 9.0.4 on a Mac with the latest JDK
I have the simplest of Grails projects: a helloworld that simply renders a string directly from a controller. I created it through the New Project wizard in IntelliJ. That went fine and IntelliJ picks up the correct grails SDK.
The problem is that IntelliJ makes me restart the app to see any changes I make to my code, (e.g. changing the "hello world" string.
If I edit the same controller with a text editor (eg TextMate) and run the app from the command line with grails run-app I do get hot code replacement, which is obviously what I want...
Anyone got a clue?
Some points:
I strongly recommend using the latest IntelliJ X EAP (http://confluence.jetbrains.net/display/IDEADEV/IDEA+X+EAP) since Grails support has been improved a lot since 9.0.x
If your IntelliJ config files got messed up, you can easily recreate them with 'grails integrate-with --intellij'. N.B. this recreates the config files in and old format and IntelliJ suggest to upgrade them - follow this procedure
Make sure your run configuration has uses at least the same memory settings than Grails uses when run from the command line, I'm fine with setting the 'VM parameters' field to '-XX:MaxPermSize=256m -Xmx1G'
If build problems occur (in rare cases the IntelliJ's internal compiler is more strict than plain Groovy), disable the 'Make' checkbox in the run config dialog.
If the problem persists, paste a screenshot of the run configuration you're using.

RAD (Rational Application Developer) -- Clean vs. Publish vs Restart

I am currently using the Spring 3.0 framework in a websphere 6.1 environment. The IDE I am using is RAD (Rational Application Developer) 7.5. I was working on a problem last night and I found that my code wasn't being 100% refreshed on the server after making a change in my workspace. My question is what is the difference from websphere's perspective between the following:
Restarting the entire server with an EAR installed
Cleaning an EAR within WebSphere
Clicking on the project and selecting publish
Do other Application Server / IDEs have the same type of syning issues when developing J2EE applications?
With RAD here's the default behavior. When you 'clean' it gets rid of the compiled objects and recreates them via a 'build all' then does a 'publish'. When you 'build' it builds anything it thinks is necessary then does a 'publish'. When you 'build all' it builds all objects then does a 'publish'.
When you (or your IDE via the commands above) does a 'publish' it takes all of your compiled objects and deploys them onto the server that you've setup for this project (via a hot swap if the server is running). Hot swaps work well for some things (such as JSPs) but not as well for other things (configuration files, EJBs, etc). If unable to do a hot swap correctly you need to bounce your server.
For example, if you have RAD setup to automatically build, your server is running, and you change an EJB what will happen is:
1. The EJB will be compiled
2. If the project is OK RAD will deploy your changes
3. The server will probably not be able to pickup your hotswapped changes so the server will continue to run the old code
When this happens bounce the server and the code will be picked-up.
Restarting the server will take some time but surely reload the files if they exist on the file system. I am not sure about calling Clean from the Servers view.
If you call Publish within Servers view, RAD will restart the application on the server. Thereby changes normally get picked up.
You need to understand what kind of change you did and see what WebSphere Application Server requires to load the change. If you scroll to the bottom of the linked help entry, you can see for each JavaEE module type a link to a document which describes what needs to be done to pickup the changes.
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/trun_app_hotupgrade.html
Otherwise, you should understand the whole lifecycle of what happens from the change to picking it up in the browser, e.g. change on the file, file gets compiled, prepare for deployment runs, classloader sees the change, notices that application needs to be restarted, user calls Republish to restart the application on the server, user refreshes the web page, Firefox shows within Firebug that the Last-Modified timestamp in HTTP header changed.
I am not sure what hot-swap means but when debugging the server, hot code method replacement can replace a class within the debugged server if there is no reference held to the class or the class structure has not changed.
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

Resources