Openfire 3.9.1_all.deb fails to install on fresh Ubuntu 12.04

The problem is located @ startup script of Openfire. Just after you get a

invoke-rc.d: initscript openfire, action “start” failed.

or

invoke-rc.d: initscript openfire, action “stop” failed.

go to /etc/init.d/openfire and remove the following line

/usr/lib/jvm/java-7-openjdk-amd64 \

Then run the installation again or just start using Openfire by typing /etc/init.d/openfire start