I realized that my rules are no longer working - no matter if they are triggered either by cron or by an item update. I found the following error messages in the log:
2018-08-20 13:19:45.581 [ERROR] [eclipse.smarthome.model.rule.runtime] - [org.eclipse.smarthome.model.rule.runtime.internal.engine.RuleEngineImpl(177)] The activate method has thrown an exception
java.lang.LinkageError: loader constraint violation: when resolving interface method “org.quartz.Scheduler.setJobFactory(Lorg/quartz/spi/JobFactory;)V” the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/smarthome/model/rule/runtime/internal/engine/RuleTriggerManager, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method’s defining class, org/quartz/Scheduler, have different Class objects for the type org/quartz/spi/JobFactory used in the signature
What happened here? How can I fix it? Thanks a lot!
Seem the last line of the log may indicate an issue with something in an items, rules, things, etc… Can you post the items, rules, etc… maybe someone can identify what needs to be changed, adjusted, or added to get your rules working again.
Sorry guys, no idea what the issue was! I did a clean install, restored the backup and everything works now - except that my rule is not working as expected.
import org.openhab.core.library.types.*
import org.openhab.model.script.actions.*
rule "Update Homematic item"
when
Item WeatherInformation_Today_MaxTemp received update
then
var Number Max
if (WeatherInformation_Today_MaxTemp.state instanceof DecimalType) {
Max = (WeatherInformation_Today_MaxTemp.state as DecimalType)
logInfo("Foo", "Source WeatherInformation_Today_MaxTemp has value {}", WeatherInformation_Today_MaxTemp.state)
sendCommand(HM_Vorhersage_Maximaltemperatur, Max)
logInfo("Foo", "Homematic values successfully updated with value {}", Max)
} else {
logError("Foo", "Tried to update HM_Vorhersage_Maximaltemperatur, but source value was not of DecimalType!")
}
end
What’s the type of the Temperature variable in openHAB? Obviously it’s not an instance of DecimalType since the else-clause is always executed.
And what about the import statements? Wildcards are deprecated, what’s the workaround here?
Thank you so much!! Your help is really appreciated!
We need to work harder. No Java, Perl, Python, Groovy, Scala user has to do this often. We must accept, something is wrong wt rules. A lot of human energy is being wasted in false hopes pursuing this language. This user has wiped cache, re-installed everything, still no luck. Helping on case by case basis is not the solution. Does any user ask Java question here? Of course not. We need to work harder.
Gents, I switched on openhab after half a year of summer sleep.
For whatever reason the rule that I want to run does not work anylonger. I gon’t get a “rule saved” log entry when saving the rule, nothing. It does not trigger, nothing.
Any idea what that could be or how I could debug better? Thanks a lot in advance!