Re: I get a java.lang.ExceptionInInitializerError with anything I try to call (Android)

已查看 725 次
跳至第一个未读帖子

Mario Fusco

未读,
2013年4月28日 05:03:362013/4/28
收件人 lambdaj
Yes, very likely lambdaj won't work on android.
Anyway you're also doing a mistake in using it: you have always to use hamcrest predicate as in:

select(sections, having(on(Section.class).getId(), greatherThan(1)));


On Sat, Apr 27, 2013 at 9:39 PM, Gonzalo R <zei...@gmail.com> wrote:
Hi, I just downloaded lambdaj to start using it on my Android application. However with any simple call the app crashes with the exception java.lang.ExceptionInInitializerError .

The code basically is the following:

Section Entity:

@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 to create tables and fields in a DB. I include them in case they're relevant.

And then a simple code like this causes the crash:

List<Section> sections = fillSections(); //the collection is filled correctly

select(sections, having(on(Section.class).getId() > 1));


I tried creating a simple java (console) program and used the same 'Section' class, etc. etc. and it worked... any idea why could this be happening? Does it have to do with Android?


I REALLY would like to use lambdaj so I hope I'm doing some stupid mistake that I'm not seeing now  :(


Thanks!

--
 
---
You received this message because you are subscribed to the Google Groups "lambdaj" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lambdaj+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Arjun Karangiya

未读,
2013年10月17日 02:07:032013/10/17
收件人 lam...@googlegroups.com
Any work around for android ?
回复全部
回复作者
转发
0 个新帖子