创建容器命令挂起,未记录任何错误 [英] Create container command hangs, no error logged

查看:100
本文介绍了创建容器命令挂起,未记录任何错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在tomcat上运行Drools 7.7.0.final KIE服务器.通过对KIE服务器的RESTful调用启动容器时,我看到此行为.

从不创建容器,并且RESTful调用会无限期挂起.当我查询服务器时,我看到容器卡在了'status ="Creating"'中.

这并不总是发生.它似乎取决于规则.在大多数情况下,我的LHS(when子句)为以下形式.

myObject((field1!= null)&& field2)...等 ....其中field2是布尔值.

当我尝试类似...... pp之类的复杂事物时,难度似乎会出现

myObject(JsonMappper.truth(propertiesString,"field2"))

......,其中propertiesString是一个包含JSON的字符串,而JsonMapper.truth是一个静态方法,该方法基于field2的解码值返回一个布尔值.

奇怪的是,我从未收到编译错误,并且在删除/添加各种规则时,行为发生了不可预测的变化.有时,即使规则文件中存在多个带​​有JsonMapper.truth的规则实例,也会创建该容器.规则之间似乎存在一些微妙的相互作用.

我的问题是: 1)在when子句中使用像这样的自定义java函数是否存在一些危险? 2)有没有办法确定为什么容器创建挂起?我找不到任何有用的日志.似乎没有什么有用的东西可以写到通常的tomcat日志中. 3)有没有人看到这种行为(容器创建挂起)?

解决方案

我遇到了类似的问题.但我认为这与枚举用法有关.将版本切换为"7.9.0.Final"可修复所有问题.

I'm running Drools 7.7.0.final KIE server on tomcat. I am seeing this behavior when launching a container via RESTful call to the KIE server....

The container is never created, and the RESTful call hangs indefinitely. When I query the server I see that the container is stuck in 'status="Creating"'.

This doesn't always happen. It seems to be dependent on the rules. For the most part, my LHS (when clause) are of the form..

myObject( (field1 != null) && field2 ) ... etc. ....where field2 is a boolean.

The difficulty seems to come in when I attempt something complicated like ...

myObject ( JsonMappper.truth(propertiesString, "field2") )

...where propertiesString is a string containing JSON, and JsonMapper.truth is a static method that returns a boolean based on the decoded value of field2.

The odd thing is that I never receive a compilation error, and the behavior changes in unpredictable when I remove/add various rules. Sometimes the container will be created even when multiple instances of rules with JsonMapper.truth exist in the rules file. There seems to some subtle interaction between the rules.

My questions are: 1) Is there some danger associated with using a custom java function like this in the when clause? 2) Is there a way to determine why the container creation is hanging? I am not finding any useful logs. Nothing useful seems to be written to the usual tomcat logs. 3) Has anyone seen this behavior (container creation hanging)?

解决方案

I had the similar issue. But I thought that it is related to Enums usage. Switching the version to '7.9.0.Final' fixed everything.

这篇关于创建容器命令挂起,未记录任何错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆