NullPointerException by getting map with null values

25 views
Skip to first unread message

phimi

unread,
May 7, 2013, 10:04:25 AM5/7/13
to mor...@googlegroups.com
Hi all,

i've a map in my collection that looks like this: 
"someMap" : {
"de" : null,
"en" : null
}
When I try to get this with morphia than the following error is thrown:

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException

at com.github.jmkgreen.morphia.mapping.DefaultMapper.fromDb(DefaultMapper.java:531)

at com.github.jmkgreen.morphia.mapping.DefaultMapper.fromDBObject(DefaultMapper.java:273)

at com.github.jmkgreen.morphia.query.MorphiaIterator.convertItem(MorphiaIterator.java:64)

at com.github.jmkgreen.morphia.query.MorphiaIterator.processItem(MorphiaIterator.java:51)

at com.github.jmkgreen.morphia.query.MorphiaIterator.next(MorphiaIterator.java:46)

at com.github.jmkgreen.morphia.query.QueryImpl.asList(QueryImpl.java:261)

...


This map was added with morphia. So I think it must be possible to get them back on this way. Is this a bug in morphia? Has anybody an workaround for this?


Regards


Philipp

Reply all
Reply to author
Forward
0 new messages