[
https://issues.redhat.com/browse/DROOLS-4431?page=com.atlassian.jira.plug...
]
Matteo Mortari commented on DROOLS-4431:
----------------------------------------
Noting stacktrace and reported messages, which are now fixed.
{code:java}
14:29:23,958 ERROR [org.kie.server.services.dmn.ModelEvaluatorServiceBase] (default
task-5) Error from container 'traffic-violation_1.0.0-SNAPSHOT':
java.lang.RuntimeException: Cannot find a default KieSession
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.findKieSessionModel(KieContainerImpl.java:486)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:529)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:459)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:442)
at
org.kie.server.services.dmn.ModelEvaluatorServiceBase.evaluateDecisions(ModelEvaluatorServiceBase.java:162)
at
org.kie.server.remote.rest.dmn.ModelEvaluatorResource.evaluateDecisions(ModelEvaluatorResource.java:108)
{code}
while using:
{code:xml}
<kmodule
xmlns="http://www.drools.org/xsd/kmodule"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<kbase name="KB1" default="true"
eventProcessingMode="stream" equalsBehavior="identity">
<ksession name="KS1" type="stateless" default="true"
clockType="realtime"/>
</kbase>
</kmodule>
{code}
reproducer messages (now fixed):
{code:java}
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 25.927 s
<<< FAILURE! - in
org.kie.server.integrationtests.dmn.DMNHelloWorldStatelessKBIntegrationTest
[ERROR] test_evaluateAll[0: JAXB KieServicesConfiguration{transport=REST,
serverUrl='http://localhost:54143/kie-server-services/services/rest/server'}](org.kie.server.integrationtests.dmn.DMNHelloWorldStatelessKBIntegrationTest)
Time elapsed: 0.381 s <<< ERROR!
org.kie.server.api.exception.KieServicesHttpException:
Unexpected HTTP response code when requesting URI
'http://localhost:54143/kie-server-services/services/rest/server/containers/hello-world-statelesskb/dmn'!
Error code: 404, message: <?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<response type="FAILURE" msg="Error from container
'hello-world-statelesskb'Cannot find a default KieSession"/>
at
org.kie.server.integrationtests.dmn.DMNHelloWorldStatelessKBIntegrationTest.test_evaluateAll(DMNHelloWorldStatelessKBIntegrationTest.java:58)
[ERROR] test_evaluateAll[1: JSON KieServicesConfiguration{transport=REST,
serverUrl='http://localhost:54143/kie-server-services/services/rest/server'}](org.kie.server.integrationtests.dmn.DMNHelloWorldStatelessKBIntegrationTest)
Time elapsed: 0.345 s <<< ERROR!
org.kie.server.api.exception.KieServicesHttpException:
Unexpected HTTP response code when requesting URI
'http://localhost:54143/kie-server-services/services/rest/server/containers/hello-world-statelesskb/dmn'!
Error code: 404, message: {
"type" : "FAILURE",
"msg" : "Error from container 'hello-world-statelesskb'Cannot
find a default KieSession",
"result" : null
}
at
org.kie.server.integrationtests.dmn.DMNHelloWorldStatelessKBIntegrationTest.test_evaluateAll(DMNHelloWorldStatelessKBIntegrationTest.java:58)
[ERROR] test_evaluateAll[2: XSTREAM KieServicesConfiguration{transport=REST,
serverUrl='http://localhost:54143/kie-server-services/services/rest/server'}](org.kie.server.integrationtests.dmn.DMNHelloWorldStatelessKBIntegrationTest)
Time elapsed: 0.132 s <<< ERROR!
org.kie.server.api.exception.KieServicesHttpException: Unexpected HTTP response code when
requesting URI
'http://localhost:54143/kie-server-services/services/rest/server/containers/hello-world-statelesskb/dmn'!
Error code: 404, message: <response type="FAILURE" msg="Error from
container 'hello-world-statelesskb'Cannot find a default
KieSession"/>
at
org.kie.server.integrationtests.dmn.DMNHelloWorldStatelessKBIntegrationTest.test_evaluateAll(DMNHelloWorldStatelessKBIntegrationTest.java:58)
{code}
DMN REST endpoint requires stateful kie session
-----------------------------------------------
Key: DROOLS-4431
URL:
https://issues.redhat.com/browse/DROOLS-4431
Project: Drools
Issue Type: Bug
Components: dmn engine
Environment: Noticed this is RHDM 7.3. Still exists in 7.4. Don't know which
versions of Drools that coincides with.
Reporter: Justin Jarae
Assignee: Matteo Mortari
Priority: Major
Labels: field
Attachments: DMN-Test.zip
When trying to run DMN via the rest endpoint, if the default KIE session is stateless, an
error is returned stating that "Cannot find a default KieSession". If the
stateful session is specified as default, the DMN execution works as expected. This forces
you to specify stateless for all other requests.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)