This page last changed on Dec 19, 2012 by jwhitmore.

I've been away from this for a while other stuff got in the way. Previously I wrote a new protocol into the Controller for USB based boards but I wanted to add the protocol into the Designer. To do that I was trying to run the designer locally so that I could make changes and test them out. That's where I fell flat on my face.

Could anybody point me in the direction of running the Designer locally to design a new protocol and test? There are instruction on adding a protocol but not on how to test it locally.

Thanks for any help

You need a local MySQL database, the designer source and the beehive source.
Calling "ant war" on designer and beehive project should give you 2 war files.
You can deploy those in tomcat and later have to edit the config.properties to point to your database.

For Beehive this should be the latest src: http://openremote.svn.sourceforge.net/viewvc/openremote/tags/project/Beehive/Beehive_3_0_0_Beta1/
And the Designer: http://openremote.svn.sourceforge.net/viewvc/openremote/tags/project/Designer/Designer_2_13_6_Rosemary_20120920/

To have support for a protocol in the designer you just need to create a xml file and drop that into the protocols folder.

Posted by mredeker at Dec 20, 2012 08:08

Thanks Marcus,
I'm afraid that it's not plain sailing here. I was trying to checkout code but I keep getting a relocate error from Subversion. Been a while since I used it but searching the Internet for a reason and all I can get is that it's a server error. I assume that it's not a server error as other people would be seeing the problem.

svn list http://openremote.svn.sourceforge.net/viewvc/openremote/workspace

svn: Repository moved temporarily to 'http://openremote.svn.sourceforge.net/viewvc/openremote/workspace'; please relocate

Could you help me out with this svn issue?

Posted by johnwhitmore at Dec 21, 2012 05:25

Sorry, the URL I gave you is for the webviewer.
The main repository URL is: https://openremote.svn.sourceforge.net/svnroot/openremote

Posted by mredeker at Dec 21, 2012 08:03

Thanks for all your help Marcus. Unfortunately I have one final question which should keep me busy for the holidays.

I worked through the readme file for Beehive, created a mysql database and user, populated the database, built beehive to obtain the war file. I have a huge hole in my knowledge as I've no idea what to do with the war file. So my question is do I need a book on Tomcat? Or should I be looking at more general intro to web apps or something?

One other thing the readme suggested editing the quartz timer file but I looked at it and was not sure what was meant to be edited and why, so I left it.

Posted by johnwhitmore at Dec 21, 2012 20:35

The war file should just be dropped into the webapps folder of a tomcat installation.
It then will be unpacked and a folder with the same name will appear. Within that folder you can edit the file "WEB-INF/classes/config.properties" to change your db setting.
I don't know of any quartz timer. That can probably be ignored.

Posted by mredeker at Dec 21, 2012 20:51

Thanks Marcus and Merry Christmas to you.
I did change my DB settings and put the resulting war in my tomcat install but I wasn't getting anything out of 127.0.0.1:8080 and I'd half expected something which was why I asked the question. I'll find out where the tomcat log messages are going to and see if that sheds any light on it.

My Beehive install might actually be working correctly, but I've no evidence that anything is happening at all, so was looking for reassurance. Given that beehive is a DB I should go ahead and install the Designer and see if it complains about it. Wanted to verify the step but I'll move on.

Posted by johnwhitmore at Dec 24, 2012 20:03

Once beehive is deployed you should see a page at localhost:8080/beehive.

Posted by mredeker at Dec 24, 2012 23:53

Sorry Marcus, it's all coming back to me now why I got the Controller done but never contributed it back to OR. The Designer side is a bit of a learning curve. I know all you have to do is add an xml file but it's getting to that point.

Chasing an error from my beehive install so I'll chase that down and get back on track then:

03-Jan-2013 12:40:46 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
03-Jan-2013 12:40:46 org.apache.catalina.core.StandardContext start
SEVERE: Context [/beehive] startup failed due to previous errors
03-Jan-2013 12:40:46 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/beehive] registered the JDBC driver com.mysql.jdbc.Driver but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
03-Jan-2013 12:40:46 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/beehive] appears to have started a thread named Timer\-5 but has failed to stop it. This is very likely to create a memory leak.
03-Jan-2013 12:40:46 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/beehive] appears to have started a thread named Timer\-6 but has failed to stop it. This is very likely to create a memory leak.
03-Jan-2013 12:40:46 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/beehive] appears to have started a thread named Timer\-7 but has failed to stop it. This is very likely to create a memory leak.
03-Jan-2013 12:40:47 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
03-Jan-2013 12:40:47 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
03-Jan-2013 12:40:47 org.apache.catalina.startup.Catalina start
INFO: Server startup in 54165 ms

Posted by johnwhitmore at Jan 03, 2013 12:45

Still chasing errors in beehive and:

SEVERE: The web application [/beehive] appears to have started a thread named DefaultQuartzScheduler\_Worker\-4 but has failed to stop it. This is very likely to create a memory leak.

Quartz?

Does anybody have a virtual image for Virtual Box which would let me develop, add an xml file to the Designer? Better yet could a catch all protocol be added that sends four text fields? In the case of the HW I'm working on I simply need:

  • USB Port
  • Output Board
  • Output Number
  • Command
Posted by johnwhitmore at Jan 04, 2013 00:06

The memory leak messages should not do anything.
For your protocol just take a xml file from the protocols folder in the designer, copy and modify to your needs.
That's pretty much it.

Posted by mredeker at Jan 04, 2013 08:05

Got it Marcus, well got Beehive working. The readme file called for a database named beehive but the default config file called for a database named "beehive_3_0_0_alpha5"

Not being sure what meant what in the config file, it was the URL for the database, I had to enable the logs and go through them to work out where I was at fault.

So I have Beehive up and running I'll now have a go with the Designer.

Posted by johnwhitmore at Jan 04, 2013 13:35

My build of the Designer seems happy now but I'm not sure what the local web address is for the Designer page? I've been trying to get 127.0.0.1:8080/designer but that's not getting me anything?

Posted by johnwhitmore at Jan 04, 2013 17:15

Getting there. 127.0.0.1:8080/modeler From the war file. My next problem is the configuration of the svn server which is configured to use /srv/svn/repos so I'm getting an error:

Beehive 3.0 Beta1 | 2013-01-05 01:03:08,809 ERROR
org.openremote.beehive.api.service.impl.SVNDelegateServiceImpl : Unable to create local repository 'file:///home/john/programming/openremote/johnwhitmore/svn-repos/lirc/trunk', please install svn server to sync with LIRC.

I've been trying to resolve the above error and I think part of my problem is that I've got Beehive configured incorrectly. There is one point in the readme instructions:

c) set "work.dir" parameter value to the folder which is the workspace of the beehive, including svn-repos, workCopy and syncHistory directory.

and I'm not sure which Directory this should be set to. I have no "workCopy" Directory in the file system so I'm not sure if this should be the directory of the Beehive source I checked out of SVN or if it's the Beehive directory created by TomCat for it's work. I have got the svn server now installed but Beehive is still not happy. I wonder should I have created a "svn-repos", "workCopy" and "syncHostory" Directories somewhere?

Posted by johnwhitmore at Jan 05, 2013 01:07
Document generated by Confluence on Jun 05, 2016 09:29