Skip navigation

Tag Archives: vaadin

I have spent the past month, attempting to learn my way around the Vaadin framework. Kind of sucks that its Eclipse plug-in is broken, right out of the box. As soon as I installed it, I started getting this error whenever I would launch my IDE.

Could not start XULRunner(version 1.9 or higher required)

Could not start XULRunner(version 1.9 or higher required)

I didn’t, and still don’t, know what the hell XULRunner is. Some library from the Mozilla Developers Network that is currently at version 19.0.2, as of this writing. I think the good folks at Vaadin have abandoned this project; version 1.9 is ancient!

Software rot aside, if you’d like to get rid of this annoying error dialog, you will need to add XULRunner 1.9 to Eclipse’s file path. Here’s how I did it:

  1. Close Eclipse, if it is open
  2. Download XULRunner 1.9.2 from MDN
  3. Install XULRunner by following the instructions here for your operating system.
    1. Be sure to perform the registration step
  4. Open eclipse.ini or your Eclipse shortcut (Windows) and add the following line
    1. -Dorg.eclipse.swt.browser.XULRunnerPath=C:<path><to>xulrunner-1.9.x.x
    2. Here, you can see how I added the line to my Eclipse shortcut link
    3. Adding XULRunner to Eclipse's classpath via shortcut

      Adding XULRunner to Eclipse’s classpath via shortcut

    4. Click ‘OK’ or Save the ‘eclipse.ini’ file
  5. Start Eclipse

Hopefully, at this point, the error will be gone and you can move on to being disappointed by the Vaadin Visual Designer, distraction-free!

So I mentioned yesterday that I am attempting to make my first Vaadin app using Eclipse and the Liferay IDE plugin. This post is a word of warning to those trying to do the same thing. The default Liferay Vaadin project is broken; it will not deploy.

To get started, I simply used the Eclipse, “New Liferay Portlet” wizard. So the project skeleton gets build without a hitch. The trouble happens when I attempt to deploy this app in its current default configuration.

Check this out…

INFO: 15:50:43,968 INFO [PluginPackageUtil:1099] Reading plugin package for NewVaadinProject-portlet
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/transaction/PlatformTransactionManager
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/transaction/PlatformTransactionManager
INFO: 15:50:48,083 INFO [PluginPackageUtil:1099] Reading plugin package for NewVaadinProject-portlet
INFO: 15:50:48,245 INFO [PortletHotDeployListener:614] Registering portlets for NewVaadinProject-portlet
SEVERE: =================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
INFO: 15:50:48,284 ERROR [PortletBagFactory:313] javax.portlet.PortletException: Application not specified in portlet parameters
javax.portlet.PortletException: Application not specified in portlet parameters
 at com.vaadin.terminal.gwt.server.ApplicationPortlet2.init(ApplicationPortlet2.java:40)
 at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:246)
 at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:216)
...removed for clarity...
 at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:209)
 at java.util.TimerThread.mainLoop(Timer.java:512)
 at java.util.TimerThread.run(Timer.java:462)
SEVERE: =================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
INFO: 15:50:48,286 ERROR [HotDeployUtil:114] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for NewVaadinProject-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for NewVaadinProject-portlet
 at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:118)
 at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:111)
...removed for clarity...
 at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:209)
 at java.util.TimerThread.mainLoop(Timer.java:512)
 at java.util.TimerThread.run(Timer.java:462)
Caused by: javax.portlet.PortletException: Application not specified in portlet parameters
 at com.vaadin.terminal.gwt.server.ApplicationPortlet2.init(ApplicationPortlet2.java:40)
 at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:246)
 at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:216)
 at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:139)
 at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:40)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortletApp(PortletHotDeployListener.java:590)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:309)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:115)
 ... 38 more
INFO: WEB0671: Loading application [NewVaadinProject-portlet] at [/NewVaadinProject-portlet]
INFO: NewVaadinProject-portlet was successfully deployed in 4,452 milliseconds.
INFO: [AutoDeploy] Successfully autodeployed : C:DEVbundlesliferay-portal-6.1.0-ce-ga1glassfish-3.1.1domainsdomain1autodeployNewVaadinProject-portlet.war.

A basic, right-out-of-the-box project will not deploy correctly?! Wow, a bang-up job guys!

Fortunately, I didn’t have to spend too much time debugging this, as a coworker of mine is a few months further into his Vaadin training than I am and was able to find a solution rather quickly.

The problem lies in the default configuration of the portlet.xml file. Open the file and change the following line:

<?xml version="1.0"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
 <portlet>
 <portlet-name>CreateUser</portlet-name>
 <display-name>CreateUser</display-name>
 <portlet-class>com.vaadin.terminal.gwt.server.ApplicationPortlet2</portlet-class>
 <init-param>
 <name>view-template</name> should be <name>application</name>
 <value>CreateUser.CreateUserApplication</value>
 </init-param>
 ...
 </portlet>
 </portlet-app>

Just run the Ant deploy target after this change, and the project should auto-deploy successfully!

I started a new job this week.

It is with a startup company here in Greenville, SC called Green Cloud Technologies. I am super-excited to be here and away from that crap company Windstream! I’ve had a few changes in my career growth as a result of this job change. First, they didn’t have any equipment for me when I started so I am currently using my own PC to work on. This is the same PC that I was teaching myself Linux on. However, I couldn’t very well learn and do everything needed for my job AND learn to do it on Linux at the same time. I’d never get anything done. So I purchased a copy of Windows 7, 8 Gb of DDR2 RAM and brought my PC to work.

That said, my focus on learning has shifted. I am no longer concerned with learning Linux, as all the tech at Green Cloud is new to me. Liferay, Glassfish, Vaadin, Git,…as I said before, I don’t have the mental bandwidth (or equipment now) to learn to use those and Linux. So I guess I’m probably going to start posting stuff on here about my findings with my new technology stack.

I’m currently working on an entry on how I got my Eclipse environment set up with Liferay. If you are using the Liferay IDE plugin with anything other than the Tomcat bundle, you are in for some headaches.