Unable to resolve method using strict-mode in Kie 6.4.0-final

3,896 views
Skip to first unread message

Lakshmi Mahabaleshwara

unread,
Nov 15, 2016, 7:29:08 PM11/15/16
to Drools Usage
Hello All,

I have defined a fact(data object) in kie-workbench 6.4.0 with a name (HelloProfile) which is having two fields first name and last name. I have set rules in guided decision table using that two field from HelloProfile.

When I execute rule via Rest client It works fine. Now I added another field in HelloProfile with name address and edited the condition in guided decision table, then Build and  Deploy. 

In the Tomcat logs, I see error as below

[Error: unable to resolve method using strict-mode: com.test.kie.HelloProfile.address()]
[Near : {... address == "" ....}]

Can anyone please help me solve this issue?

Thanks
Lakshmi

Lakshmi Mahabaleshwara

unread,
Nov 30, 2016, 4:07:14 PM11/30/16
to Drools Usage
Can anyone please help me solve this issue?

Michael Anstis

unread,
Nov 30, 2016, 4:27:48 PM11/30/16
to Drools Usage

Interesting.

Can you pastebin your complete log (from saving the Data Object with the new field being added to the build of the Project)?

What happens if after adding the field and saving you update the Projects description (Authoring->Project Editor) and save, then try building.

Thanks

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/8f09fe45-52fb-406b-b9a9-618f4f60d1c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lakshmi Mahabaleshwara

unread,
Nov 30, 2016, 5:59:32 PM11/30/16
to Drools Usage
Hi Michael,
Thank you for replying.

I missed adding one step in my previous message. Below are the steps and log file.

  • Added two fields firstname and lastname in HelloProfile.java and added conditions for those two fields in Hellorule.gdst
  • Updated the pom file version and build, Added container with version as "LATEST"
  • Now added another new field zipCode in HelloProfile.java and added condition in Hellorule.gdst
  • Updated the pom file with new version and build.
  • Once build completed, Clicked ScanNow. I see below logs

Nov 30, 2016 2:09:30 PM org.drools.compiler.kie.builder.impl.KieContainerImpl rebuildAll

SEVERE: Unable to update KieBase: kbase to release com.intuit.kie:personalization:5.1

Unable to Analyse Expression zipCode == "12345":

[Error: unable to resolve method using strict-mode: com.intuit.kie.personalization.HelloProfile.zipCode()]

[Near : {... zipCode == "12345" ....}]

             ^

[Line: 7, Column: 2] : [Rule name='Row 1 HelloRule']


As suggested by you, I updated the Project description -> updated the pom to new version and build--> ScanNow
Now it did not throw any error in logs but it is not giving the ouput though I send correct json payload.

payload
{
"lookup": "statelessKnowledgeSession",
"commands": [{
"insert": {
"object": {
"com.XXX.kie.personalization.HelloProfile": {
"firstName": "SalesTab",
"lastName": "true",
"zipCode":"12345"
}
}
}
}, {
"fire-all-rules": ""
}, {
"get-objects": {
"out-identifier": "Recommendation"
}
}]
}

OUTPUT

{
  "type": "SUCCESS",
  "msg": "Container kie_personalization successfully called.",
  "result": {
    "execution-results": {
      "results": [
        {
          "key": "",
          "value": 0
        },
        {
          "key": "Recommendation",
          "value": [
            {
              "com.XXX.kie.personalization.HelloProfile": {
                "firstName": "SalesTab",
                "lastName": "true"
              }
            }
          ]
        }
      ],
      "facts": []
    }
  }
}

Thanks
Lakshmi

On Wednesday, November 30, 2016 at 1:27:48 PM UTC-8, Michael Anstis wrote:

Interesting.

Can you pastebin your complete log (from saving the Data Object with the new field being added to the build of the Project)?

What happens if after adding the field and saving you update the Projects description (Authoring->Project Editor) and save, then try building.

Thanks

On 30 Nov 2016 21:07, "Lakshmi Mahabaleshwara" <lakshm...@gmail.com> wrote:
Can anyone please help me solve this issue?

On Tuesday, November 15, 2016 at 4:29:08 PM UTC-8, Lakshmi Mahabaleshwara wrote:
Hello All,

I have defined a fact(data object) in kie-workbench 6.4.0 with a name (HelloProfile) which is having two fields first name and last name. I have set rules in guided decision table using that two field from HelloProfile.

When I execute rule via Rest client It works fine. Now I added another field in HelloProfile with name address and edited the condition in guided decision table, then Build and  Deploy. 

In the Tomcat logs, I see error as below

[Error: unable to resolve method using strict-mode: com.test.kie.HelloProfile.address()]
[Near : {... address == "" ....}]

Can anyone please help me solve this issue?

Thanks
Lakshmi

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
kie.logs

Michael Anstis

unread,
Dec 1, 2016, 11:19:56 AM12/1/16
to Drools Usage
Heh, quite a big step was missing; looks like you're running the KJAR on Kie Server.

I *think* this relates to use of LATEST, but I've BCC'ed a colleague who knows better.

@Mario, IIRC this is because LATEST should not be used; and KieScanner is unable to detect changes in a LATEST KJAR?

Cheers,

Mike

To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Lakshmi Mahabaleshwara

unread,
Dec 1, 2016, 11:51:44 PM12/1/16
to Drools Usage
Thank You, Mike.
@Mario, Can you please let us know.?

Lakshmi Mahabaleshwara

unread,
Dec 5, 2016, 3:46:53 PM12/5/16
to Drools Usage
Hi Mario, Please help.

Mario Fusco

unread,
Dec 6, 2016, 5:37:21 AM12/6/16
to Drools Usage
Hi,

LATEST has problem (not caused by drools but by the maven/aether integration library) only if you use SNAPSHOTs. If you want to use LATEST please make sure you're only using fixed versions AND you update the version number of your kproject at every release.

If this is already the case please send us a small reproducer of your problem and I'll investigate it asap.

Regards,
Mario

To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Lakshmi Mahabaleshwara

unread,
Dec 6, 2016, 4:23:32 PM12/6/16
to Drools Usage

Hi Mario,


Thank you for looking into this issue. We are not using SNAPSHOT version. We are using fixed number and update the version for every release.

I have attached log file and Kjars which is having issues. 6.2 version jar is without adding a new field in Data object and gdst. 6.3 jais after adding a new field and rule. 


Thanks again

Lakshmi

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Lakshmi Mahabaleshwara

unread,
Dec 6, 2016, 4:30:28 PM12/6/16
to Drools Usage
kie_dec_6.logs
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Lakshmi Mahabaleshwara

unread,
Dec 6, 2016, 4:50:50 PM12/6/16
to Drools Usage
Hi Mario
I had issues while attaching the jar files, I have added to my google drive and have shared the link with you.

Thanks
Lakshmi

Lakshmi Mahabaleshwara

unread,
Dec 12, 2016, 1:13:41 PM12/12/16
to Drools Usage
Hi Mario,
Did you get a chance to look into the kjars. Please let me know.

Thanks
Lakshmi

Mario Fusco

unread,
Dec 13, 2016, 2:52:31 AM12/13/16
to Drools Usage
Hi,

I cannot reproduce the problem as you reported. It would be very helpful for me if you could reproduce it with an isolated unit test on incremental compilation without involving business-central or the kie-server. Here you can find a few example of incremental compilation unit tests https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieRepositoryScannerTest.java

Regards,
Mario

To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Lakshmi Mahabaleshwara

unread,
Dec 14, 2016, 2:29:31 PM12/14/16
to Drools Usage
Hi Mario,
Thank you for checking. It's weird that you could not reproduce. I was able to reproduce with same jars. Is there any configuration specific in .m2/setting.xml for kie scanner that I might be missing?

Sure I will write a test to reproduce the issue without kie server and will update soon.

Thanks again
Lakshmi

Lakshmi Mahabaleshwara

unread,
Jan 9, 2017, 6:10:11 PM1/9/17
to Drools Usage
Hi Mario,

I was able to reproduce the issue with unit test case without kie-server. Please download the code from https://github.com/lakshmi-mahabaleshwara/simple-rules-with-guided-table-kiescanner and run mvn clean test.

The test case will still pass since I have not given any assertion. But you would see below errors in the logs. 

PS : Rules are written using Guided decision table in the jar.

[ERROR] [main] [org.drools.compiler.kie.builder.impl.KieContainerImpl] ERROR Unable to update KieBase: kbase to release com.intuit.kie:personalization:LATEST

Unable to Analyse Expression zipCode != null:

[Error: unable to resolve method using strict-mode: com.intuit.kie.personalization.HelloProfile.zipCode()]

[Near : {... zipCode != null ....}]

             ^ : [Rule name='Row 1 HelloRules']


Can you please investigate and let us know. 


Thanks for checking.

Lakshmi

Mario Fusco

unread,
Jan 10, 2017, 2:39:42 AM1/10/17
to Drools Usage
Hi Lakshmi,

and sorry for the delay in my reply. I just returned from my xmas vacation. Happy new year by the way :)

Regarding the call, unfortunately I'm not allowed to do that, I hope you can understand. In case you still want that kind of support please contact the Red Hat office there in California.

Thanks a lot for your reproducer. I'll give a look asap and keep you updated on my findings.

Regards,
Mario

To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Lakshmi Mahabaleshwara

unread,
Jan 10, 2017, 1:47:39 PM1/10/17
to Drools Usage
Hi Mario,

Thank you very much for the reply. I completely understand.
If you need any more details, I can do the video recording of the issue I am facing and submit.

Thanks again
Lakshmi

Mario Fusco

unread,
Jan 12, 2017, 11:44:38 AM1/12/17
to Drools Usage
Hi Lakshmi,

I investigated your reproducer and found that indeed we have a bug in that area. The problem has been reported here https://issues.jboss.org/browse/DROOLS-1402 and I fixed it on our master repository with this commit https://github.com/droolsjbpm/drools/commit/cb3a8d1f7c11c1f930139ed98104251889aa0433

The fix will be available with the upcoming drools 7 release.

Thanks a lot for having reported this.

Regards,
Mario

To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Lakshmi Mahabaleshwara

unread,
Jan 12, 2017, 2:34:46 PM1/12/17
to Drools Usage
Hi Mario,

Thank you for checking and fixing the issue.
We are using tomcat 8 with Drools 6.4.0.Final version. As per this thread https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/drools-setup/4XqPfdF-ouA/Tl94Rjx8CQAJ I got to know 6.5.0 onwards, we have problems with Tomcat and need to use Wildfly.

I am assuming Drools 7 will also have a similar problem with tomcat. Is it possible to give this fix to 6.4.0.Final version? It will be very helpful. 
Switching to Wildfly is overhead at this moment to use Drools 7.

Please let me know.

Thanks again
Lakshmi

Mario Fusco

unread,
Jan 13, 2017, 2:58:09 AM1/13/17
to Drools Usage
Hi Lakshmi,

unfortunately our politic is to not providing patch releases for community projects (Drools) but only for the products (BRMS). The only suggestion I can give you is trying to clone our 6.4.x branch from github, cherry-pick the commit with my fix there and build it locally.

Out of curiosity what's the problem with running drools 6.5 on Tomcat? Is it something that has been already reported? Can you provide some more details about this?

Thanks,
Mario

To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Lakshmi Mahabaleshwara

unread,
Jan 13, 2017, 4:27:31 PM1/13/17
to Drools Usage
Hi Mario,

I don't think there is a Jira issue reported. I had reported the issue in this forum https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/drools-setup/4XqPfdF-ouA/Tl94Rjx8CQAJ

After login to the kie workbench using Tomcat 7 and 6.5.0.Final version, Page gets stuck and I see below errors in Catalina logs.

WARNING: Exception encountered while syncing with controller at http://localhost:8080/kie-wb/rest/controller/server/tomcat-kieserver error Error while sending PUT request to http://localhost:8080/kie-wb/rest/controller/server/tomcat-kieserver response code 500

Thank you 
Lakshmi
Reply all
Reply to author
Forward
0 new messages