This page last changed on Dec 17, 2013 by skogen75.

Hi everyone,

This is my first time trying to use rules in OpenRemote. It seems anything I write in the rules editor results in this start up error, see below. My rule is the following:

package org.openremote.controller.protocol

global org.openremote.controller.statuscache.CommandFacade execute;
global org.openremote.controller.statuscache.SwitchFacade switches;

rule "System start"
when eval(true)
then
  command.execute("cSqueezebox_NextTrack", "Drools start OK");
end

I have an in memory virtual command called cSqueezebox_NextTrack and have it liked to a sensor called sSqueezebox_NextTrack and linked that to a label in my UI. But, it seems the problem is more fundamental, once I get this error none of my sensors work (they all return N/A). I have tried a couple different rules, but no joy. Am I forgetting something?

Thanks,
Erik

INFO 2013-12-16 21:22:29,118 :

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

DEPLOYING NEW CONTROLLER RUNTIME...

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

ERROR 2013-12-16 21:22:29,158 : Cannot start event processor 'Drools Rule Engine' : Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:283)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:268)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:181)
at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:159)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:210)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:143)
at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryServiceImpl.java:34)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:47)
at org.openremote.controller.statuscache.rules.RuleEngine.getValidKnowledgePackages(RuleEngine.java:484)
at org.openremote.controller.statuscache.rules.RuleEngine.start(RuleEngine.java:253)
at org.openremote.controller.statuscache.EventProcessorChain.start(EventProcessorChain.java:112)
at org.openremote.controller.statuscache.StatusCache.start(StatusCache.java:120)
at org.openremote.controller.deployer.Version20ModelBuilder.buildSensorModel(Version20ModelBuilder.java:659)
at org.openremote.controller.deployer.Version20ModelBuilder.build(Version20ModelBuilder.java:557)
at org.openremote.controller.deployer.AbstractModelBuilder.buildModel(AbstractModelBuilder.java:154)
at org.openremote.controller.service.Deployer.startup(Deployer.java:858)
at org.openremote.controller.service.Deployer.softRestart(Deployer.java:440)
at org.openremote.controller.service.Deployer$ControllerDefinitionWatch.run(Deployer.java:1324)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.drools.RuntimeDroolsException: value '1.7' is not a valid language level
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.getDefaultLanguageLevel(JavaDialectConfiguration.java:162)
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:57)
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:279)
... 18 more
INFO 2013-12-16 21:22:29,161 : Initialized event processor : RRD4J Data Logger
INFO 2013-12-16 21:22:29,161 : Initialized event processor : EmonCMS Data Logger
INFO 2013-12-16 21:22:29,190 : Registered sensor : Sensor (Name = 'DirecTV_GetShow', ID = '3604599', State Mappings: {})
INFO 2013-12-16 21:22:29,191 : Registered sensor : Sensor (Name = 'sSqueezebox_Index', ID = '3671334', State Mappings: {})
INFO 2013-12-16 21:22:29,191 : Registered sensor : Sensor (Name = 'sSqueezebox_NextTrack', ID = '3671335', State Mappings: {})
INFO 2013-12-16 21:22:29,191 : Registered sensor : Level Sensor (Name = 'LightLevel_Status', ID = '3608852', Min: 0, Max: 100)
INFO 2013-12-16 21:22:29,197 : Registered sensor : Switch Sensor (Name = 'LightOnOff_Status', ID = '3608854')
INFO 2013-12-16 21:22:29,202 : Registered sensor : Sensor (Name = 'Squeezebox_Exp_Artist', ID = '3608810', State Mappings: {})
INFO 2013-12-16 21:22:29,202 : Registered sensor : Sensor (Name = 'Squeezebox_ArtistSong', ID = '3607125', State Mappings: {})
INFO 2013-12-16 21:22:29,202 : Registered sensor : Sensor (Name = 'sSqueezebox_Tracks', ID = '3608811', State Mappings: {})
INFO 2013-12-16 21:22:29,204 : Startup complete.

The line

Caused by: org.drools.RuntimeDroolsException: value '1.7' is not a valid language level

is trying to tell you that Java 7 is not supported. You need to run it on Java 6.

Posted by aktur at Dec 17, 2013 08:56
Document generated by Confluence on Jun 05, 2016 09:36