Erreur d'evalExpression sur un objet métier remonté sur ALMUseCase

Erreur d'evalExpression sur un objet métier remonté sur ALMUseCase
0
Tags: #<Tag:0x00007f768f1b2080>

Bonjour,

Je me suis connecté aux logs d’un de mes environnement pour le suivi d’un développement quelconque et je n’y ai trouvé que des erreurs liées à une valeur ‘False’ qui apparemment ne devrait pas être là.
Il s’agit de ce que je comprends d’objets du socle mais je n’arrive pas à comprendre ce qui leur arrive.
Je vous mets les logs en question juste là sachant que ce n’est là qu’un échantillon des erreurs présentes :

2020-03-18 17:43:10,634 ERROR [com.simplicite.util.ObjectField] SIMPLICITE|http://61707fb9d7ac:8080||ERROR|designer|com.simplicite.util.ObjectField|evalDefault||Event: Default value expression evaluation error 
    com.simplicite.util.exceptions.ScriptException: org.mozilla.javascript.EcmaError: ReferenceError: "FALSE" is not defined. (ALMUseCase#1) in ALMUseCase at line number 1 
    	at com.simplicite.util.ScriptInterpreter.eval(ScriptInterpreter.java:177) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4569) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4487) 
    	at com.simplicite.util.ObjectField.evalDefault(ObjectField.java:1311) 
    	at com.simplicite.util.tools.JSONTool.objectFieldMetaDataToJson(JSONTool.java:840) 
    	at com.simplicite.util.tools.JSONTool.rowMetaDataToJson(JSONTool.java:1685) 
    	at com.simplicite.util.tools.JSONTool.listToJson(JSONTool.java:2232) 
    	at com.simplicite.util.tools.JSONTool.list(JSONTool.java:2590) 
    	at com.simplicite.webapp.tools.JSONServletTool.search(JSONServletTool.java:707) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:219) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:195) 
    	at com.simplicite.webapp.tools.JSONServletTool.businessObjectService(JSONServletTool.java:537) 
    	at com.simplicite.webapp.servlets.AbstractJSONServlet.service(AbstractJSONServlet.java:68) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.RewriteFilter.doFilter(RewriteFilter.java:77) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.AuthMethodFilter.doFilter(AuthMethodFilter.java:133) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) 
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) 
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) 
    	at com.simplicite.tomcat.valves.APISessionValve.invoke(APISessionValve.java:187) 
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) 
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 
    	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688) 
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) 
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) 
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) 
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) 
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639) 
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
    	at java.base/java.lang.Thread.run(Thread.java:830)
2020-03-18 17:43:10,633 ERROR [com.simplicite.util.ObjectField] SIMPLICITE|http://61707fb9d7ac:8080||ERROR|designer|com.simplicite.util.ObjectField|evalDefault||Event: Default value expression evaluation error 
    com.simplicite.util.exceptions.ScriptException: org.mozilla.javascript.EcmaError: ReferenceError: "FALSE" is not defined. (ALMUseCase#1) in ALMUseCase at line number 1 
    	at com.simplicite.util.ScriptInterpreter.eval(ScriptInterpreter.java:177) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4569) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4487) 
    	at com.simplicite.util.ObjectField.evalDefault(ObjectField.java:1311) 
    	at com.simplicite.util.tools.JSONTool.objectFieldMetaDataToJson(JSONTool.java:840) 
    	at com.simplicite.util.tools.JSONTool.rowMetaDataToJson(JSONTool.java:1685) 
    	at com.simplicite.util.tools.JSONTool.listToJson(JSONTool.java:2232) 
    	at com.simplicite.util.tools.JSONTool.list(JSONTool.java:2590) 
    	at com.simplicite.webapp.tools.JSONServletTool.search(JSONServletTool.java:707) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:219) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:195) 
    	at com.simplicite.webapp.tools.JSONServletTool.businessObjectService(JSONServletTool.java:537) 
    	at com.simplicite.webapp.servlets.AbstractJSONServlet.service(AbstractJSONServlet.java:68) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.RewriteFilter.doFilter(RewriteFilter.java:77) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.AuthMethodFilter.doFilter(AuthMethodFilter.java:133) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) 
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) 
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) 
    	at com.simplicite.tomcat.valves.APISessionValve.invoke(APISessionValve.java:187) 
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) 
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 
    	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688) 
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) 
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) 
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) 
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) 
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639) 
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
    	at java.base/java.lang.Thread.run(Thread.java:830)
2020-03-18 17:43:10,631 ERROR [com.simplicite.util.ObjectField] SIMPLICITE|http://61707fb9d7ac:8080||ERROR|designer|com.simplicite.util.ObjectField|evalDefault||Event: Default value expression evaluation error 
    com.simplicite.util.exceptions.ScriptException: org.mozilla.javascript.EcmaError: ReferenceError: "FALSE" is not defined. (ALMUseCase#1) in ALMUseCase at line number 1 
    	at com.simplicite.util.ScriptInterpreter.eval(ScriptInterpreter.java:177) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4569) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4487) 
    	at com.simplicite.util.ObjectField.evalDefault(ObjectField.java:1311) 
    	at com.simplicite.util.tools.JSONTool.objectFieldMetaDataToJson(JSONTool.java:840) 
    	at com.simplicite.util.tools.JSONTool.rowMetaDataToJson(JSONTool.java:1685) 
    	at com.simplicite.util.tools.JSONTool.listToJson(JSONTool.java:2232) 
    	at com.simplicite.util.tools.JSONTool.list(JSONTool.java:2590) 
    	at com.simplicite.webapp.tools.JSONServletTool.search(JSONServletTool.java:707) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:219) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:195) 
    	at com.simplicite.webapp.tools.JSONServletTool.businessObjectService(JSONServletTool.java:537) 
    	at com.simplicite.webapp.servlets.AbstractJSONServlet.service(AbstractJSONServlet.java:68) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.RewriteFilter.doFilter(RewriteFilter.java:77) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.AuthMethodFilter.doFilter(AuthMethodFilter.java:133) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) 
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) 
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) 
    	at com.simplicite.tomcat.valves.APISessionValve.invoke(APISessionValve.java:187) 
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) 
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 
    	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688) 
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) 
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) 
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) 
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) 
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639) 
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
    	at java.base/java.lang.Thread.run(Thread.java:830)
2020-03-18 17:43:10,630 ERROR [com.simplicite.util.ObjectField] SIMPLICITE|http://61707fb9d7ac:8080||ERROR|designer|com.simplicite.util.ObjectField|evalDefault||Event: Default value expression evaluation error 
    com.simplicite.util.exceptions.ScriptException: org.mozilla.javascript.EcmaError: ReferenceError: "FALSE" is not defined. (ALMUseCase#1) in ALMUseCase at line number 1 
    	at com.simplicite.util.ScriptInterpreter.eval(ScriptInterpreter.java:177) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4569) 
    	at com.simplicite.util.ObjectCore.evalExpression(ObjectCore.java:4487) 
    	at com.simplicite.util.ObjectField.evalDefault(ObjectField.java:1311) 
    	at com.simplicite.util.tools.JSONTool.objectFieldMetaDataToJson(JSONTool.java:840) 
    	at com.simplicite.util.tools.JSONTool.rowMetaDataToJson(JSONTool.java:1685) 
    	at com.simplicite.util.tools.JSONTool.listToJson(JSONTool.java:2232) 
    	at com.simplicite.util.tools.JSONTool.list(JSONTool.java:2590) 
    	at com.simplicite.webapp.tools.JSONServletTool.search(JSONServletTool.java:707) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:219) 
    	at com.simplicite.webapp.ObjectJson.search(ObjectJson.java:195) 
    	at com.simplicite.webapp.tools.JSONServletTool.businessObjectService(JSONServletTool.java:537) 
    	at com.simplicite.webapp.servlets.AbstractJSONServlet.service(AbstractJSONServlet.java:68) 
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.RewriteFilter.doFilter(RewriteFilter.java:77) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at com.simplicite.webapp.filters.AuthMethodFilter.doFilter(AuthMethodFilter.java:133) 
    	at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:37) 
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) 
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) 
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) 
    	at com.simplicite.tomcat.valves.APISessionValve.invoke(APISessionValve.java:187) 
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) 
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 
    	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688) 
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) 
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) 
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) 
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) 
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639) 
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
    	at java.base/java.lang.Thread.run(Thread.java:830)

Et mon /health :


[Platform]
Status=OK
Version=4.0.P24
BuiltOn=2020-03-05 23:18 (revision 40c7997ef4ecb7b5cf073d0427e387a478b0eb96)
Encoding=UTF-8
EndpointIP=172.17.0.19
EndpointURL=http://61707fb9d7ac:8080
TimeZone=Europe/Paris
SystemDate=2020-03-18 17:50:45

[Application]
ApplicationVersion=0.1 dev
ContextPath=
ContextURL=https://int.rpw.dev.aws.renault.com
ActiveSessions=2
TotalUsers=10
EnabledUsers=9
LastLoginDate=

[Server]
ServerInfo=Apache Tomcat/9.0.31
ServerType=WEB
User=root

[OS]
Name=Linux
Architecture=amd64
Version=4.14.158-101.185.amzn1.x86_64
SystemEncoding=UTF-8

[Disk]
DiskFree=9123
DiskUsable=8595
DiskTotal=10015

[JavaVM]
Version=13.0.2
Vendor=N/A
VMName=OpenJDK 64-Bit Server VM
VMVersion=13.0.2+8
ScriptEngine=rhino
ScriptEngineVersion=Rhino 1.7.11 2019 05 30
HeapFree=437311
HeapSize=642008
HeapMaxSize=1773888
TotalFreeSize=1569191

[Cache]
GrantCache=15
GrantCacheMax=0
GrantCacheRatio=0
ObjectCache=218
ObjectCacheMax=10000
ObjectCacheRatio=2
ProcessCache=1
ProcessCacheMax=10000
ProcessCacheRatio=0

[Database]
Vendor=3
ProductName=PostgreSQL
ProductVersion=10.6
DriverName=PostgreSQL JDBC Driver
DriverVersion=42.2.10
DBDate=2020-03-18 17:50:45
DBDateOffset=0
DBPatchLevel=P24;40c7997ef4ecb7b5cf073d0427e387a478b0eb96
UsingBLOBs=true

[Healthcheck]
Date=2020-03-18 17:50:45
ElapsedTime=484

Merci d’avance

Cette erreur ne me dit rien. Je ne vois rien de tel dans les logs d’une P24 à jour.

Dans l’objet en question ALMUseCase il n’y a pas de contraintes:


Et le code ne contient pas de FALSE:

Bref je pense que vous avez dû modifier quelque chose sur cet objet…

J’ai fini par trouver l’erreur, il s’agissait d’une valeur par défaut dans un field de type Boolean qui était incohérente (No au lieu de 0).
Rien à voir avec les différents objets cités dans les logs…

OK mais les logs étaient bien sur l’objet ALMUseCase, bizarre (à noter qu’il n’y a pas non plus de valeur par défaut ni d’attributs calculés sur cet objet)

La magie du code interprété.

L’erreur est bien sur une valeur par défaut non interprétable en Rhino/Javascript.
com.simplicite.util.ObjectField.evalDefault

Mais l’interpréteur Rhino qui évalue cette expression semble instancié par ALMUseCase… ?!?
On va vérifier car c’est sensé être l’objet qui porte le champ… ou alors ça n’a pas d’importance mais c’est troublant.