Active Objects: Cannot handle method. It is not a valid getter or setter and does not have an implementation supplied

230 views Asked by At

I am getting the error:

java.lang.IllegalArgumentException: Cannot handle method. It is not a valid getter or setter and does not have an implementation supplied. Signature: public abstract ...

in a unit test run with ActiveObjectsJUnitRunner. The project is an Atlassian Jira plugin with Active Objects.

1

There are 1 answers

0
18446744073709551615 On

The problem was that some my colleague wrote the getter as:

import net.java.ao.0neToMany;

@OneToMany
Collection<NdaProtectedItem> getNdaProtectedItems();

while it should have been:

@OneToMany
NdaProtectedItem[] getNdaProtectedItems();

The result must be a plain array, ActiveObjects do not support collection getters!