Home » Support » Issue Tracking » Unexpected exception (Error 990) com.objectdb.o.InternalException

Unexpected exception (Error 990) com.objectdb.o.InternalException

Type: BugVersion: 2.6.1Priority: CriticalStatus: FixedReplies: 5
#1

Hello,

we get an exception if we use Enhanced Entities. With not enhanced Entities we get no error.

[ObjectDB 2.6.0_04] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.7.0_71 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.NullPointerException: null
java.lang.NullPointerException
at com.objectdb.o.MMM.af(MMM.java:1071)
at com.objectdb.o.UTY.aE(UTY.java:1262)
at com.objectdb.o.UTY.aD(UTY.java:1251)
at com.objectdb.o.ENH.a(ENH.java:46)
at com.objectdb.o.STA.U(STA.java:532)
at com.objectdb.o.STM.E(STM.java:432)
at com.objectdb.o.OBM.bP(OBM.java:919)
at com.objectdb.jdo.PMImpl.bP(PMImpl.java:2267)
at com.objectdb.o.OBM.bO(OBM.java:833)
at com.objectdb.o.OBM.bN(OBM.java:778)
at com.objectdb.o.QRR.f(QRR.java:139)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:716)
at com.btc.ep.dal.persist.impl.PersistenceService.getModelElementOrNullByQuery(PersistenceService.java:304)
at com.btc.ep.formalnotation.dal.internal.MacroRepositoryImpl.findUsingMacroPatternContainer(MacroRepositoryImpl.java:173)
at com.btc.ep.formalnotation.bl.impl.services.MacroServiceImpl.addUsingPattern(MacroServiceImpl.java:610)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:371)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:384)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter_aroundBody26(PatternApplicationServiceImpl.java:357)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl$AjcClosure27.run(PatternApplicationServiceImpl.java:1)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043cproceed(TransactionAspect.aj:90)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043c(TransactionAspect.aj:96)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter(PatternApplicationServiceImpl.java:350)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification.createSpec(CreateDummySpecification.java:133)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification.access$0(CreateDummySpecification.java:101)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification$1.run(CreateDummySpecification.java:73)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
#2

We get he same exception (same stack trace) with the newer Version 2.6.1.

#3

Thank you for this report. We could reproduce the exception with the following test case:

import javax.persistence.*;


public final class T1620 {

    public static void main(String[] args) {
        EntityManagerFactory emf =
            Persistence.createEntityManagerFactory(
                "objectdb:$objectdb/db/test.tmp;drop");
        EntityManager em = emf.createEntityManager();
       
        // Persist an entity with an embeddable:
        em.getTransaction().begin();
        em.persist(new MyEntity());
        em.getTransaction().commit();

        // Keep a strong reference to the embeddable but free the entity:
        MyEmbeddable embeddable = em.find(MyEntity.class, 1).embeddable;
        System.gc();

        // Update the embeddable:         
        em.getTransaction().begin();
        embeddable.update();
        em.getTransaction().commit(); // unexpected state

        em.close();
        emf.close();
    }


    @Entity
    public static class MyEntity {
        MyEmbeddable embeddable = new MyEmbeddable();
    }
   
    @Embeddable
    public static class MyEmbeddable {
        int x;
        void update() {
            x++;
        }
   }
}

The test case shows that updating an embedded object after garbage collecting of the containing entity object may cause this exception. Is it possible that your application has a similar condition? Build 2.6.1_01 should fix this exception, but only for this specific scenario as demonstrated by the test case above.

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

The build 2.6.1_01 does not solve our problem.

[ObjectDB 2.6.1_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.7.0_71 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.NullPointerException: null
java.lang.NullPointerException
at com.objectdb.o.MMM.af(MMM.java:1071)
at com.objectdb.o.UTY.aE(UTY.java:1262)
at com.objectdb.o.UTY.aD(UTY.java:1251)
at com.objectdb.o.ENH.a(ENH.java:46)
at com.objectdb.o.STA.U(STA.java:532)
at com.objectdb.o.STM.E(STM.java:432)
at com.objectdb.o.OBM.bP(OBM.java:919)
at com.objectdb.jdo.PMImpl.bP(PMImpl.java:2267)
at com.objectdb.o.OBM.bO(OBM.java:833)
at com.objectdb.o.OBM.bN(OBM.java:778)
at com.objectdb.o.QRR.f(QRR.java:139)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:716)
at com.btc.ep.dal.persist.impl.PersistenceService.getModelElementOrNullByQuery(PersistenceService.java:303)
at com.btc.ep.formalnotation.dal.internal.MacroRepositoryImpl.findUsingMacroPatternContainer(MacroRepositoryImpl.java:172)
at com.btc.ep.formalnotation.bl.impl.services.MacroServiceImpl.addUsingPattern(MacroServiceImpl.java:589)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:364)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:377)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter_aroundBody26(PatternApplicationServiceImpl.java:357)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl$AjcClosure27.run(PatternApplicationServiceImpl.java:1)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043cproceed(TransactionAspect.aj:89)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043c(TransactionAspect.aj:96)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter(PatternApplicationServiceImpl.java:350)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.createSpec(DummyALSpecServiceImpl.java:100)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.makeSpecification(DummyALSpecServiceImpl.java:65)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification$1.run(CreateDummySpecification.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The Log file:   (It contains two error, but we get only the second entry as ecxeption)

------------------------------------------------------------------------------------------------------------------------

[2015-03-06 18:25:19 #1 *]
[ObjectDB 2.6.1_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.7.0_71 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.InternalException.f(InternalException.java:236)
at com.objectdb.o.STA.K(STA.java:339)
at com.objectdb.o.ENT.E(ENT.java:535)
at com.objectdb.o.ENT.ah(ENT.java:1389)
at com.objectdb.o.ENT.ag(ENT.java:1244)
at com.objectdb.o.ENT.beforeModifySCO(ENT.java:1174)
at objectdb.java.util.ArrayList.__odbBeforeModify(Unknown Source)
at objectdb.java.util.ArrayList.add(Unknown Source)
at com.btc.ep.formalnotation.bl.impl.containers.PatternContractContainerImpl.addContract(PatternContractContainerImpl.java:69)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.addUsingContract(PatternServiceImpl.java:767)
at com.btc.ep.formalnotation.bl.impl.services.ContractServiceImpl.addAssumption(ContractServiceImpl.java:272)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl.addAssumption_aroundBody18(ContractApplicationServiceImpl.java:223)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl$AjcClosure19.run(ContractApplicationServiceImpl.java:1)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043cproceed(TransactionAspect.aj:89)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043c(TransactionAspect.aj:96)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl.addAssumption(ContractApplicationServiceImpl.java:220)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.createSpec(DummyALSpecServiceImpl.java:88)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.makeSpecification(DummyALSpecServiceImpl.java:65)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification$1.run(CreateDummySpecification.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

------------------------------------------------------------------------------------------------------------------------

[2015-03-06 18:31:32 #1 *]
java.lang.NullPointerException
at com.objectdb.o.MMM.af(MMM.java:1071)
at com.objectdb.o.UTY.aE(UTY.java:1262)
at com.objectdb.o.UTY.aD(UTY.java:1251)
at com.objectdb.o.ENH.a(ENH.java:46)
at com.objectdb.o.STA.U(STA.java:532)
at com.objectdb.o.STM.E(STM.java:432)
at com.objectdb.o.OBM.bP(OBM.java:919)
at com.objectdb.jdo.PMImpl.bP(PMImpl.java:2267)
at com.objectdb.o.OBM.bO(OBM.java:833)
at com.objectdb.o.OBM.bN(OBM.java:778)
at com.objectdb.o.QRR.f(QRR.java:139)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:716)
at com.btc.ep.dal.persist.impl.PersistenceService.getModelElementOrNullByQuery(PersistenceService.java:303)
at com.btc.ep.formalnotation.dal.internal.MacroRepositoryImpl.findUsingMacroPatternContainer(MacroRepositoryImpl.java:172)
at com.btc.ep.formalnotation.bl.impl.services.MacroServiceImpl.addUsingPattern(MacroServiceImpl.java:589)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:364)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:377)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter_aroundBody26(PatternApplicationServiceImpl.java:357)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl$AjcClosure27.run(PatternApplicationServiceImpl.java:1)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043cproceed(TransactionAspect.aj:89)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043c(TransactionAspect.aj:96)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter(PatternApplicationServiceImpl.java:350)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.createSpec(DummyALSpecServiceImpl.java:100)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.makeSpecification(DummyALSpecServiceImpl.java:65)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification$1.run(CreateDummySpecification.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

 

Now it's really interesting: If we change the loggingLevel   from "fatal" to "warning", we get other exceptions.  (We do excactly the same!)

Somtimes:

[ObjectDB 2.6.1_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.7.0_71 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: java.lang.NullPointerException: null
java.lang.NullPointerException
at com.objectdb.o.MMM.af(MMM.java:1071)
at com.objectdb.o.UTY.aE(UTY.java:1262)
at com.objectdb.o.UTY.aD(UTY.java:1251)
at com.objectdb.o.ENH.a(ENH.java:46)
at com.objectdb.o.STA.U(STA.java:532)
at com.objectdb.o.STM.E(STM.java:432)
at com.objectdb.o.OBM.bP(OBM.java:919)
at com.objectdb.jdo.PMImpl.bP(PMImpl.java:2267)
at com.objectdb.o.OBM.bO(OBM.java:833)
at com.objectdb.o.OBM.bN(OBM.java:778)
at com.objectdb.o.QRR.f(QRR.java:139)
at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:716)
at com.btc.ep.dal.persist.impl.PersistenceService.getModelElementOrNullByQuery(PersistenceService.java:303)
at com.btc.ep.formalnotation.dal.internal.MacroRepositoryImpl.findUsingMacroPatternContainer(MacroRepositoryImpl.java:172)
at com.btc.ep.formalnotation.bl.impl.services.MacroServiceImpl.addUsingPattern(MacroServiceImpl.java:589)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:364)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.setExpression(PatternServiceImpl.java:377)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter_aroundBody26(PatternApplicationServiceImpl.java:357)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl$AjcClosure27.run(PatternApplicationServiceImpl.java:1)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043cproceed(TransactionAspect.aj:89)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043c(TransactionAspect.aj:96)
at com.btc.ep.formalnotation.al.internal.PatternApplicationServiceImpl.setPropertyParameter(PatternApplicationServiceImpl.java:350)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.createSpec(DummyALSpecServiceImpl.java:100)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.makeSpecification(DummyALSpecServiceImpl.java:65)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification$1.run(CreateDummySpecification.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

In this case, the log file was not created.

 

And sometimes:

[ObjectDB 2.6.1_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.7.0_71 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.InternalException.f(InternalException.java:236)
at com.objectdb.o.STA.K(STA.java:339)
at com.objectdb.o.ENT.E(ENT.java:535)
at com.objectdb.o.ENT.ah(ENT.java:1389)
at com.objectdb.o.ENT.ag(ENT.java:1244)
at com.objectdb.o.ENT.beforeModifySCO(ENT.java:1174)
at objectdb.java.util.ArrayList.__odbBeforeModify(Unknown Source)
at objectdb.java.util.ArrayList.add(Unknown Source)
at com.btc.ep.formalnotation.bl.impl.containers.PatternContractContainerImpl.addContract(PatternContractContainerImpl.java:69)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.addUsingContract(PatternServiceImpl.java:767)
at com.btc.ep.formalnotation.bl.impl.services.ContractServiceImpl.addAssumption(ContractServiceImpl.java:272)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl.addAssumption_aroundBody18(ContractApplicationServiceImpl.java:223)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl$AjcClosure19.run(ContractApplicationServiceImpl.java:1)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043cproceed(TransactionAspect.aj:89)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043c(TransactionAspect.aj:96)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl.addAssumption(ContractApplicationServiceImpl.java:220)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.createSpec(DummyALSpecServiceImpl.java:88)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.makeSpecification(DummyALSpecServiceImpl.java:65)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification$1.run(CreateDummySpecification.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Log file:

[2015-03-06 18:15:01 #1 *]
[ObjectDB 2.6.1_01] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.7.0_71 (on Windows 7 6.1).
Please report this error on http://www.objectdb.com/database/issue/new
com.objectdb.o.InternalException: null
com.objectdb.o.InternalException
at com.objectdb.o.InternalException.f(InternalException.java:236)
at com.objectdb.o.STA.K(STA.java:339)
at com.objectdb.o.ENT.E(ENT.java:535)
at com.objectdb.o.ENT.ah(ENT.java:1389)
at com.objectdb.o.ENT.ag(ENT.java:1244)
at com.objectdb.o.ENT.beforeModifySCO(ENT.java:1174)
at objectdb.java.util.ArrayList.__odbBeforeModify(Unknown Source)
at objectdb.java.util.ArrayList.add(Unknown Source)
at com.btc.ep.formalnotation.bl.impl.containers.PatternContractContainerImpl.addContract(PatternContractContainerImpl.java:69)
at com.btc.ep.formalnotation.bl.impl.services.PatternServiceImpl.addUsingContract(PatternServiceImpl.java:767)
at com.btc.ep.formalnotation.bl.impl.services.ContractServiceImpl.addAssumption(ContractServiceImpl.java:272)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl.addAssumption_aroundBody18(ContractApplicationServiceImpl.java:223)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl$AjcClosure19.run(ContractApplicationServiceImpl.java:1)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043cproceed(TransactionAspect.aj:89)
at com.btc.ep.base.transactions.annotations.TransactionAspect.ajc$around$com_btc_ep_base_transactions_annotations_TransactionAspect$1$adc4043c(TransactionAspect.aj:96)
at com.btc.ep.formalnotation.al.internal.ContractApplicationServiceImpl.addAssumption(ContractApplicationServiceImpl.java:220)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.createSpec(DummyALSpecServiceImpl.java:88)
at com.btc.ep.formalnotation.al.internal.DummyALSpecServiceImpl.makeSpecification(DummyALSpecServiceImpl.java:65)
at com.btc.ep.formalnotation.ui.handlers.CreateDummySpecification$1.run(CreateDummySpecification.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
#5

Following these stack traces we could build a new test case that still fails:

import java.util.*;

import javax.persistence.*;


public final class T1620 {

    public static void main(String[] args) {
        EntityManagerFactory emf =
            Persistence.createEntityManagerFactory(
                "objectdb:$objectdb/db/test.tmp;drop");
        EntityManager em = emf.createEntityManager();
       
        // Persist an entity with an embeddable:
        em.getTransaction().begin();
        em.persist(new MyEntity());
        em.getTransaction().commit();

        // Keep a strong reference to the embeddable but free the entity:
        List list = em.find(MyEntity.class, 1).list;
        System.gc();

        // Update the embeddable:         
        em.getTransaction().begin();
        list.add("item");
        em.getTransaction().commit(); // unexpected state

        em.close();
        emf.close();
    }

    @Entity
    public static class MyEntity {
        List list = new ArrayList();
    }
}

It is the same problem as demonstrated by the test case in #3 above, but instead of a modified embedded object we have an embedded collection. Build 2.6.1_02 should fix this issue. If the exceptions in your application are due to modifying a persistent collection field after GC of the containing entity then this should now work well with the new build.

 

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

Thank You.

2.6.1_02 fix our problem. Now come no more errors.


Post Reply

To post a reply and/or subscribe to update notifications - please login