Tuesday, May 11, 2010

Using Vaadin with Google App Engine

Under the current situation of misalignment between Google and Vaadin in creating a project in Eclipse, to develop Vaadin applications that would work with Google Plugin for Eclipse, a few minor hurdles need to be jumped over. This tutorial outlines the simple steps that need to be taken to create a Vaadin project in Eclipse that runs on Google App Engine development environment.

Presuming the Google Plugin for Eclipse is already installed, follow the instructions found in http://vaadin.com/eclipse to install the Vaadin Plugin for Eclipse using [Help - Install new software] in Eclipse.

Have you ever wondered why [Install new software] item is found under [Help] menu in Eclipse? The help item is not instructions on how to install new software but actually installing new software. What are the nerds at Eclipse/IBM up to with this deliberate choice of menu structure? Difference between a nerd and a geek: a geek insists on being meticulously precise, whereas a nerd insists on being meticulously imprecise.

After restarting Eclipse (Do you really need to restart Eclipse? Could we just apply changes?), create a new Vaadin project.  You will find Vaadin section listed under the [New] menu item. If it is not within the first page of menu items, you would have to find it under [Other ...].
  • Give the project a name. Let's say you called it Zebra.
  • Set [Vaadin:Deployment configuration] to Google App Engine Servlet.
  • Choose the Vaadin version, or click download to download the latest one. This step may not be necessary because it is one of the causes of the project needing repair - but we have to fill in something no matter how erroneous, to be allowed to complete defining the project.
  • Then complete the rest as best as you can, before clicking [Finish].

Repairing the Vaadin project to use Google App Engine as development server
With a Vaadin project called Zebra,
  • Right-click on project Zebra for [Properties] item.
  • At [Java Build Path - Libraries tab], delete WebApps (under which is found the vaadin jar).
  • At [Google - App Engine] enable [Use Google App Engine] check box and fill the rest the best you could.

And again, voila Viola!

If you don't make these changes, you would encounter ClassNotFoundException when you try to launch the Vaadin Application. The reason being, there is disagreement of some sort between Vaadin and Google plugins on how plugins should build and dispense library references. Vaadin believes we should stick to the Eclipse standard and apparently Google has no vested interest in doing so.


You might also wish to allow OOPHM (browser plug-in debugging code server) to be used with debugging the project:
  • Delete the library references to vaadin downloaded gwt-user.jar and gwt-dev.jar files.
  • Create a new library reference for the vaadin.version.jar found in the WEB-INF/lib folder. If the jar is not found there, place a copy of the jar file there before making the library reference.
  • At [Google - Web Toolkit] enable [Use Google Web Toolkit] check box and fill the rest the best you could.
You should now be able to create a new Vaadin Application in the project from the context menu.

Do you have trouble correlating the term Out of Process Hosted Mode (OOPHM) with anything meaningful? Out of  what process? I think it is JVM-Based Browser Plug-in Hosting the Client-Side Debugging Co-Operand (of the Server-Side Debugger), which would be JVMBBPHtCSCO(oSSD). That's a mouthful. Hence, regardless being less precise, it is easier to say with a punch "Oophm!" Like someone had just punched you at the tummy.



9 comments:

  1. when I run the step: "Repairing the Vaadin project to use the Google App Engine development server" comes the following error:

    "java.lang.NoClassDefFoundError: com / google / appengine / tools / enhancer / Enhance
    Caused by: java.lang.ClassNotFoundException: com.google.appengine.tools.enhancer.Enhance
    at java.net.URLClassLoader $ 1.run (Unknown Source)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.net.URLClassLoader.findClass (Unknown Source)
    at java.lang.ClassLoader.loadClass (Unknown Source)
    at sun.misc.Launcher $ AppClassLoader.loadClass (Unknown Source)
    at java.lang.ClassLoader.loadClass (Unknown Source)
    Exception in thread "main" "

    Any ideas?

    ReplyDelete
  2. The computer will be shutting down on its own with a scheduled tasked. You do not want the timer to just kill power to the computer while it is running. Download and un zip the file. (Michael Kors Saddle Bag Black)

    Sam Parnia of New York University School of Medicine, these patients watching doctors and nurses working; they describe having awareness of full conversations, of visual things that were going on, that would otherwise not be known to them. File this one underThings You Didn Know You Should Worry About But Don Want To Find Out The Hard Way. Warning: This one is very graphic.. (Michael Kors Logo Bag Black)

    Coach White Bag, However, as always, the story is more complex than it first appears. Budleigh Salterton pebbles occur not only in the Chesil Beach but also in the Portland Raised Beach (or beaches). Occasional specimens are found on the land in the Weymouth area (Arkell, 1947) , and some, surprisingly, are found on the beach at the back of Lulworth Cove (particularly in the north eastern part).

    Shortly after Hearst's death in 1951, the property was donated by the then Hearst Corporation and is now managed by the California State Parks as part of the San Simeon State Historical Monument. Located off of Highway 1 about halfway between San Francisco and Los Angeles near the city of San Simeon, the majority of visitors must take Highway 1 (Pacific Coast Highway), then Highway 46 towards Cambria to Hearst Castle Road, as a significant portion of Highway 1 from the north is currently inaccessible. While no lodging is available at Hearst Castle, a number of hotels can be found in San Simeon and Cambria, such as Blue Dolphin Inn, Cavalier Oceanfront Resort and the Morgan.. (Lime Green And Black Michael Kors Purse)

    As the weekend approaches, running enthusiasts in Northern Ireland will be looking forward to one of the provinces favourite road races, the Laganside 10k, which is hosted by North Belfast Harriers and this year, sponsored by Pure Running. Aside from the Laganside 10k (and associated children races), there will also be events in Killyleagh, Belfast, Silent Valley, Ballinderry and Derry/Londonderry. Northern Ireland athletes will also compete in Chamonix (France), Janske Lazne (Czech Republic), Offaly (Ireland) and Bedford (England).. (Black Michael Kors Bag Tj Maxx)

    ReplyDelete