ObjectDB ObjectDB

Issue #316: [ObjectDB 2.2.5_02] Unexpected exception (Error 990) com.objectdb.o.InternalException: java.lang.NullPointerException: null

Type: Bug ReoprtVersion: 1.4.0Priority: NormalStatus: FixedReplies: 2

reporting issue as requested 

[ObjectDB 2.2.5_02] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) Client VM 1.6.0_17 (on Windows XP 5.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.NullPointerException: null
at com.objectdb.jpa.type.IdentifiableTypeImpl.initAttributes(IdentifiableTypeImpl.java:110)
at com.objectdb.jpa.MetamodelImpl.obtainType(MetamodelImpl.java:290)
at com.objectdb.jpa.MetamodelImpl.obtainType(MetamodelImpl.java:264)
at com.objectdb.jpa.MetamodelImpl.entity(MetamodelImpl.java:167)
at com.objectdb.jpa.criteria.AbstractQueryImpl.from(AbstractQueryImpl.java:158)
at com.coastlinemap.jpa.entity.ChartJPAController.findChartEntities(ChartJPAController.java:124)
at com.coastlinemap.jpa.entity.ChartJPAController.findChartEntities(ChartJPAController.java:113)

my code (generated by netbeans) for findEntities() is as follows:

public List<Chart> findChartEntities() {
        return findChartEntities(true, -1, -1);


    public List<Chart> findChartEntities(int maxResults, int firstResult) {
        return findChartEntities(false, maxResults, firstResult);
    private List<Chart> findChartEntities(boolean all, int maxResults, int firstResult) {
        EntityManager em = getEntityManager();
        try {
            CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
            Query q = em.createQuery(cq);
            if (!all) {
            return q.getResultList();
        } finally {



Also, the entity class


public class Chart implements Serializable {

    private TimePeriod id;
    private List<Point> points;

    public Chart() {
        this.points = new ArrayList<Point>();
        this.reverseOrder = Boolean.TRUE;

    public TimePeriod getId() {
        return id;

    public void setId(TimePeriod id) {
        this.id = id;

    public List<Point> getPoints() {
        return points;

    public void setPoints(List<Point> points) {
        this.points = points;



And its embedded primary key


public class TimePeriod implements Serializable

    private long beginTime;
    private long endTime;
    private String periodType;

   public long getBeginTime() {
        return beginTime;

    public void setBeginTime(long beginTime) {
        this.beginTime = beginTime;

    public long getEndTime() {
        return endTime;

    public void setEndTime(long endTime) {
        this.endTime = endTime;

    public String getPeriodType() {
        return periodType;

    public void setPeriodType(String periodType) {
        this.periodType = periodType;




Thank you for your report.

Build 2.2.5_09 should fix this NullPointerException.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Thank you for a quick turnaround.

I can confirm it fixed using Build 2.2.5_10



To post on this website please sign in.