com.objectdb.o.InternalException: Unexpected internal exception

#1

Hi,

I am using objectdb.jar version 2.6.8 (installed via Maven).

I am trying to authenticate a user. Initially, the database is empty.

I have the following query:

@javax.persistence.NamedQuery(

  name = "getPersonByName",

  query = "SELECT _person FROM metamodel.user.Person as _person WHERE _person.userName = :userName"

)

I execute the query as follows:

em.getMetamodel().managedType(Person.class);
List pList = em.createNamedQuery("getPersonByName",Person.class).setParameter("userName", name).getResultList();

I get the following exception:

com.objectdb.o.InternalException: Unexpected internal exception
        at com.objectdb.o.JPE.h(JPE.java:168)
        at com.objectdb.o.ERR.f(ERR.java:66)
        at com.objectdb.o.OBC.onObjectDBError(OBC.java:1556)
        at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:728)
        at dex.server.metamodel.PersonDao.getPersonByName(PersonDao.java:47)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
        at sun.reflect.GeneratedMethodAccessor691.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
        ... 93 more
Caused by: java.lang.NullPointerException
        at com.objectdb.o.DCE.T(DCE.java:754)
        at com.objectdb.o.LDR.L(LDR.java:822)
        at com.objectdb.o.LDR.A(LDR.java:222)
        at com.objectdb.o.OBC.aP(OBC.java:1061)
        at com.objectdb.o.OBC.aN(OBC.java:966)
        at com.objectdb.o.OBC.UZ(OBC.java:798)
        at com.objectdb.o.SRB.l(SRB.java:160)
        at com.objectdb.o.QRR.m(QRR.java:549)
        at com.objectdb.o.QRR.f(QRR.java:212)
        at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719)
        ... 115 more

Can you please tell me what I am doing wrong ?

Thanks

#2

The stack trace indicates a NullPointerException due to an unexpected SharedCacheMode null value in the PersistenceUnitInfo that was used to initialize the EntityManagerFactory.

Please try build 2.6.8_02 that should fix this issue.

ObjectDB Support

Reply