I am trying to use lambdaj on Android, but with every simple call I make it get an exception (java.lang.ExceptionInInitializerError).
The class that populates the collection:
@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; } }
Annotations are used by ORMLite. I left them in case they were somehow relevant. I doubt, however.
And now, if I try to make a simple call, it will fail:
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 exact same code in a Java console application and it worked ...
Any idea why this will not work on Android?
Thanks.
Gonan source share