This page last changed on Oct 25, 2013 by waddy72.

Hi I'm very new to Openremote and I've hit a problem.

I've set up a basic russound panel initially to just switch on and off one zone as atest.

When I come to synchronise the panel on line I get the following error:
"An attempt was made to access service context before it was initialized."

I think its because the controller is not running on my machine. When I run openremote I get the following log:

Using JRE_HOME: c:\Program Files\Java\jdk1.6.0_45

=============================================================================

Application initialization failed:
Error creating bean with name 'controlCommandService' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'deployer' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deployer' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'schema20' while setting constructor argument with key 2.0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schema20' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'sensorBuilder' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sensorBuilder' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'commandFactory' while setting bean property 'commandFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandFactory' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'russoundCommandBuilder' while setting constructor argument with key russound; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'russoundCommandBuilder' defined in class path resource applicationContext.xml: Unsatisfied dependency expressed through constructor argument with index 1 of type int: Could not convert constructor argument value [] to required type int: Failed to convert value of type java.lang.String to required type int; nested exception is java.lang.NumberFormatException: For input string: ""

=============================================================================

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controlCommandService' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'deployer' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deployer' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'schema20' while setting constructor argument with key 2.0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schema20' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'sensorBuilder' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sensorBuilder' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'commandFactory' while setting bean property 'commandFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandFactory' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'russoundCommandBuilder' while setting constructor argument with key russound; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'russoundCommandBuilder' defined in class path resource applicationContext.xml: Unsatisfied dependency expressed through constructor argument with index 1 of type int: Could not convert constructor argument value [] to required type int: Failed to convert value of type java.lang.String to required type int; nested exception is java.lang.NumberFormatException: For input string: ""
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deployer' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'schema20' while setting constructor argument with key 2.0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schema20' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'sensorBuilder' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sensorBuilder' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'commandFactory' while setting bean property 'commandFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandFactory' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'russoundCommandBuilder' while setting constructor argument with key russound; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'russoundCommandBuilder' defined in class path resource applicationContext.xml: Unsatisfied dependency expressed through constructor argument with index 1 of type int: Could not convert constructor argument value [] to required type int: Failed to convert value of type java.lang.String to required type int; nested exception is java.lang.NumberFormatException: For input string: ""
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schema20' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'sensorBuilder' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sensorBuilder' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'commandFactory' while setting bean property 'commandFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandFactory' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'russoundCommandBuilder' while setting constructor argument with key russound; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'russoundCommandBuilder' defined in class path resource applicationContext.xml: Unsatisfied dependency expressed through constructor argument with index 1 of type int: Could not convert constructor argument value [] to required type int: Failed to convert value of type java.lang.String to required type int; nested exception is java.lang.NumberFormatException: For input string: ""
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sensorBuilder' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'commandFactory' while setting bean property 'commandFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandFactory' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'russoundCommandBuilder' while setting constructor argument with key russound; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'russoundCommandBuilder' defined in class path resource applicationContext.xml: Unsatisfied dependency expressed through constructor argument with index 1 of type int: Could not convert constructor argument value [] to required type int: Failed to convert value of type java.lang.String to required type int; nested exception is java.lang.NumberFormatException: For input string: ""
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandFactory' defined in class path resource applicationContext.xml: Cannot resolve reference to bean 'russoundCommandBuilder' while setting constructor argument with key russound; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'russoundCommandBuilder' defined in class path resource applicationContext.xml: Unsatisfied dependency expressed through constructor argument with index 1 of type int: Could not convert constructor argument value [] to required type int: Failed to convert value of type java.lang.String to required type int; nested exception is java.lang.NumberFormatException: For input string: ""
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'russoundCommandBuilder' defined in class path resource applicationContext.xml: Unsatisfied dependency expressed through constructor argument with index 1 of type int: Could not convert constructor argument value [] to required type int: Failed to convert value of type java.lang.String to required type int; nested exception is java.lang.NumberFormatException: For input string: ""
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:375)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:299)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:140)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:332)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:97)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:332)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:97)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:299)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:140)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:332)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:97)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:332)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:97)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
at org.openremote.controller.spring.SpringContext.<init>(SpringContext.java:74)
at org.openremote.controller.spring.SpringContext.<init>(SpringContext.java:69)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at org.openremote.controller.bootstrap.Startup.loadServiceContext(Startup.java:81)
at org.openremote.controller.bootstrap.servlet.ServletStartup.initializeServiceContext(ServletStartup.java:190)
at org.openremote.controller.bootstrap.servlet.ServletStartup.contextInitialized(ServletStartup.java:109)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

I can see there is an initialisation problem but I don't know where to start to fix it.

Can anyone help?

Thanks

There seems to be an error/incompatibility in the XML configuration of applicationContext.xml, and the Java classes compiled with the controller.

Can you tell what version of Controller you are currently using?

Posted by juha at Oct 29, 2013 00:37

Thanks for the response

I have version 2.1.0 the snapshot date is 17th june 2013.

Posted by waddy72 at Oct 29, 2013 19:13

Anyone?

Posted by waddy72 at Nov 01, 2013 14:48

Sorry I haven't had a chance to look at this issue yet. Thanks for reminding though.

Indeed if anyone else has the time to get to it first, would be appreciated.

Posted by juha at Nov 01, 2013 19:20

Can anyone give me any suggestions?

Posted by waddy72 at Nov 07, 2013 11:52

Looks like a wrong setting for one of the russound attributes.
What did you put in the file config.properties in webapps/controller/WEB-INF/classes folder?
There are some russound configs in there.

Posted by mredeker at Nov 08, 2013 09:40

This is the Russound section of the config file:

# RUSSOUND CONFIGURATION:
# 
# Configuration related to Russound amplifier

##
# IP-Address of the RS232 Serial gateway if used. The gateway has to support TCP mode
russound.ip=192.168.0.100

##
# Port of RS232 Serial gateway to use
russound.port=

##
# KeypadId IF NOT 0x70 (default). Specify as Hex without leading "0x" eg. "71"
russound.keypadId=

##
# If the Russound is connected directly to a serial port of controller use device name here eg. /dev/ttyS0
# If a serial device is specified the IP settings are ignored
russound.serialDevice=COM1

##
# If a pollingInterval is given, that means an extra thread is started which polls the device for the status
# valid values: 5000, 5s, 1m, 2h  (no letter=milliseconds, s=seconds, m=minute, h=hour)
russound.statusPollingInterval=3s

#
#------------------------------------------------ end of Russound --------

Thanks
Paul

Posted by waddy72 at Nov 08, 2013 11:42

Sorry about the poor formatting but hopefully you can still read it.

Posted by waddy72 at Nov 08, 2013 11:43

Please specify a russound.port even if you use serial.
Just define something like russound.port=1234

Posted by mredeker at Nov 10, 2013 22:44

Great - that fixed the problem I was having.

I've now hit another issue:
The controller seems to be running OK. I have successfully synched online and I can access my test panel (single power on/off toggle for zone 1).
When I press the button I get "Command failed - error in controller. Please check the controller log".

The log looks like it can't initialise a 32 bit .dll as I'm running Windows 7 64 bit. Is there a 64 bit version available? If not can I run it on a 64 bit machine?

This is a short extract from the log:

ERROR 2013-11-11 20:28:35,408 : Creating sensor failed. Error : C:\Users\admin\Downloads\OpenRemote\webapps\controller\WEB-INF\lib\native\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
XML Element : <sensor xmlns="http://www.openremote.org" id="279" name="Zone1 Power" type="switch">
<include type="command" ref="32" />
<state name="on" />
<state name="off" />
</sensor>
java.lang.UnsatisfiedLinkError: C:\Users\admin\Downloads\OpenRemote\webapps\controller\WEB-INF\lib\native\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:123)

Posted by waddy72 at Nov 11, 2013 20:46

Yes, it's the RXTX native lib that needs to be updated.
There was some info about it in anothe forum thread.

Posted by mredeker at Nov 11, 2013 22:24

Thanks Marcus - that's done the trick.

I'm up and running.

Much appreciated.

Posted by waddy72 at Nov 12, 2013 09:08

Hi,

I'm having a similar problem. I was using the 1.6.0 version of Java originally. So removed it and installed the 8 Build b126 1.8.0 developer version from Oracle. I'm trying to run OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17.

I'm trying to get the DSC system working. I've made all the changes I think I need to make to get the Envisalink 3 up and running. But now I'm getting these errors:

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

Application initialization failed:
Error creating bean with name 'controlCommandService' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'deployer' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deployer' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'schema20' while setting constructor argument with key [2.0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schema20' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sensorBuilder' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sensorBuilder' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'commandFactory' while setting bean property 'commandFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commandFactory' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'dscit100CommandBuilder' while setting constructor argument with key [dscit100]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dscit100CommandBuilder' defined in class path resource [applicationContext.xml]: 1 constructor arguments specified but no matching constructor found in bean 'dscit100CommandBuilder' (hint: specify index and/or type arguments for simple parameters to avoid type ambiguities)

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

This only occurs after I've modified applicationcontext.xml to:

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

<!-- DSC IT Security System -->
<bean id = "dscit100CommandBuilder" class = "org.openremote.controller.protocol.dscit100.DSCIT100CommandBuilder">
<constructor-arg index="0" value="${dscit100.interface.password}" />
</bean>

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

Any pointers as to where I might be going wrong would be very much appreciated!

Thanks

Chris

Posted by tinkerfailure at Jan 30, 2014 21:31

I didn't think it should be necessary to modify the applicationcontext.xml anymore to get DSC running. Did you follow a document somewhere that stated you needed to do this?

Posted by juha at Feb 03, 2014 15:55

Hi Juha,

I've read quite a few articles and forum posts on this subject. I followed the instructions here:

http://www.openremote.org/display/forums/Support+for+other+DSC+interfaces

As my applicationContext.xml didn't match what was posted there.

Is that the wrong thing to do?

If I don't make that change, I get connection errors, as though the Envisalink is expecting a password and not getting it: 'Connection refused'

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

INFO 2014-02-03 22:47:39,454 : Initialized event processor : Drools Rule Engine
INFO 2014-02-03 22:47:41,680 : Initialized event processor : RRD4J Data Logger
INFO 2014-02-03 22:47:41,688 : Initialized event processor : EmonCMS Data Logger
INFO 2014-02-03 22:47:42,868 : Registered sensor : Sensor (Name = 'Display IsDay Sensor', ID = '80', State Mappings: {false=Night, true=Day})
INFO 2014-02-03 22:47:42,884 : Registered sensor : Sensor (Name = 'AlarmStateSensor', ID = '81', State Mappings: {null=READY})
INFO 2014-02-03 22:47:42,959 : Registered sensor : Sensor (Name = 'Display Date Sensor', ID = '82', State Mappings: {})
INFO 2014-02-03 22:47:42,995 : Registered sensor : Sensor (Name = 'Display Sunset Sensor', ID = '86', State Mappings: {})
INFO 2014-02-03 22:47:43,315 : Startup complete.
INFO 2014-02-03 22:47:43,375 : Controller Definition File Watcher for Default Deployer started.
ERROR [Polling Sensor Thread ID = 81, Name ='AlarmStateSensor']: Couldn't get I/O for the connection
java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at org.openremote.controller.protocol.dscit100.DSCIT100ConnectionManager.buildIPConnection(DSCIT100ConnectionManager.java:150)
	at org.openremote.controller.protocol.dscit100.DSCIT100ConnectionManager.getConnection(DSCIT100ConnectionManager.java:94)
	at org.openremote.controller.protocol.dscit100.DSCIT100Command.read(DSCIT100Command.java:168)
	at org.openremote.controller.protocol.dscit100.ReadCommand.read(ReadCommand.java:150)
	at org.openremote.controller.model.sensor.Sensor$DeviceReader.read(Sensor.java:682)
	at org.openremote.controller.model.sensor.Sensor$DeviceReader.run(Sensor.java:608)
	at java.lang.Thread.run(Thread.java:744)

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

Thanks for your help.

C

Posted by tinkerfailure at Feb 03, 2014 22:49

I think for Envisalink you'll need a more recent binary OpenRemote-Controller-2.1.0_FM_SNAPSHOT-2013-07-18.zip or later. Can you give it a try and see if the connection still fails (without modifying the applicationContext.xml)?

Posted by juha at Feb 06, 2014 14:26
Document generated by Confluence on Jun 05, 2016 09:40