This page last changed on Feb 06, 2014 by macfly92.

Openremote : The Full Compilation

This howto describe how to run a full set of OpenRemote Framework in your local server. This include Beehive (Database), Designer, Controller and the Webconsole.
It was tested on Ubuntu 12.04 LTS, Ubuntu 13.10 and Debian 7 Wheezy in January 2014.

Prepare & Install

Install the following packages to your server.

sudo apt-get install subversion openjdk-6-jdk ant1.7 tomcat7 mysql-server

Stop Tomcat server for the moment.

sudo service tomcat7 stop
This document assume that you're starting in your user home directory (/home/<user> in this case). You MUST replace <user> with your actual username.

Download & unzip Google Web Toolkit 2.4.0
(https://code.google.com/p/google-web-toolkit/downloads/detail?name=gwt-2.4.0.zip&can=2&q=)

wget https://google-web-toolkit.googlecode.com/files/gwt-2.4.0.zip
unzip gwt-2.4.0.zip

Create the Download directory

mkdir openremote_sources
cd openremote_sources

Download sources

with the following commands :

  • Beehive :
    svn co http://svn.code.sf.net/p/openremote/code/tags/project/Beehive/Beehive_3_0_0_Beta1
  • Designer :
    svn co http://svn.code.sf.net/p/openremote/code/tags/snapshot/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly
  • Controller :
    svn co http://svn.code.sf.net/p/openremote/code/tags/snapshot/Controller_2_1_0_FM_SNAPSHOT-20130617
  • WebConsole :
    svn co http://svn.code.sf.net/p/openremote/code/tags/project/WebConsole/WebConsole_2_1_2

Create Logs directories and set permissions :

sudo mkdir -p /var/log/openremote/beehive
sudo mkdir -p /var/log/openremote/designer
sudo mkdir -p /var/log/openremote/controller
sudo chown -R tomcat7:tomcat7 /var/log/openremote

Beehive

cd Beehive_3_0_0_Beta1

Prepare database

Create DB :

mysql -u root -p 
mysql> CREATE DATABASE beehive DEFAULT CHARACTER SET utf8;
exit

Import sql template into the db :

mysql -u root -p beehive < ./sql/import.sql

Configurations

Here is the lines froms configs file you must modify with your text editor (nano in this case):

nano ./build.properties

tomcatconfig.dir=/var/lib/tomcat7/conf
tomcatlog.dir=/var/lib/tomcat7/logs
tomcat.home=/var/lib/tomcat7
# deploy.dir=/var/lib/tomcat7/webapps
nano ./config/config.properties

jdbc.url=jdbc:mysql://localhost:3306/beehive?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
jdbc.username = root
jdbc.password = yourDBpassword
work.dir = /var/lib/tomcat7/webapps/beehive
icons.dir = /var/lib/tomcat7/webapps/icons/    # Don't know what it is for ?!
nano ./config/log4j.properties

log4j.appender.errors.File = /var/log/openremote/beehive/errors.log
log4j.appender.errorshtml.File = /var/log/openremote/beehive/errors.html
log4j.appender.beehive.File = /var/log/openremote/beehive/beehive.log
log4j.appender.beehivehtml.File = /var/log/openremote/beehive/beehive.html
log4j.appender.hibernate.File = /var/log/openremote/beehive/hibernate.log
log4j.appender.hibernatehtml.File = /var/log/openremote/beehive/hibernate.html
log4j.appender.spring.File = /var/log/openremote/beehive/spring.log
log4j.appender.springhtml.File = /var/log/openremote/beehive/spring.html

Compilling

ant war

Copying the output .war file to Tomcat directory :

sudo cp ./output/beehive.war /var/lib/tomcat7/webapps/
sudo service tomcat7 start

You can test now with your web browser : http://IP_SERVER:8080/beehive

  • Tomcat LogFile : /var/log/tomcat7/catalina.out and other
  • OpenRemote LogFile : /var/log/openremote/beehive/*
The default Beehive admin GUI login is admin without password.
You can set this password in /var/lib/tomcat7/webapps/beehive/WEB-INF/classes/applicationContext-security.xml

Designer

cd /home/<user>/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/

Modified config files

nano ./build.properties

gwt.sdk = /home/<user>/gwt-2.4.0/
version = 2.14.0
build.date = 2014-01-16
version.name = HomeMade
# deploy.dir = /designer 
nano ./config/config.properties

jdbc.url=jdbc:mysql://localhost:3306/beehive?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
jdbc.username = root
jdbc.password = yourDBpassword
beehive.REST.Root.Url = http://IP_SERVER:8080/beehive/rest/
webapp.server.root = http://IP_SERVER:8080
mail.sender.host=
mail.sender.port=25 
mail.sender.username=
mail.sender.password=
mail.smtp.auth.on=false
nano ./config/log4j.properties 

log4j.appender.user-log.File = /var/log/openremote/designer/users.log
log4j.appender.cache-log.File = /var/log/openremote/designer/cache.log
log4j.appender.cache-debug-log.File = /var/log/openremote/designer/cache-debug.log
log4j.appender.state-log.File = /var/log/openremote/designer/state.log
log4j.appender.state-debug-log.File = /var/log/openremote/designer/state-debug.log
log4j.appender.save-log.File = /var/log/openremote/designer/save.log
log4j.appender.save-debug-log.File = /var/log/openremote/designer/save-debug.log
log4j.appender.restore-log.File = /var/log/openremote/designer/restore.log
log4j.appender.restore-debug-log.File = /var/log/openremote/designer/restore-debug.log
log4j.appender.mail-log.File = /var/log/openremote/designer/mail.log
log4j.appender.resourceservice-log.File = /var/log/openremote/designer/resourceservice.log
log4j.appender.resourceservice-debug-log.File = /var/log/openremote/designer/resourceservice-debug.log
log4j.appender.beehive-log.File = /var/log/openremote/designer/beehive.log
log4j.appender.beehive-debug-log.File = /var/log/openremote/designer/beehive-debug.log
log4j.appender.errors.File = /var/log/openremote/designer/errors.log
log4j.appender.designer.File = /var/log/openremote/designer/designer.log
log4j.appender.hibernate.File = /var/log/openremote/designer/hibernate.log
log4j.appender.spring.File = /var/log/openremote/designer/spring.log

Tomcat config

You must modifying Tomcat7 config to prevent JasperException (backward compatibility with Tomcat6), append this at the end of the file :

sudo nano /etc/tomcat7/catalina.properties  

org.apache.jasper.compiler.Parser.STRICT_WHITESPACE=false
sudo service tomcat7 restart

Compilling

ant war

Copy & rename :

sudo cp ./output/Designer-2.14.0-2014-01-16-HomeMade.war /var/lib/tomcat7/webapps/designer.war

You can test now with your web browser : http://IP_SERVER:8080/designer

  • Tomcat LogFile : /var/log/tomcat7/catalina.out and other
  • OpenRemote LogFile : /var/log/openremote/designer/*

Creating a new account

  • If you set the mail server : Create an account and just check your mailbox to click on the link to validate the user.
  • If not, it will say that the username is not available, but in fact, it was created but not validated. To validate it, modify into beehive database, table user and set "valid" to 1 onto your user line.
mysql -u root -p beehive 
mysql> UPDATE `user` SET `valid` = 1 WHERE `username` = 'yourUsername';
exit

Controller :

cd /home/<user>/openremote_sources/Controller_2_1_0_FM_SNAPSHOT-20130617/

Modified config files

nano ./config/config.properties

resource.path=webapps/controller
beehive.REST.Root.Url = http://IP_SERVER:8080/beehive/rest/
nano ./config/log4j.properties

log4j.appender.file.File = /var/log/openremote/controller/dev.log
log4j.appender.boot-log.File = /var/log/openremote/controller/boot.log
log4j.appender.knx-file.File = /var/log/openremote/controller/knx.log
log4j.appender.knx-debug-file.File = /var/log/openremote/controller/knx-debug.log
log4j.appender.onewire-file.File = /var/log/openremote/controller/onewire.log
log4j.appender.isy99-file.File = /var/log/openremote/controller/isy99.log
log4j.appender.telnet-file.File = /var/log/openremote/controller/telnet.log
log4j.appender.telnet-debug-file.File = /var/log/openremote/controller/telnet-debug.log
log4j.appender.zwave-file.File = /var/log/openremote/controller/zwave.log
log4j.appender.zwave-debug-file.File = /var/log/openremote/controller/zwave-debug.log
log4j.appender.http-file.File = /var/log/openremote/controller/http.log
log4j.appender.lagarto-file.File = /var/log/openremote/controller/lagarto.log
log4j.appender.vera-file.File = /var/log/openremote/controller/vera.log
log4j.appender.enocean-file.File = /var/log/openremote/controller/enocean.log
log4j.appender.xml-parser.File = /var/log/openremote/controller/xml-parser.log
log4j.appender.sensor-dev.File = /var/log/openremote/controller/sensors.log
The war destination is commented in build.xml (don't know why), so you must edit the build.xml file and remove the " <!-- " at line 406 (the line before <target name = "war"....... ) and the " --> " at line 428 just after the </target> label.

Compiling

ant war

Copy & rename :

sudo cp ./output/controller.war /var/lib/tomcat7/webapps/

You can test now with your web browser : http://IP_SERVER:8080/controller

  • Tomcat LogFile : /var/log/tomcat7/catalina.out and other
  • OpenRemote LogFile : /var/log/openremote/controller/*

WebConsole

cd /home/<user>/openremote_sources/WebConsole_2_1_2

Modified config files

nano ./build.properties

gwt.sdk=/home/<user>/gwt-2.4.0
	(Just add a comment to the line below.)
#deploy.dir=C:/Users/R5ch/AppData/Roaming/OpenRemoteInc/OpenRemoteController/controller/webapps

Compiling

ant war

Copy & rename :

sudo cp ./output/webconsole.war /var/lib/tomcat7/webapps/

You can test now with your web browser : http://IP_SERVER:8080/webconsole

  • Tomcat LogFile : /var/log/tomcat7/catalina.out and other

That's all, you can now enjoy a fully Openremote Setup on your local server !

  • Usefull links who help me to write this HowTo :

Beehive & Designer : http://www.openremote.org/pages/viewpage.action?pageId=19435267 http://www.openremote.org/pages/viewpage.action?pageId=22873567&focusedCommentId=22873623 http://www.openremote.org/display/forums/OpenRemote+to+control+Siemens+PLC+-+500+error+when+saving+design http://www.openremote.org/pages/viewpage.action?pageId=19440007

Controller : http://www.openremote.org/display/docs/Building+OpenRemote+2.0+Developer+Releases

Webconsole : http://www.openremote.org/display/docs/Building+OpenRemote+2.0+Web+Console

Can someone please confirm that the sources I used for this Howto are the right ones ?? (It is difficult to know ...)

Thanks you.

Posted by macfly92 at Jan 29, 2014 15:35

I agree very much that the situation with the software repository is a tragedy. It is very hard to know where to pull a stable and full-featured version. It would be extremely helpful if every half a year - year someone took responsibility for building a stable version and merge this source onto trunk. I think the project needs a configuration manager.

Posted by toesterdahl at Jan 30, 2014 06:58

Many thanks for this documentation. I hope this will inspire more community members to contribute!
I hope to find some time soon to give it a try on my Vbox Ubuntu.

Posted by pz1 at Jan 30, 2014 07:49

I do agree that it's very though to find your way around the repository if you want to have specific or latest features. It's something we're working on but takes time given the available resources.

However, there's a difference between stable and full-featured. If you want stable, the source under tags/project/... should give you what you're looking for (pick the latest non Pro tag and you should be fine). This however will mean you will not get the latest fixes / features until somebody from the core team reviews, integrates and performs basic QA on them so a new tag can be created.

Anyway, thanks a lot for this documentation, I think it'll reduce the pain of getting a local install quite a bit.

Posted by ebariaux at Jan 30, 2014 08:29

Beehive and WebConsole are OK.
For Designer, latest stable would be 2_13_9 tag, but that one is lacking quite a bit of features (such as web view).
For Controller, the latest stable is 2_0_2 tag, but the 2.1 integration branch should be fine also.

In general:

  • tag is stable and tested and what is used for binary release or deployment in the cloud
  • snapshot is some form of integration that reached a "supposed to be more or less stable" milestone but that has not yet gone through much testing
  • workspace is just that, branches for individual people working on a specific topic, so work in progress
Posted by ebariaux at Jan 30, 2014 08:33

Yes you're right, I've try to uses as much tags branch as I can and I forgot to mention why I took these sources :

My goal was to have these particulars features :

  • Web View in designer : For me the best way to easily improve features of openremote with web parts. (Javascript & other)
  • Vera protocol implementation : needed by my setup, and I love the new implementation way that save lot of Vera's resources and provide a immediate feedback.

Glad to bring a little pebble to this great project.

Posted by macfly92 at Jan 30, 2014 14:34

Thanks, the tags look fine.

I've created a snapshot for the Designer at http://svn.code.sf.net/p/openremote/code/tags/snapshot/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/ so you don't need to link to my workspace. It's better to use the tag, the workspace directory name is a temporary one.

The controller tag contains a webconsole binary that has been tested with that version of the controller. So the webconsole tag/compile is optional.

Posted by juha at Jan 31, 2014 15:34

Hello !

Thanks you very much for the Snapshot and for the tribute More "Static" now.

I tested it and it seem to compile and work perfectly, so I've updated the How To.

Best regards

Mac_Fly

Posted by macfly92 at Feb 04, 2014 00:05

Sorry, haven't been able to test yet. I thought it was a good idea to bring my Vbox Ubuntu 12.04 LTS uptodate. Apparantly not. Can't get it working again. Complaining about bios things. I'll keep trying

Posted by pz1 at Feb 04, 2014 15:35

Got stuck at download Beehive sources:

svn: access to 'http://svn.code.sf.net/p/openremote/code/tags/project/Beehive/Beehive_3_0_0_Beta1' forbidden
Posted by pz1 at Feb 04, 2014 19:24

Very strange, I just tested again right now and it work from my home...

Do you have the right to write to your destination folder ? Did you create the target folder with sudo command ? (maybe owned by root or something else...)

Can you create a empty file in this folder ? (try : touch test.txt)

Or maybe Firewall restriction in OUTPUT Chain ?

Sorry if those questions seem silly, I don't want to hurt your Linux knowledge Just trying to help.

Posted by macfly92 at Feb 04, 2014 20:11

Sorry, my *nix knowledge dates back to PDP 9 several decades ago. So I am a total noob.

  • I run this Ubunto in Vbox installed on Windows XP/
  • I did not make the directory with sudo, but I was able to create the test.txt as you instructed.
  • I did re-create the directory with sudo, but still got the same error.
  • I can get at the Beehive source with Firefox on my XP, but not with FF in my Ubuntu.

It might be a firewall issue, but at the moment I have no idea how to tackle that. Will look into that tomorrow.

edit: Found two problems-

  • there was a part missing in the string that I typed
  • the svn also needed a sudo (maybe because I created the diretory with a sudo?)
Posted by pz1 at Feb 04, 2014 22:04

Yes, you don't have to create the directory with sudo because in this case the owner of the directory will be root, so you will need to run svn with sudo to be able to write in it. And you don't need it because you create this directory in your user home.

But I thought this was maybe a mistake that cause your problem.

I can get at the Beehive source with Firefox on my XP, but not with FF in my Ubuntu.

Strange, this might be the culprit... You have Internet acces in Ubuntu FF ?
What kind of network configuration you used in VBox ? Bridge ? Nat ?

Posted by macfly92 at Feb 04, 2014 23:34

I have come to the point where I have to test the Beehive. Two things I noted:

  • The mysql installation prompts for a password
  • My virgin Ubuntu did not know vim. I did use nano. I suggest to change that in the instruction

Because I am on a virtual box I tried Beehive with http://localhost:8080/beehive. That failed. The errors.log said:

Beehive 3.0 Beta1 | 2014-02-05 10:14:06,944 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:06,945 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:06,945 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:06,945 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:06,946 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:51,659 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:51,660 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:51,660 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:51,660 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Beehive 3.0 Beta1 | 2014-02-05 10:14:51,661 WARN
[org.springframework.aop.framework.Cglib2AopProxy] : Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
Posted by pz1 at Feb 05, 2014 09:35

It works after a Ubuntu restart. A screen with title Beehive Database appears. Subtitle is Browse LIRC database

I'll continue with the next steps later today

Posted by pz1 at Feb 05, 2014 11:48

Glad to read it.

I've edited the "How To" to use nano instead of vim, to fit best with a fresh install and because is more user friendly.

Posted by macfly92 at Feb 05, 2014 11:58

This morning I have done the Designer section:

I have a few questions/remarks about the tuto

  • Why did you add the # deploy.dir = /designer to the bottom of ./build.properties (it was not in the original)
  • I assume that in ./config/config.properties the mail.xxxx.yyyy= are deliberately empty?

At first I was confused about the instruction cd /home/user/..., and also the user appearing in the configuration file itself. On my installation this user is pz
May I suggest to change this in something like cd /home/<user>/... to stress this has to be personalised? Would also apply for the blue section where you introduce "/home/user"

I did notice a few errors while compiling. Don't know if they hurt:

pz@pz-VUbuntu:~/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly$ ant war
Buildfile: build.xml

clean:

libs:
    [mkdir] Created dir: /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/output
    [mkdir] Created dir: /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/war/WEB-INF/lib
     [copy] Copying 56 files to /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/war/WEB-INF/lib

javac:
     [echo] --------------------------------------------------------------------
     [echo]  Compiling Java classes...
     [echo] --------------------------------------------------------------------
     [echo] 
    [mkdir] Created dir: /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/war/WEB-INF/classes
    [javac] Compiling 231 source files to /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/war/WEB-INF/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
     [copy] Copying 126 files to /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/war/WEB-INF/classes
     [copy] Copied 9 empty directories to 6 empty directories under /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/war/WEB-INF/classes

compile:
     [copy] Copying 1 file to /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/src/org/openremote/modeler
     [java] Feb 6, 2014 9:53:41 AM java.util.prefs.FileSystemPreferences$2 run
     [java] INFO: Created user preferences directory.
     [java] Compiling module org.openremote.modeler.Modeler
     [java]    Validating newly compiled units
     [java]       Ignored 2 units with compilation errors in first pass.
     [java] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
     [java]    Compiling 6 permutations
     [java]       Compiling permutation 0...
     [java]       Process output
     [java]          Compiling
     [java]             Compiling permutation 1...
     [java]          Compiling
     [java]             Compiling permutation 2...
     [java]       Compiling permutation 3...
     [java]          Compiling
     [java]             Compiling permutation 4...
     [java]          Compiling
     [java]             Compiling permutation 5...
     [java]    Compile of permutations succeeded
     [java] Linking into /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/war/modeler
     [java]    Link succeeded
     [java]    Compilation succeeded -- 2209.616s

war:
     [echo] --------------------------------------------------------------------
     [echo]  Packing Designer-2.14.0-2014-01-16-HomeMade...       
     [echo] --------------------------------------------------------------------
     [echo] 
     [copy] Copying 1432 files to /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/output
     [copy] Copied 135 empty directories to 6 empty directories under /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/output
     [copy] Copying 6 files to /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/output
      [zip] Building zip: /home/pz/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/output/Designer-2.14.0-2014-01-16-HomeMade.war

BUILD SUCCESSFUL
Total time: 38 minutes 41 seconds

Has indeed taken a long time, as this virtual machine is quite demanding on my old hardware...

Posted by pz1 at Feb 06, 2014 10:05

Again after the compilation, just as with Beehive, I had to restart Ubuntu to get http://localhost:8080/designer to properly open.

This is very strange... Maybe just a tomcat restart would be enough but not sure (sudo /etc/init.d/tomcat7 restart)... maybe related to Vbox but it is not a normal behavior.

Why did you add the # deploy.dir = /designer to the bottom of ./build.properties (it was not in the original)

In my original file, it was present, the line is just here to add a comment's character (#) before.
This line automatically pushes the compiled output to this directory, but I prefer to do it myself and to avoid right problems.
The fact to adding this line instead of modifying simply does nothing because it was commented by #.

I assume that in ./config/config.properties the mail.xxxx.yyyy= are deliberately empty?

At this point you have the choice to specify a Mail server or not. Without mail server, you must do a little trick to validate user in Beehive as I describe in the "How To".

At first I was confused about the instruction cd /home/user/..., and also the user appearing in the configuration file itself. On my installation this user is pz
May I suggest to change this in something like cd /home/<user>/... to stress this has to be personalised? Would also apply for the blue section where you introduce "/home/user"

You're right, <user> will be more remarkable. I changed it and updated the Blue section too to be more complete.

I did notice a few errors while compiling. Don't know if they hurt:

There are just few warnings because Openremote uses a deprecated API, but It should not bring problems.

BUILD SUCCESSFUL
Total time: 38 minutes 41 seconds

OMG, you are very patient !

Posted by macfly92 at Feb 06, 2014 18:00

OMG, you are very patient !

This machine is so slow that it has taken over two hours to complete the action. That's why I do take my time getting the whole thing done
I hope to finish the remainder in the weekend.

Thanks for the explanations. I was aware of some of them, but mentioned it just for the record.
I do appreciate the time you have spent on putting this together. So you deserve that someone seriously looks at it.

I think the Openremote team should copy your document to the public documentation.

Pieter

Posted by pz1 at Feb 06, 2014 18:26

Thanks you very much for the time you spent to test it.

If only I have more Java programing skill, I could help more with my bunch of ideas to improve this great project.

Posted by macfly92 at Feb 07, 2014 14:03

Trying to do this on Windows XP, but the deployment designer fails:


     [java] Compiling module org.openremote.modeler.Modeler
     [java]    Validating newly compiled units
     [java]       Ignored 2 units with compilation errors in first pass.
     [java] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
     [java]    Compiling 6 permutations
     [java] Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread
     [java]     at java.lang.Thread.start0(Native Method)
     [java]     at java.lang.Thread.start(Thread.java:640)
     [java]     at com.google.gwt.dev.PermutationWorkerFactory$Manager.doRun(PermutationWorkerFactory.java:132)
     [java]     at com.google.gwt.dev.PermutationWorkerFactory$Manager.run(PermutationWorkerFactory.java:104)
     [java]     at com.google.gwt.dev.PermutationWorkerFactory.compilePermutations(PermutationWorkerFactory.java:271)
     [java]     at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:207)
     [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:242)
     [java]     at com.google.gwt.dev.Compiler.run(Compiler.java:198)
     [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
     [java]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
     [java]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
     [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:177)
     [java]       Process output
     [java]          [ERROR] Communication error
     [java]          java.net.ConnectException: Connection refused: connect
     [java]             at java.net.PlainSocketImpl.socketConnect(Native Method)
     [java]             at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
     [java]             at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
     [java]             at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
     [java]             at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
     [java]             at java.net.Socket.connect(Socket.java:529)
     [java]             at java.net.Socket.connect(Socket.java:478)
     [java]             at java.net.Socket.<init>(Socket.java:375)
     [java]             at java.net.Socket.<init>(Socket.java:189)
     [java]             at com.google.gwt.dev.CompilePermsServer.run(CompilePermsServer.java:248)
     [java]             at com.google.gwt.dev.CompilePermsServer.main(CompilePermsServer.java:237)

BUILD FAILED
D:\FullOR\source\Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly\build.xml:185: Java returned: 1
        at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
        at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:217)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.Main.runBuild(Main.java:851)
        at org.apache.tools.ant.Main.startAnt(Main.java:235)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 minute 33 seconds

Posted by preston at Apr 29, 2014 11:45

Tried to deploy by HOW TO on OpenSuse 12 and 13, were compile errors. Deployed on Ubuntu 12.04, and moved .war files on Windows. Changed paths to logs folder in files config.properties, log4j.properties. Now It works on Windows.

Posted by preston at Apr 30, 2014 13:55

The error occurs when exporting "Export as zip" in the local Designer:

WARN [Cache] : Unable to close resource archive cache stream : Failed to replace existing Beehive archive 'C:\OR20140227\webapps\designer\modeler_tmp\1\openremote.zip' with 'C:\OR20140227\webapps\designer\modeler_tmp\1\openremote.zip.e2269fa2-9cf7-4113-ab33-b2917af839be.download'
java.io.IOException: Failed to replace existing Beehive archive 'C:\OR20140227\webapps\designer\modeler_tmp\1\openremote.zip' with 'C:\OR20140227\webapps\designer\modeler_tmp\1\openremote.zip.e2269fa2-9cf7-4113-ab33-b2917af839be.download'
	at org.openremote.modeler.cache.LocalFileCache$FileCacheWriteStream.afterClose(LocalFileCache.java:1710)
	at org.openremote.modeler.cache.CacheWriteStream.close(CacheWriteStream.java:88)
	at org.openremote.modeler.cache.LocalFileCache$FileCacheWriteStream.close(LocalFileCache.java:1734)
	at org.openremote.modeler.beehive.Beehive30API.downloadResources(Beehive30API.java:273)
	at org.openremote.modeler.cache.LocalFileCache.update(LocalFileCache.java:343)
	at org.openremote.modeler.server.UtilsController.exportFiles(UtilsController.java:111)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at org.openremote.modeler.server.BaseGWTSpringController.handleRequest(BaseGWTSpringController.java:67)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:859)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
	at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.codehaus.groovy.grails.plugins.gwt.GwtCacheControlFilter.doFilter(GwtCacheControlFilter.java:57)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.openremote.modeler.filter.UserTimeoutFilter.doFilter(UserTimeoutFilter.java:61)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Posted by preston at May 01, 2014 20:30

Did the C:\OR20140227\webapps\designer\modeler_tmp\1\ directory exist ??

Is there a openremote.zip inside ?

If yes to both, maybe try to delete the openremote.zip ?

Posted by macfly92 at May 06, 2014 11:42

Yes directory exist. Tried to delete openremote.zip same error.
In this case, the designer gives the wrong link to the archive localhost:8080/modeler_tmp/1/openremote.zip instead localhost:8080/designer/modeler_tmp/1/openremote.zip

Posted by preston at May 22, 2014 21:41

Dear MacFly,

Thank you very for putting this "How to" together. It made it very easy to install it. Great work.
Everything worked fine straight away apart from "exporting to zip file".

When I changed the following in config.properties for designer:

webapp.server.root = http://IP_SERVER:8080
to
webapp.server.root = http://IP_SERVER:8080/designer

then the "exporting to zip file" function worked as well.

Thank you very much for this

Gideon

Posted by gheinert at Aug 10, 2014 13:19

THis week I am trying to setup Designer on LINUX, but the deployment fail.

javac /home/abb/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/src/org/openremote/modeler/domain/component/UIComponent.java:185: error: name clash: createModels(Collection<? extends UIComponent>) in UIComponent and createModels(Collection<? extends BusinessEntity>) in BusinessEntity have the same erasure, yet neither hides the other
javac public static List<BeanModel> createModels(Collection<? extends UIComponent> list) {
javac ^
javac Note: Some input files use or override a deprecated API.
javac Note: Recompile with -Xlint:deprecation for details.
javac Note: Some input files use unchecked or unsafe operations.
javac Note: Recompile with -Xlint:unchecked for details.
javac 1 error

BUILD FAILED
/home/abb/openremote_sources/Designer_2_14_0_SNAPSHOT-2014-01-31_MacFly/build.xml:135: Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1174)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:930)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 4 seconds

Posted by wangjia at Nov 21, 2014 10:35

You need to use JDK 6 to compile the designer.

Posted by ebariaux at Nov 22, 2014 09:01

Excellent tutorial!

I had trouble with the "Create New Account" section. Your code did not work for me, but I found the following in another forum post and it worked:

mysql -u root -p beehive
mysql> update user set valid = true;
exit

Also, you mention that the war destination of the controller is commented out in the file build.xml, and you don't know why this is. My guess is that if you build the package with just "ant", you will end up using the tomcat is bundled with the source code. If you want to use the Tomcat from the Ubuntu repositories, then follow your instructions

Posted by desertdog at Jan 16, 2015 15:10

looking to update this to work on ubuntu 16.04 LTS Server in a virtualbox. Could i compile with the java version i have now, or does it need to be a specific version?

Posted by nickbrookes76 at Apr 24, 2016 21:38
Document generated by Confluence on Jun 05, 2016 09:36