install wave in a box

Install Wave in a box (Apache) on CentOS

Google had unveiled a real time messaging platform in 2009, and in April 2012 Google discontinued wave and released its source code to open source community. Apache Software Foundation consequently accepted Google Wave into its incubator program.
Apache Wave is a distributed, near-real-time, rich collaboration platform that allows users to work together in new and exciting ways. It allows for flexible modes of communication, blending chat, email and collaborative document editing into one seamless environment. In this post, I am going to talk about how you can install wave on your server, which is widely known as Wave in Box (WiB).

System Configuration:

I am using a Virtual Machine with following configuration:

  • CPU : 2 vCPU
  • RAM: 4 GB
  • OS : CentOS 6.2


To install Apache Wave, following applications should be installed first:

  • Java JDK – Either Sun/Oracle JDK or Open JDK both appear to work
  • ANT Build tool
  • Mercurial Distributed Source Control Package
  • Eclipse – The chosen IDE for Wave development
  • Subversion (To download wave)
  • MongoDB (optional)

Use Yum package manager to install all the pre-requisites

[root@centos ~]# yum install mercurial eclipse java-1.6.0-openjdk java-1.6.0-openjdk-devel subversion mongodb

Install Wave

1) Download wave source : Go to the root directory and use the following command to download the Apache wave source

[root@centos ~]# svn co
A    trunk/.classpath
A    trunk/
A    trunk/server-config.xml
A    trunk/proto_src
A    trunk/proto_src/org
A    trunk/proto_src/org/waveprotocol
A    trunk/proto_src/org/waveprotocol/protobuf
A    trunk/proto_src/org/waveprotocol/protobuf/
A    trunk/proto_src/org/waveprotocol/wave
..... (many things will download here)
A    trunk/war/static
A    trunk/war/static/document.png
A    trunk/war/static/logo.png
A    trunk/war/static/images
A    trunk/war/static/images/unknown.jpg
A    trunk/war/static/earth.png
A    trunk/war/static/microphone.png
A    trunk/war/static/wiab_screenshot_small.jpg
A    trunk/war/static/auth.css
A    trunk/war/static/favicon.ico
A    trunk/war/static/wiab_screenshot.jpg
A    trunk/wiab-logging.conf
Checked out revision 1523889.
[root@centos ~]#

2) The above mentioned command will create a directory named “trunk”. Go to the directory where you will see the following files:

[root@centos ~]# cd trunk/
[root@centos trunk]# ls
build-classpath.xml             build-proto.xml        jaas.config              NOTICE                   README.export-import  server.config.example             third_party
build-common.xml                build.xml              jsongadgets.json         platforms                RELEASE-NOTES         server-config.xml                 thumbnail_patterns
build-libraries-proto.xml       CHANGES                KEYS                    server.federation.config          tools
build-macros.xml        LICENSE                  prosody.cfg.lua.example         server.federation.config.example  war                DISCLAIMER                proto_src                run-server.bat        src                               wiab-logging.conf  doc                    migrate-attachments.xml  README                  test
[root@centos trunk]#

3) Build the source using “ ant ” command.

[root@centos wave-protocol]# ant
Buildfile: build.xml

    [mkdir] Created dir: /usr/local/src/wave-protocol/build/logs
     [echo] Logging to /usr/local/src/wave-protocol/build/logs/build_2013-09-13_06-16-41.log

    [mkdir] Created dir: /usr/local/src/wave-protocol/build/proto
    [mkdir] Created dir: /usr/local/src/wave-protocol/build/messages
    [mkdir] Created dir: /usr/local/src/wave-protocol/build/src
    [mkdir] Created dir: /usr/local/src/wave-protocol/build/test
    [mkdir] Created dir: /usr/local/src/wave-protocol/build/coverage
    [mkdir] Created dir: /usr/local/src/wave-protocol/dist
    [mkdir] Created dir: /usr/local/src/wave-protocol/build/staging
    [mkdir] Created dir: /usr/local/src/wave-protocol/build/dep
    [mkdir] Created dir: /usr/local/src/wave-protocol/test_out

This may display the error “ BUILD FAILED ” on running the compile-gwt as shown below.

     [java] Compiling module
     [java]    Computing all possible rebind results for 'org.waveprotocol.wave.client.wavepanel.impl.toolbar.EditorToolbarResources'
     [java]       Rebinding org.waveprotocol.wave.client.wavepanel.impl.toolbar.EditorToolbarResources
     [java]          Invoking generator
     [java]             Creating fields
     [java]                [ERROR] An error occurred while trying to write the image bundle.
     [java] javax.imageio.IIOException: Can't create output stream!
     [java]     at javax.imageio.ImageIO.write(
     [java]     at
     [java]     at

[java]     at
     [java]     at
     [java]    [ERROR] Errors in 'org/waveprotocol/wave/client/widget/button/icon/'
     [java]       [ERROR] Line 298: Failed to resolve 'org.waveprotocol.wave.client.widget.button.icon.IconButtonTemplate.Resources1' via deferred binding

/root/pro/trunk/build.xml:357: Java returned: 1

Total time: 1 minute 49 seconds
[root@centos trunk]#

Solution of this error has been provided at!msg/google-web-toolkit/tAC3kC9eius/DZOdOLhEC-cJ

So, to fix the issue add following in /etc/security/limits.conf It will increase the open file limit of the server to 2048.

*               soft    nofile          2048

Now compile the wave with ant again and you will get BUILD SUCCESSFUL message

      [jar] Building jar: /root/pro/trunk/dist/wave-in-a-box-server-0.4-incubating.jar
    [touch] Creating /root/pro/trunk/build/dep/dist-server


      [jar] Building jar: /root/pro/trunk/dist/wave-in-a-box-export-import-0.4-incubating.jar
    [touch] Creating /root/pro/trunk/build/dep/dist-export-import


Total time: 18 minutes 30 seconds
[root@centos trunk]#

4) Create Server Config file : After successful build, we will have to create server configuration file. Execute following command to create server.config file

[root@centos trunk]# ant -f server-config.xml
Buildfile: server-config.xml

    [mkdir] Created dir: /root/pro/trunk/_certificates
    [mkdir] Created dir: /root/pro/trunk/_attachments
    [mkdir] Created dir: /root/pro/trunk/_accounts
    [mkdir] Created dir: /root/pro/trunk/_deltas
    [mkdir] Created dir: /root/pro/trunk/_sessions

     [echo] Generating server.config
     [copy] Copying 1 file to /root/pro/trunk
     [copy] Copying 1 file to /root/pro/trunk

Total time: 0 seconds
[root@centos trunk]#

5) Open “server.config” file in your favorite editor (vi, nano or vim) and make the following changes:

http_frontend_public_address = IP_ADDRESS_OF SERVER:9898 or HOSTNAME:9898
http_websocket_public_address = IP_ADDRESS_OF SERVER:9898 or HOSTNAME:9898
http_websocket_presented_address = IP_ADDRESS_OF SERVER:9898 or HOSTNAME:9898
http_frontend_addresses = IP_ADDRESS_OF SERVER:9898 or HOSTNAME:9898

Save and Exit the file.

6) Now execute the “./” file.

[root@centos wave-protocol]# ./

If you don’t see any Java Exceptions or Error try to access wave using http://hostname:9898 or http://ipaddress:9898