454 words

Issue #53 - NullPointer running multiple client against server

BugVersion: 2.2.7Priority: NormalStatus: FixedReplies: 2
2011-07-02 14:22


I'm running objectdb in server mode, config as it comes out of the box.

In this case the database is being used as a queue with multiple seperate processes, each with multiple threads, writing messages. The message is split into a lightweight metadata message to allow fast searching and a more heavy weight data message. The put methods are shown below. The message is made up of an id, insert-time, priority and the payload is a large string.

public void put(Message msg) {
  ObjectDbMessage objectDbMessage = msg instanceof ObjectDbMessage
           ? (ObjectDbMessage)msg
           : ObjectDbMessage.CreateObjectDbMessage(msg);
        put(_dataEmf, objectDbMessage);
        synchronized(_queueEmf) {
            put(_queueEmf, objectDbMessage.getMessageMetadata());
public void put(EntityManagerFactory emf, Object obj) {
   EntityManager em = emf.createEntityManager();
   try {
   } catch(Exception e) {
    throw new ApplicationException("Error putting message on objectdb queue", e);
   } finally {

I've tested this extensively in embedded mode and it works fine with many writers and readers. However, in server mode I'm occasionally seeing the error below. It doesn't occur frequently and I've been unable to recreate with a dedicated test as yet (I will post here if I do). I am worried about potentially losing messages though so I was hoping you might be able to shed some light on what is happening.

rbccm.felix.framework.ApplicationException: Error putting message on objectdb queue
at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.put(Unknown Source)
at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.put(Unknown Source)
at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.put(Unknown Source)
at rbccm.felix.gridservice.workflow.WorkflowAdminCallbackService.workflowCallback(Unknown Source)
at rbccm.digest.workflow.execution.WorkflowRunner.workflowCallback(Unknown Source)
at rbccm.digest.workflow.execution.WorkflowRunner.startWorkflow(Unknown Source)
at rbccm.felix.gridservice.workflow.WorkflowService.process(Unknown Source)
at rbccm.felix.gridservice.workflow.WorkflowService.process(Unknown Source)
at rbccm.felix.gridservice.workflow.WorkflowService.process(Unknown Source)
at rbccm.felix.framework.service.ServiceRunner.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.objectdb.o._RollbackException: Failed to commit transaction: $1
at com.objectdb.o.JPE.g(JPE.java:89)
at com.objectdb.o.ERR.f(ERR.java:59)
at com.objectdb.o.OBC.onObjectDBError(OBC.java:1443)
at com.objectdb.jpa.EMImpl.commit(EMImpl.java:277)
... 11 more
Caused by: java.lang.NullPointerException
at com.objectdb.o.TVR.c(TVR.java:67)
at com.objectdb.o.TVR.b(TVR.java:51)
at com.objectdb.o.TYM.ac(TYM.java:517)
at com.objectdb.o.TYM.aa(TYM.java:441)
at com.objectdb.o.TYM.am(TYM.java:760)
at com.objectdb.o.TYM.aq(TYM.java:845)
at com.objectdb.o.EPR.Um(EPR.java:77)
at com.objectdb.o.UML.w(UML.java:544)
at com.objectdb.o.MMM.ad(MMM.java:975)
at com.objectdb.o.UTY.visitRefs(UTY.java:1143)
at com.objectdb.o.TVS.j(TVS.java:169)
at com.objectdb.o.TVS.cascade(TVS.java:146)
at com.objectdb.o.STA.Q(STA.java:476)
at com.objectdb.o.STM.D(STM.java:393)
at com.objectdb.o.OBM.bH(OBM.java:884)
at com.objectdb.jdo.PMImpl.bH(PMImpl.java:2186)
at com.objectdb.o.OBM.bG(OBM.java:800)
at com.objectdb.o.OBM.bE(OBM.java:715)
at com.objectdb.jpa.EMImpl.commit(EMImpl.java:274)
... 11 more

Thanks for your help


felixobjectdb's picture
Joined on 2011-02-10
User Post #22
2011-07-02 19:42

According to the stack trace - it doesn't look as anything serious, just an incomplete check of a new type.

It seems as something that may happen in client-server in one of the clients - if the database is new and that client gets to know the types in the schema in some specific order.

Please try version 2.2.8 that may fix it.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #402
2011-07-03 07:53

I deployed the new build and haven't seen the error since so that seems to have fixed it.


felixobjectdb's picture
Joined on 2011-02-10
User Post #23

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.
Maximum file size: 32 MB