mstehle
(mattnl )
February 25, 2019, 11:57pm
1
Hi,
I have just installed snapshot build 2.5.0 #1536 and see the following issues:
val String name = triggeringItem.name.toString.substringAfter("gBT")
==> throws the following error:
'substringAfter' is not a member of 'java.lang.String'
postUpdate(wekker_sbmatt_1_Time, alarmTime.toString.left(5))
==> throws the following error:
'left' is not a member of 'java.lang.String'
This used to work without any problems on 2.5.0 Milestone 1.
Possibly a bug or has something changed? Can anybody reproduce this?
Cheers,
Matt
semperor
(Semperor)
February 28, 2019, 9:06pm
2
Updated to openHAB 2.5.0~S1541-1 (Build #1541 ) few minutes ago. Now I get:
2019-02-28 22:00:05.493 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'CheckAlarmState': 'left' is not a member of 'java.lang.String'; line 9, column 26, length 55
mstehle
(mattnl )
March 1, 2019, 7:14am
4
Thank you semperor for confirming the issue and fur creating a GitHub issue.
Lolodomo
(Lolodomo)
March 3, 2019, 10:03am
5
Same problem for me using replaceChars with snapshot 1544.
semperor
(Semperor)
March 3, 2019, 6:14pm
6
Good news. Kai just made a pr with a fix.
1 Like
semperor
(Semperor)
March 4, 2019, 7:26pm
7
I have updated to the current snapshot and the problem is gone.
mstehle
(mattnl )
March 5, 2019, 6:37pm
8
Good that it is working for you. I still see the same problems on snapshot #1549
semperor
(Semperor)
March 5, 2019, 8:14pm
9
I’m currently using openHAB 2.5.0~S1548-1 (Build #1548)
. And the problem is definitely gone in this build #.
@Lolodomo Did the fix from Kai work for you?
Lolodomo
(Lolodomo)
March 5, 2019, 10:32pm
10
I did not install a newer version side the last weekend. But I have no doubt it will work for me too.
Lolodomo
(Lolodomo)
March 6, 2019, 6:22am
11
I just installed snapshot 1549 and unfortunately my problem is not resolved:
2019-03-06 07:17:39.295 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Controle par la voix': 'replaceChars' is not a member of 'java.lang.String'; line 745, column 24, length 45
semperor
(Semperor)
March 6, 2019, 7:36am
12
I made a test rule
rule "Testrule"
when
Time cron "0/15 * * * * ? *"
then
val String test = "empowering the smart home"
logInfo("common", "substring = " + test.substring( 5, 10 ) )
logInfo("common", "indexOf = " + test.indexOf( "power" ) )
logInfo("common", "replaceChars= " + test.replaceChars( "smart", "smartest" ) )
logInfo("common", "reverse = " + test.reverse() )
end
with that result:
2019-03-06 08:30:35.814 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'common.rules'
2019-03-06 08:30:47.373 [INFO ] [clipse.smarthome.model.script.common] - substring = ering
2019-03-06 08:30:47.390 [INFO ] [clipse.smarthome.model.script.common] - indexOf = 2
2019-03-06 08:30:47.398 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Testrule': 'replaceChars' is not a member of 'java.lang.String'; line 14, column 46, length 40
I than deleted the replaceChars line and got that:
2019-03-06 08:31:02.041 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'common.rules'
2019-03-06 08:31:15.036 [INFO ] [clipse.smarthome.model.script.common] - substring = ering
2019-03-06 08:31:15.045 [INFO ] [clipse.smarthome.model.script.common] - indexOf = 2
2019-03-06 08:31:15.052 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Testrule': 'reverse' is not a member of 'java.lang.String'; line 15, column 42, length 14
The fix doesn’t work at all.
mstehle
(mattnl )
March 6, 2019, 5:49pm
13
Thanks guys for confirming this. I started doubting myself already
mstehle
(mattnl )
March 14, 2019, 6:25pm
14
I just installed build #1555 and the problems seem to be resolved in that build.
Thanks to all!
semperor
(Semperor)
March 15, 2019, 8:03pm
15
Yep. Can confirm that there are no errors in #1555 .
1 Like
Lolodomo
(Lolodomo)
March 16, 2019, 1:03pm
16
I can confirm too using the snapshot 1556.