Drools Fusion: Problem with @Duration property.

27 views
Skip to first unread message

Stu R

unread,
Jul 26, 2016, 10:17:28 AM7/26/16
to Drools Setup
Hi guys. Im trying to configure an @duration property for my event class. However, it keeps giving me this error.

java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=null, line=-1, column=0

   text=Error processing @duration for TypeDeclaration 'com.sample.Instance': cannot access the field 'durationTime']]

at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:450)

at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:604)

at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:575)

at com.sample.Stream.main(Stream.java:43)

My question has been put up on StackOverflow also: http://stackoverflow.com/questions/38588907/drools-fusion-temporal-operator-duration-error-declaring-events?noredirect=1#comment64566882_38588907

Has anyone came across this before?

Thanks.

Stuart.

Mario Fusco

unread,
Jul 27, 2016, 2:36:54 AM7/27/16
to drools...@googlegroups.com
Hi Stuart,

for what I can see in the code you pasted in that StackOveflow entry the durationTime field of your bean is neither public nor it has a public getter accessor method. Adding a getDurationTime() to your bean should fix your problem.

Regards,
Mario

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@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-setup/51f4f2ad-b5b6-4bc7-aa97-4e83a6c4cee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stu R

unread,
Jul 27, 2016, 3:03:48 AM7/27/16
to drools...@googlegroups.com
Hi Mario.

Thanks very much for your help. That has cleared the error.

Regards,

Stuart.

--
You received this message because you are subscribed to a topic in the Google Groups "Drools Setup" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drools-setup/12rxNB5cX0c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drools-setup...@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages