[rules-users] NullPointerException with factType.get(fact, "fieldname")

Michael Anstis michael.anstis at gmail.com
Sat Mar 15 13:30:03 EDT 2014


It looks like the OP is trying to retrieve a Java class with the API for
accessing declared (DRL) types.... but to be honest they also mention if
they put the type in /resources it works ok - so I'm not entirely clear
what they are doing.

Sent on the move

If ValidationError is a user-defined type, using the Data Modeller in the
workbench, it is a java class and not a declared (DRL) type.

I don't think this is a bug; but perhaps a misunderstanding?

Sent on the move
On 15 Mar 2014 15:41, "Davide Sottara" <dsotty at gmail.com> wrote:

>  Michael, I think the class is just incidentally named ValidationError.
>
> The problem is in the "wiring" of the accessors into the FieldDefinition
> (you see that "accessor=null" at the end of the toString in the failing
> case).
> This wiring is done by the PackageBuilder when the DRL is compiled, so
> I suspect that there is a problem with the interaction of the data modeller
> and the package builder..
>
> Jarkko, thanks for reporting this, it really looks like a WB bug!
> Could you please open a JIRA ticket?
>
> Davide
>
> On 03/15/2014 04:09 PM, Michael Anstis wrote:
>
> ValidationError is indeed an *internal* workbench class. What makes you
> think you can query for it?
>
> Sent on the move
> On 15 Mar 2014 12:00, "JarkkoMakela" <jarkko.matinpoika at gmail.com> wrote:
>
>> This ValidationError is created with drools workbench data modeller. It
>> has
>> only String fields.
>> I have only couple of rules (which will create two ValidationErrors) and
>> one
>> query (for the ValidationError) in the knowledgebase.
>>
>>
>> -Jarkko
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/NullPointerException-with-factType-get-fact-fieldname-tp4028688p4028744.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> _______________________________________________
> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140315/2f5e2ce3/attachment.html 


More information about the rules-users mailing list