This page last changed on May 07, 2013 by juha.

Hello, I have a cubieboard http://linux-sunxi.org/Cubieboard and Debian Wheezy on it.

I installed all binaries and libraries from tutorial http://www.panstamp.com/announcements/openremotejoinsthepanstampecosystem , so I can control relay from lagarto-SWAP server. My problem with OpenRemote, relay worked only if I use HTTP GET commands. Like this "http://127.0.0.1:8001/values/?id=255.11.0&value=TOGGLE"

<command id="102" protocol="http">
<property name="method" value="GET" />
<property name="url" value="http://127.0.0.1:8001/values/?id=255.11.0&value=TOGGLE" />
<property name="name" value="http_toggle" />
</command>

When I use command with panStamp lagarto protocol:

<command id="100" protocol="lagarto">
<property name="epid" value="255.11.0" />
<property name="value" value="ON" />
<property name="network" value="Lagarto-SWAP" />
<property name="name" value="Relay_on" />
</command>

I have message "Send Requet Error" "Error in controller. Please check controller log"

root@debian:/home/OpenRemote/bin# ./openremote.sh run

Using CATALINA_BASE:   /home/OpenRemote
Using CATALINA_HOME:   /home/OpenRemote
Using CATALINA_TMPDIR: /home/OpenRemote/temp
Using JRE_HOME:       /opt/java/jdk1.8.0

---- Logging ----------------------------------------------------------

 Console (stdout) threshold [CONTROLLER_CONSOLE_THRESHOLD]: INFO

 System logs:

   - Controller startup log [CONTROLLER_STARTUP_LOG_LEVEL]: DEBUG
     

-----------------------------------------------------------------------
May 07, 2013 12:58:14 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/OpenRemote/webapps/controller/WEB-INF/lib/native
May 07, 2013 12:58:14 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 07, 2013 12:58:14 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3468 ms
May 07, 2013 12:58:15 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 07, 2013 12:58:15 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
May 07, 2013 12:58:15 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive webconsole.war
May 07, 2013 12:58:20 AM org.openremote.controller.bootstrap.Startup redirectJULtoLog4j
INFO: Initialized JUL to LOG4J Redirector.
INFO 2013-05-07 00:58:26,893 : 

--------------------------------------------------------------------

  DEPLOYING NEW CONTROLLER RUNTIME...

--------------------------------------------------------------------

INFO 2013-05-07 00:58:27,963 : No rule definitions found in '/home/OpenRemote/webapps/controller/rules'.
INFO 2013-05-07 00:58:27,965 : Initialized event processor : Drools Rule Engine
INFO 2013-05-07 00:58:27,982 : Startup complete.
INFO 2013-05-07 00:58:27,989 : Controller Definition File Watcher for Default Deployer started.
May 07, 2013 12:58:29 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 07, 2013 12:58:29 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 15265 ms
INFO 2013-05-07 00:59:22,306 : 

--------------------------------------------------------------------

  UNDEPLOYING CURRENT CONTROLLER RUNTIME...

--------------------------------------------------------------------

INFO 2013-05-07 00:59:22,309 : Stopped event processor : Drools Rule Engine
INFO 2013-05-07 00:59:22,342 : Shutdown complete.
INFO 2013-05-07 00:59:22,348 : 

--------------------------------------------------------------------

  DEPLOYING NEW CONTROLLER RUNTIME...

--------------------------------------------------------------------

INFO 2013-05-07 00:59:22,976 : No rule definitions found in '/home/OpenRemote/webapps/controller/rules'.
INFO 2013-05-07 00:59:22,979 : Initialized event processor : Drools Rule Engine
INFO 2013-05-07 00:59:23,044 : Startup complete.
ERROR [HTTP-Thread-2]: Error in handling REST API response: null
java.lang.NullPointerException
	at org.openremote.controller.protocol.lagarto.LagartoCommand.httpRequest(LagartoCommand.java:129)
	at org.openremote.controller.protocol.lagarto.LagartoCommand.send(LagartoCommand.java:114)
	at org.openremote.controller.service.impl.ControlCommandServiceImpl.trigger(ControlCommandServiceImpl.java:95)
	at org.openremote.controller.rest.ControlCommandRESTServlet.handleRequest(ControlCommandRESTServlet.java:77)
	at org.openremote.controller.rest.RESTAPI.doPost(RESTAPI.java:159)
	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.openremote.controller.rest.support.json.JSONCallbackFilter.doFilter(JSONCallbackFilter.java:63)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
	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.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)

Maybe problem with Java? At this moment I install "Java SE 8 for ARM", before I try "IcedTea6" and had the same error.
PS: Sorry for my English


LagartoCommand.class (application/octet-stream)

Hmm judging by where it fails in the code, it could be a race condition.

Posted by juha at May 07, 2013 20:02

Can you try replacing in your installation the file OpenRemote/webapps/controller/WEB-INF/classes/org/openremote/controller/protocol/lagarto/LagartoCommand.class with this new file: LagartoCommand.class, and see if it has any impact?

Posted by juha at May 07, 2013 20:14

I replace this file, now error occurs only when I reload webconsole. (before when I press the buttons)

--------------------------------------------------------------------

  DEPLOYING NEW CONTROLLER RUNTIME...

--------------------------------------------------------------------

INFO 2013-05-08 00:20:57,013 : No rule definitions found in '/home/OpenRemote/webapps/controller/rules'.
INFO 2013-05-08 00:20:57,016 : Initialized event processor : Drools Rule Engine
INFO 2013-05-08 00:20:57,043 : Startup complete.
INFO 2013-05-08 00:20:57,046 : Controller Definition File Watcher for Default Deployer started.
May 08, 2013 12:20:58 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 08, 2013 12:20:59 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14450 ms
ERROR [HTTP-Thread-5]: failed to extract panel.xml for panel : No such Panel :NAME = 
org.openremote.controller.exception.NoSuchPanelException: No such Panel :NAME = 
	at org.openremote.controller.service.impl.ProfileServiceImpl.getProfileDocumentByPanelName(ProfileServiceImpl.java:192)
	at org.openremote.controller.service.impl.ProfileServiceImpl.getProfileByPanelName(ProfileServiceImpl.java:91)
	at org.openremote.controller.rest.FindPanelByID.handleRequest(FindPanelByID.java:81)
	at org.openremote.controller.rest.RESTAPI.doPost(RESTAPI.java:159)
	at org.openremote.controller.rest.RESTAPI.doGet(RESTAPI.java:112)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	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.openremote.controller.rest.support.json.JSONCallbackFilter.doFilter(JSONCallbackFilter.java:63)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
	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.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Posted by batias at May 08, 2013 01:35

The last errors shouldn't be related to panstamps.

Posted by juha at May 09, 2013 09:45

Looks like a problem with a Lagarto, I found at dev.log this message appears:
"2013-05-09 13:40:36,983 DEBUG HTTP\-Thread\-10: Lagarto client not yet initialized (potential race between executable commandand event listener initialization)..."

Posted by batias at May 09, 2013 14:58

This message is from a patch I sent to you earlier. It is not an error, it is a debug message.

Posted by juha at May 09, 2013 15:51

Thanks Juha and Mikhail. I'll do my best to fix this bug for the next release of OpenRemote.

Posted by dberenguer at May 14, 2013 22:54
Document generated by Confluence on Jun 05, 2016 09:41