Saturday, October 16, 2010

Vaadin application not refreshing in Eclipse internal browser - and how to fix it

Yesterday I was frustrated because at some point, after making a change in my Vaadin-Scala RIA web application, the application won't refresh at all!

I tried:

  • refreshing the browser (tens of times!)
  • appending a query string at the end of URL
  • republishing the app (whether automatically, incrementally, Full Republish)
  • restarting the server
  • running the server in Debug mode... nothing works!

Nothing works.

I almost suspected it's because of Scala, because Scala IDE Plugin for Eclipse 3.6 Helios is still not in final version. I could have just used Java but...

There's no compilation error whatsoever. I didn't even use Maven (yet). So what could go wrong?

Then I opened the application using Google Chrome and it shows the latest version of my application!

It turns out that something is wrong with Eclipse XUL Browser (internal browser) and caching.

So the fix/workaround turned out to be very simple: don't use Eclipse XUL Browser (internal browser)... use a real external browser (Firefox, Google Chrome, Opera, whatever as long as it's not internal browser)!