[jboss-jira] [JBoss JIRA] (DROOLS-1507) Error message "unable to invole method" should mention DRL line
Geoffrey De Smet (JIRA)
issues at jboss.org
Mon Apr 3 12:04:00 EDT 2017
Geoffrey De Smet created DROOLS-1507:
----------------------------------------
Summary: Error message "unable to invole method" should mention DRL line
Key: DROOLS-1507
URL: https://issues.jboss.org/browse/DROOLS-1507
Project: Drools
Issue Type: Bug
Components: core engine
Reporter: Geoffrey De Smet
Assignee: Mario Fusco
In a complex DRL file we wrote something like this:
{code}
when
Visit(foo != null, $w : foo.weekOfYear)
not Visit(foo.weekOfYear < $w)
then
...
end
{code}
throws this exception:
{code}
java.lang.RuntimeException: cannot invoke getter: getFoo ...
at org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:74)
...
Caused by: java.lang.RuntimeException: unable to invoke method: ....foo.getWeekOfYear: target of method is null
at org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:66)
at org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:40)
...
Caused by: java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:43)
{code}
with no DRL line.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list