I'm trying to use lambdaj on Android but with every simple call I make I get an exception (java.lang.ExceptionInInitializerError).
The class that fills the collection is:
@DatabaseTable(tableName = "sections")
public class Section {
@DatabaseField(id = true, unique = true)
private int id;
@DatabaseField(canBeNull = false)
private String name;
public Section() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
The annotations are used by ORMLite. I left them in case they could be relevant somehow. I doubt it though.
And now if I try to make a simple call like, it crashes:
List<Section> sections = fillSections(); //this is correctly filled
select(sections, having(on(Section.class).getId(), Matchers.greaterThan(1)))
Logcat:
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at ch.lambdaj.proxy.ProxyUtil.createEnhancer(ProxyUtil.java:89)
at ch.lambdaj.proxy.ProxyUtil.createProxy(ProxyUtil.java:49)
at ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory.java:68)
at ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFactory.java:58)
at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:50)
at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:39)
at ch.lambdaj.Lambda.on(Lambda.java:63)
What puzzles me is that I tried the very same code in a java console application and it worked...
Any idea why this wouldn't work on Android?
Thanks.