This page last changed on Dec 16, 2010 by frbusu.

Hi all,

I have a problem with openremote controller. I have a set-up with Jung IPS100REG Gateway through ethernet connected directly with the controller. I am accessing the controller from an android device. My problem is that there is a connection to the gateway but nothing is being sent on the KNX line.

Yesterday, I made a calimero test (v2.0.4a) work and could control the test setup I have rigged up. I think the problem lies deep in the OR code where it is using the Calimero Library. I got the proof that the gateway is not the problem. I have tried viewing the code and building it from Eclipse but I cant compile it to see what is happening. I am thinking that the built files (already implemented) may be based on calimero 1.4 but cannot be sure. This is because in the beginning I had made some tests with calimero v1.4 and the I was getting the same result as in OR.

As regards to compiling the code, when I run build.xml as antbuild and run the tests this is the console output:

uildfile: C:\Users\franco\workspace\controller_profile_service\build.xml
clean:
delete Deleting directory C:\Users\franco\workspace\controller_profile_service\build
delete Deleting directory C:\Users\franco\workspace\controller_profile_service\output
delete Deleting directory C:\Users\franco\workspace\controller_profile_service\web\WEB-INF\classes
init:
mkdir Created dir: C:\Users\franco\workspace\controller_profile_service\build
mkdir Created dir: C:\Users\franco\workspace\controller_profile_service\output
copy Copying 18 files to C:\Users\franco\workspace\controller_profile_service\build\lib
copy Copying 5 files to C:\Users\franco\workspace\controller_profile_service\build\lib\native
compile:
echo --------------------------------------------------------------------
echo Compiling Java classes...
echo --------------------------------------------------------------------
mkdir Created dir: C:\Users\franco\workspace\controller_profile_service\build\classes
copy Copying 10 files to C:\Users\franco\workspace\controller_profile_service\build\classes
copy Copying 10 files to C:\Users\franco\workspace\controller_profile_service\web\WEB-INF\classes
copy Copying 8 files to C:\Users\franco\workspace\controller_profile_service\build\classes
javac Compiling 239 source files to C:\Users\franco\workspace\controller_profile_service\build\classes
javac Note: Some input files use unchecked or unsafe operations.
javac Note: Recompile with -Xlint:unchecked for details.
compile-test:
echo --------------------------------------------------------------------
echo Compiling test...
echo --------------------------------------------------------------------
javac Compiling 50 source files to C:\Users\franco\workspace\controller_profile_service\build\classes
run-test:
echo --------------------------------------------------------------------
echo Running test...
echo --------------------------------------------------------------------
java 2010-12-16 08:10:19.744:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
java 2010-12-16 08:10:19.807:INFO::jetty-6.1.22
java *** running jetty 'stop monitor' thread
java 2010-12-16 08:10:20.056:INFO::NO JSP Support for /controller, did not find org.apache.jasper.servlet.JspServlet
java log4j:ERROR setFile(null,true) call failed.
java java.io.FileNotFoundException: ..\logs\controller.log (The system cannot find the path specified)
java at java.io.FileOutputStream.openAppend(Native Method)
java at java.io.FileOutputStream.<init>(Unknown Source)
java at java.io.FileOutputStream.<init>(Unknown Source)
java at org.apache.log4j.FileAppender.setFile(FileAppender.java:282)
java at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:165)
java at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:161)
java at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
java at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
java at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
java at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
java at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
java at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
java at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
java at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
java at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
java at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
java at org.apache.log4j.Logger.getLogger(Logger.java:103)
java at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:283)
java at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
java at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
java at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java at java.lang.reflect.Constructor.newInstance(Unknown Source)
java at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040)
java at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:838)
java at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
java at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
java at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
java at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
java at org.springframework.context.support.ApplicationObjectSupport.<init>(ApplicationObjectSupport.java:50)
java at org.openremote.controller.statuscache.InitCachedStatusDBListener.<init>(InitCachedStatusDBListener.java:40)
java at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
java at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java at java.lang.reflect.Constructor.newInstance(Unknown Source)
java at java.lang.Class.newInstance0(Unknown Source)
java at java.lang.Class.newInstance(Unknown Source)
java at org.mortbay.jetty.webapp.WebXmlConfiguration.newListenerInstance(WebXmlConfiguration.java:650)
java at org.mortbay.jetty.webapp.WebXmlConfiguration.initListener(WebXmlConfiguration.java:631)
java at org.mortbay.jetty.webapp.WebXmlConfiguration.initWebXmlElement(WebXmlConfiguration.java:368)
java at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize(WebXmlConfiguration.java:289)
java at org.mortbay.jetty.webapp.WebXmlConfiguration.configure(WebXmlConfiguration.java:222)
java at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp(WebXmlConfiguration.java:180)
java at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1247)
java at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
java at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
java at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
java at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
java at org.mortbay.jetty.Server.doStart(Server.java:224)
java at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
java at org.openremote.controller.jetty.JettyStart.main(JettyStart.java:49)
java ------------- CALIMERO PATCH A -------------------------
java ------------- CALIMERO PATCH A -------------------------
java 2010-12-16 08:10:21.161:INFO:/controller:Loading Spring root WebApplicationContext
java ------------- CALIMERO PATCH A -------------------------
java ------------- CALIMERO PATCH A -------------------------
java 2010-12-16 08:10:21.534:INFO:/controller:Initializing Log4J from [C:\Users\franco\workspace\controller_profile_service\web\WEB-INF\classes\log4j.properties]
java log4j:ERROR setFile(null,true) call failed.
java java.io.FileNotFoundException: ..\logs\controller.log (The system cannot find the path specified)
java at java.io.FileOutputStream.openAppend(Native Method)
java at java.io.FileOutputStream.<init>(Unknown Source)
java at java.io.FileOutputStream.<init>(Unknown Source)
java at org.apache.log4j.FileAppender.setFile(FileAppender.java:282)
java at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:165)
java at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:161)
java at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
java at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
java at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
java at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
java at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
java at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
java at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
java at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:316)
java at org.apache.log4j.PropertyWatchdog.doOnChange(PropertyConfigurator.java:682)
java at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:88)
java at org.apache.log4j.helpers.FileWatchdog.<init>(FileWatchdog.java:57)
java at org.apache.log4j.PropertyWatchdog.<init>(PropertyConfigurator.java:674)
java at org.apache.log4j.PropertyConfigurator.configureAndWatch(PropertyConfigurator.java:382)
java at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:103)
java at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:143)
java at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:51)
java at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
java at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
java at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
java at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
java at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
java at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
java at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
java at org.mortbay.jetty.Server.doStart(Server.java:224)
java at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
java at org.openremote.controller.jetty.JettyStart.main(JettyStart.java:49)
java 2010-12-16 08:10:21.641:INFO:/controller:Loading WebApplicationContext for Spring FrameworkServlet 'dispatcherServlet'
java 2010-12-16 08:10:21.760:INFO::Started SocketConnector@0.0.0.0:8090
testsuite:
mkdir Created dir: C:\Users\franco\workspace\controller_profile_service\build\junit_report
junit Running org.openremote.controller.suite.AllTests
java Controller2010-12-16 08:10:24,744 ERROR [31908613@qtp-9042915-10] org.openremote.controller.rest.StatusCommandRESTServlet.doPost(92) | CommandException occurs
java org.openremote.controller.exception.NoSuchComponentException: No such component in status cache : 1001
java at org.openremote.controller.statuscache.StatusCache.queryStatuses(StatusCache.java:96)
java at org.openremote.controller.service.impl.StatusCacheServiceImpl.queryStatuses(StatusCacheServiceImpl.java:20)
java at org.openremote.controller.service.impl.StatusCommandServiceImpl.readFromCache(StatusCommandServiceImpl.java:99)
java at org.openremote.controller.rest.StatusCommandRESTServlet.doPost(StatusCommandRESTServlet.java:89)
java at org.openremote.controller.rest.StatusCommandRESTServlet.doGet(StatusCommandRESTServlet.java:66)
java at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
java at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
java at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
java at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
java at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
java at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
java at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
java at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
java at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
java at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
java at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
java at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
java at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
java at org.mortbay.jetty.Server.handle(Server.java:326)
java at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
java at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
java at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
java at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
java at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
java at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
java at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
java Controller2010-12-16 08:10:24,753 ERROR [2889719@qtp-9042915-11] org.openremote.controller.rest.StatusCommandRESTServlet.doPost(92) | CommandException occurs
java org.openremote.controller.exception.NoSuchComponentException: No such component in status cache : 1002
java at org.openremote.controller.statuscache.StatusCache.queryStatuses(StatusCache.java:96)
java at org.openremote.controller.service.impl.StatusCacheServiceImpl.queryStatuses(StatusCacheServiceImpl.java:20)
java at org.openremote.controller.service.impl.StatusCommandServiceImpl.readFromCache(StatusCommandServiceImpl.java:99)
java at org.openremote.controller.rest.StatusCommandRESTServlet.doPost(StatusCommandRESTServlet.java:89)
java at org.openremote.controller.rest.StatusCommandRESTServlet.doGet(StatusCommandRESTServlet.java:66)
java at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
java at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
java at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
java at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
java at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
java at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
java at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
java at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
java at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
java at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
java at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
java at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
java at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
java at org.mortbay.jetty.Server.handle(Server.java:326)
java at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
java at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
java at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
java at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
java at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
java at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
java at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
junit Tests run: 170, Failures: 3, Errors: 0, Time elapsed: 21.178 sec
junit Test org.openremote.controller.suite.AllTests FAILED
junitreport Processing C:\Users\franco\workspace\controller_profile_service\build\junit_report\TESTS-TestSuites.xml to C:\Users\franco\AppData\Local\Temp\null1060344261
junitreport Loading stylesheet jar:file:/C:/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
junitreport Transform time: 2257ms
junitreport Deleting: C:\Users\franco\AppData\Local\Temp\null1060344261
java *** sending jetty stop request
java 2010-12-16 08:10:46.688:INFO:/controller:Closing WebApplicationContext of Spring FrameworkServlet 'dispatcherServlet'
java 2010-12-16 08:10:46.689:INFO:/controller:Shutting down Log4J
java 2010-12-16 08:10:46.692:INFO:/controller:Closing Spring root WebApplicationContext
java log4j:WARN No appenders could be found for logger (org.quartz.core.QuartzScheduler).
java log4j:WARN Please initialize the log4j system properly.
java *** stopping jetty embedded server
BUILD SUCCESSFUL
Total time: 34 seconds

Is it possible to obtain some help setting up eclipse properly? Can anyone tell me what the problem might be? Thanks

Hi Franco,

The test suite is very unclean in terms of its output (the errors on Jetty logging needs to be cleaned up), but it did actually execute ok:

...

Tests run: 170, Failures: 3, Errors: 0, Time elapsed: 21.178 sec

...

Which is the expected result.

Posted by juha at Dec 16, 2010 20:10

Let me know if you have other questions regarding compiling – sometimes I get so used to things I might not realize some things are not obvious.

(I'm not an Eclipse user though so don't expect help there!)

Posted by juha at Dec 16, 2010 20:14

Hi Juha,

What type of Java IDE are you using? Because I'm not too familiar with Eclipse as well. If possible I'd like to debug it and see what is happening in the code.

Posted by frbusu at Dec 17, 2010 11:39

I use IntelliJ IDEA, the full version requires a paid license, but I think they have a limited free version available now too.

However, even with IntelliJ, I don't use the various build/project integration features – I just use the editor for refactoring, code highlights and automatic error detection.

For compiling, building and testing I run the ANT scripts directly from bash shell.

Posted by juha at Dec 17, 2010 13:08

Hi Juha,

I managed to make the calimero part of the code work in C# (I'm more familiar to this language). I tested the android emulator again...since now I knew what bytes had to be sent for connection and tunnel requests. I used wireshark to check the sent and received bytes. When I check what UDP message is being given from client to server,everything is correct, however, the last byte in the CEMI Frame (APCI/data byte) is being sent as 0x00 instead of 0x80 (to switch off). Is there a reason why this might occur...because I have a feeling that the solution is staring me in the face. Thanks

Regards,
Franco

Posted by frbusu at Dec 22, 2010 10:42

Can't really say, I can't follow exactly what you're doing from this description.

0x00 would be sent on group read request for example, although not for write request.

So without knowing more about what the frame looks like, can't really answer.

Posted by juha at Dec 22, 2010 16:16
Document generated by Confluence on Jun 05, 2016 09:30