This page last changed on Jul 30, 2012 by czruska.

I am trying to build a controller from connection manager code branch, but despite all my efforts it will not work.
I checked out building code from "http://openremote.org/display/docs/Building+OpenRemote+2.0+Developer+Releases", Tools and Runtime from "http://openremote.svn.sourceforge.net/svnroot/openremote/tags/OpenRemote_Boss_2_0_0_Alpha8".
I ran the build process as guided at "http://openremote.org/display/docs/Building+OpenRemote+2.0+Developer+Releases". The controller will start up, can be found on localhost:8080/controller, but it will not carry out any commands.
When running a unit test on the controller, upon completion I get the following (at the very end):

junit Tests run: 170, Failures: 3, Errors: 0, Time elapsed: 52,406 sec
junit Test org.openremote.controller.suite.AllTests FAILED
junitreport Processing C:\ORmanager\ORman\build\junit_report\TESTS-TestSuites.
xml to C:\Users\Sony\AppData\Local\Temp\null1455717331
junitreport Loading stylesheet jar:file:/C:/ORmanager/ORman/Tools/apache-ant-1
.7.0/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-f
rames.xsl
junitreport Transform time: 1773ms
junitreport Deleting: C:\Users\Sony\AppData\Local\Temp\null1455717331
java *** sending jetty stop request
java *** stopping jetty embedded server
java 2012-07-30 18:13:14.353:INFO:/controller:Closing WebApplicationConte
xt of Spring FrameworkServlet 'dispatcherServlet'
java 2012-07-30 18:13:14.355:INFO:/controller:Shutting down Log4J
java 2012-07-30 18:13:14.361:INFO:/controller:Closing Spring root WebAppl
icationContext
java log4j:WARN No appenders could be found for logger (org.quartz.core.Q
uartzScheduler).
java log4j:WARN Please initialize the log4j system properly.

BUILD SUCCESSFUL
Total time: 1 minute 25 seconds

As a result of this the server starts up, but as mentioned above will not function.
I checked the same procedure with code from "https://openremote.svn.sourceforge.net/svnroot/openremote/tags/OpenRemote_Boss_2_0_0_Alpha8/Controller_2_0_0_Alpha11/", but got the same result.
I think I must be doing something wrong, I would appreciate help in solving this problem!

Hi,
the latest controller branch which is available as controller 2.0 on sourceforge is this one: https://openremote.svn.sourceforge.net/svnroot/openremote/tags/project/Controller/Controller_2_0_0/.
You compiled a pretty old version.

If you were able to compile and the controller deploys, there is no problem with it. Can you access http://<ip>:8080/controller and see the controller sync page?
If that shows up the controller is running correct. You need to go to the online designer and create your design. Check the webpage for that.

Posted by mredeker at Jul 31, 2012 08:24

Thank You Marcus for the response, I checked out the latest branch as you said, tried to build it using Tools from "http://openremote.svn.sourceforge.net/svnroot/openremote/trunk/Tools/" (revision 6574), but build will not work.
Trying with ant war, I get this:

C:\>cd ORnew\Tools\apache-ant-1.8.2\bin
C:\ORnew\Tools\apache-ant-1.8.2\bin>ant war -find build.xml
Searching for build.xml ...
Buildfile: C:\ORnew\build.xml

BUILD FAILED
Target "war" does not exist in the project "controller".

Total time: 0 seconds

Just running ant I get this:

C:\ORnew\Tools\apache-ant-1.8.2\bin>ant -find build.xml
Searching for build.xml ...
Buildfile: C:\ORnew\build.xml

clean:

init:
mkdir Created dir: C:\ORnew\build
mkdir Created dir: C:\ORnew\build\testcontainer
mkdir Created dir: C:\ORnew\build\testcontainer\war
mkdir Created dir: C:\ORnew\build\testcontainer\webapps
mkdir Created dir: C:\ORnew\build\testcontainer\logs
mkdir Created dir: C:\ORnew\build\testcontainer\logs\dev
mkdir Created dir: C:\ORnew\build\testcontainer\logs\knx
mkdir Created dir: C:\ORnew\build\testcontainer\logs\onewire
mkdir Created dir: C:\ORnew\build\testcontainer\logs\isy99
mkdir Created dir: C:\ORnew\output
copy Copying 31 files to C:\ORnew\build\lib
copy Copying 5 files to C:\ORnew\build\lib\native

compile:
echo --------------------------------------------------------------------

echo Compiling project classes (full)...
echo --------------------------------------------------------------------

echo
mkdir Created dir: C:\ORnew\build\classes
copy Copying 12 files to C:\ORnew\build\classes
copy Copying 12 files to C:\ORnew\web\WEB-INF\classes
copy Copying 32 files to C:\ORnew\build\classes
javac C:\ORnew\build.xml:269: warning: 'includeantruntime' was not set, de
faulting to build.sysclasspath=last; set to false for repeatable builds
javac Compiling 341 source files to C:\ORnew\build\classes
javac C:\ORnew\src\org\openremote\controller\protocol\knx\datatype\Float2B
yte.java:95: error: unmappable character for encoding Cp1250
javac // EXAMPLE 315 ┬ČÔ?×C is noted as 31500
javac ^
javac 1 error

BUILD FAILED
C:\ORnew\build.xml:269: Compile failed; see the compiler error output for detail
s.

Total time: 2 seconds

C:\ORnew\Tools\apache-ant-1.8.2\bin>

What am I doing wrong? If I succeed I would actually like to build the connection manager version (Controller_2_0_0_Alpha11_Manager/)

Posted by czruska at Jul 31, 2012 10:58

Just ant with no target should be fine.
What system are you building on? Looks like an locale issue.

Posted by mredeker at Jul 31, 2012 11:12

Does not work with just ant no target, result is as below:

Microsoft Windows [verziószám: 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Minden jog fenntartva.

C:\Users\User>cd\

C:\>cd ORnew\Tools\apache-ant-1.8.2\bin

C:\ORnew\Tools\apache-ant-1.8.2\bin>ant
Buildfile: build.xml does not exist!
Build failed

C:\ORnew>c:\ornew\Tools\apache-ant-1.8.2\bin\ant
Buildfile: C:\ORnew\build.xml

clean:
delete Deleting directory C:\ORnew\build
delete Deleting directory C:\ORnew\output
delete Deleting directory C:\ORnew\web\WEB-INF\classes

init:
mkdir Created dir: C:\ORnew\build
mkdir Created dir: C:\ORnew\build\testcontainer
mkdir Created dir: C:\ORnew\build\testcontainer\war
mkdir Created dir: C:\ORnew\build\testcontainer\webapps
mkdir Created dir: C:\ORnew\build\testcontainer\logs
mkdir Created dir: C:\ORnew\build\testcontainer\logs\dev
mkdir Created dir: C:\ORnew\build\testcontainer\logs\knx
mkdir Created dir: C:\ORnew\build\testcontainer\logs\onewire
mkdir Created dir: C:\ORnew\build\testcontainer\logs\isy99
mkdir Created dir: C:\ORnew\output
copy Copying 31 files to C:\ORnew\build\lib
copy Copying 5 files to C:\ORnew\build\lib\native

compile:
echo --------------------------------------------------------------------

echo Compiling project classes (full)...
echo --------------------------------------------------------------------

echo
mkdir Created dir: C:\ORnew\build\classes
copy Copying 12 files to C:\ORnew\build\classes
copy Copying 12 files to C:\ORnew\web\WEB-INF\classes
copy Copying 32 files to C:\ORnew\build\classes
javac C:\ORnew\build.xml:269: warning: 'includeantruntime' was not set, de
faulting to build.sysclasspath=last; set to false for repeatable builds
javac Compiling 341 source files to C:\ORnew\build\classes
javac C:\ORnew\src\org\openremote\controller\protocol\knx\datatype\Float2B
yte.java:95: error: unmappable character for encoding Cp1250
javac // EXAMPLE 315 ┬ČÔ?×C is noted as 31500
javac ^
javac 1 error

BUILD FAILED
C:\ORnew\build.xml:269: Compile failed; see the compiler error output for detail
s.

Total time: 2 seconds

System I am using is Windows 7, but I also tried it on a Windows XP sytem on another PC.
The original openremote controller is running smoothly on both above versions on both PCs.
Could there be any further requirements in setting environment variables apart from JAVA_HOME in order to build?

Posted by czruska at Jul 31, 2012 11:49

Try and add encoding="utf-8" to the javac command in build.xml.

Posted by mredeker at Jul 31, 2012 11:56

Partial success, I rebooted the PC after changing all international and keyboard stuff to US/English, and the controller built up from your proposed code smoothly, creating a zip file in the output directory. It started up, deployed perfectly.
I immediately tried building the Controller_2_0_0_Alpha11_Manager version, checked out from http://openremote.svn.sourceforge.net/svnroot/openremote/branches/feature/Controller_2_0_0_Alpha11_Manager/, the same way, but it still has problems with log4j as the test-run states

junit Tests run: 170, Failures: 3, Errors: 0, Time elapsed: 36,748 sec
junit Test org.openremote.controller.suite.AllTests FAILED
junitreport Processing C:\ORGWnew\build\junit_report\TESTS-TestSuites.xml to C
:\Users\User\AppData\Local\Temp\null1816276348
junitreport Loading stylesheet jar:file:/C:/ORGWnew/Tools/apache-ant-1.8.2/lib
/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xs
l
junitreport Transform time: 619ms
junitreport Deleting: C:\Users\User\AppData\Local\Temp\null1816276348
java *** sending jetty stop request
java 2012-07-31 14:50:29.519:INFO:/controller:Closing WebApplicationConte
xt of Spring FrameworkServlet 'dispatcherServlet'
java 2012-07-31 14:50:29.519:INFO:/controller:Shutting down Log4J
java 2012-07-31 14:50:29.521:INFO:/controller:Closing Spring root WebAppl
icationContext
java log4j:WARN No appenders could be found for logger (org.quartz.core.Q
uartzScheduler).
java log4j:WARN Please initialize the log4j system properly.
java *** stopping jetty embedded server

BUILD SUCCESSFUL
Total time: 51 seconds

The server will start up, my console will see it, download panels, but no commands at all (IR,Telnet,TCIP)will be forwarded by it.

I wonder if this code is also an old version, if so how can I build it, or is there an updated version of it, as this is exactly what I need (telnet session not to close after each command is sent).

Thank You for your help!

Posted by czruska at Jul 31, 2012 14:00

Just adding the encoding line might have been enough to compile. Maybe you can test that and don't change all internationl stuff to US/English. If I know that the encoding itself is enough, I will add that to the build file.

The log4j error during the test does not cause any problems when running.

If you can deploy your design and then the commands are not executed correct, it must be something else. Do you see any errors in the log files?

I don't know the code in that branch but looking at the source the telnet command still closes the connection after each command.

Posted by mredeker at Jul 31, 2012 14:11

Ok, setted back international stuff, added "encoding=utf-8" to "Compiling project classes (full)..." in the build.xml file and it built up successfuly. It seems this solves possible character mapping issues.

Back to the Alpha11_Manager version, according to the thread (http://www.openremote.org/display/forums/Connection+Manager+Code+Branch)it keeps the telnet connection open and does not close it after each command.

Can you please check and see if it can be built up to a fully functioning controller somehow, and if its too complicated would it be possible that you build it up for me and upload it somewhere.

Thanks again

Posted by czruska at Jul 31, 2012 15:00

Thanks for confirming, that the encoding parameter works.
I will try to get some information about that connection manager stuff.

Posted by mredeker at Jul 31, 2012 15:40

OK, waiting for it.

My problem with the basic controller Telnet operation is that it always closes the session, and because of this I have to login to my server each and every time (I can only remove the password requirement) This results in a considerable time lag between the commands. My each command would look like:

login:|word|OK|command (I get a longer script with OK at the end after login: is answered)

I don't know, but probably because of this the command execution takes at least 1 full second, whereas from the command window it is instant as it should be. I was thinking maybe this is caused by the default 1 sec read timeout.

This is why I would like to test the connection manager version, as it claims to keep the session open constantly.

Posted by czruska at Jul 31, 2012 16:39

Hi Marcus!

I've been experimenting with the connection manager version and now it works without any problem!
I realized that if there is a TCPIP command in the devices, it causes the a system failure, and because of this no commands at all are excepted and executed. However if the TCPIP command is changed to a Telnet type of command everything works smoothly. In other words even normal IR commands (iTach WF2IR) need to be given as a Telnet commands. In this case the other actual Telnet commands contact the Telnet server, connect to it with a first Login credential command, and from here on the session will not close after each command. All commands now reach the server instantly, and the IR commands also function without a problem.

Thank You for your cooperation and help!

Posted by czruska at Aug 01, 2012 10:29

Thanks for the feedback.
We will see to integrate the stuff into one of the upcoming versions.

Posted by mredeker at Aug 01, 2012 11:31

Hi Marcus!
Sorry for bothering you again, but I have another question.
How come that in the designer I cannot define a port no. neither for TCP/IP nor for Telnet that has any of the following numbers: 206-209, 216-219, 226-229, 236-239, 246-249.
In other words any IP No. containing any of these numbers above, placed anywhere will be rejected by the designer.
192.168.1.216 will be rejected, while 192.168.1.215 will be accepted.

Posted by czruska at Aug 07, 2012 14:26

There is a regular expression to test that the port is a number. The expression is "\d+" which should match any number.
Do you have a detailed error message?

Posted by mredeker at Aug 07, 2012 14:36

Since I am in the designer, and this happens when trying to reate a new command, the only error message I get is a red exclamation mark next to the port no. input line, when entering a port no. with any of the aforerementioned numbers in it. If I try to continue (submit an continue)nothing will happen (because of the error). However if I change the "not wanted" numbers, the exclamation warning sign disappears immediately and life is back to normal.

Posted by czruska at Aug 07, 2012 15:16

I have to quickly correct myself, this happens not in the port input, but in the IP Address input. As I originaly indicated this is a problem with the IP No. definition in case of a creating a new command.

Posted by czruska at Aug 07, 2012 15:19

Ok, that means the regex to verify the IP address is wrong. This could very well be the case since the regex is quite complex.
We will have to see what we can do. Thanks for reporting the issue.

Posted by mredeker at Aug 07, 2012 16:00

Will deploy an updated configuration today.

Posted by juha at Aug 10, 2012 12:04

Changes are now online. Let us know if you have any more IP address issues.

Posted by juha at Aug 10, 2012 13:33
Document generated by Confluence on Jun 05, 2016 09:31