448 words

com.objectdb.o.InternalException: Unexpected internal exception

#1
2016-06-01 12:33

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

junior
junior's picture
Joined on 2016-05-25
User Post #1
#2
2016-06-01 18:24

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,514

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel