Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] NPE in AbstractHorizintalClassMapping.initTable()(Is this a bug? )
[CDO] NPE in AbstractHorizintalClassMapping.initTable() [message #1737467] Fri, 08 July 2016 13:02 Go to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
I am using CDO 4.4.1.v20160215 in Kepler

Here is my stack trace, which occurs when I try to save the model

!STACK 0
org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: java.lang.NullPointerException
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.initTable(AbstractHorizontalClassMapping.java:127)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.<init>(AbstractHorizontalClassMapping.java:111)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalAuditClassMapping.<init>(HorizontalAuditClassMapping.java:94)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalAuditMappingStrategy.doCreateClassMapping(HorizontalAuditMappingStrategy.java:48)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createClassMapping(AbstractMappingStrategy.java:678)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.getClassMapping(AbstractMappingStrategy.java:726)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.queryXRefs(AbstractHorizontalMappingStrategy.java:164)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.queryXRefs(HorizontalMappingStrategy.java:189)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.queryXRefs(DBStoreAccessor.java:337)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext$XRefContext.getXRefs(TransactionCommitContext.java:1601)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.checkXRefs(TransactionCommitContext.java:1267)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:647)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:48)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1144)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1137)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:293)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:101)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:98)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:100)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:369)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:73)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:67)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:275)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:154)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

	at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:89)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commitSynced(CDOTransactionImpl.java:1316)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1290)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1257)
	at com.yambina.edm.commons.platform.internalservices.EResourceService.commit(EResourceService.java:339)
	at com.yambina.edm.commons.platform.EDMPlatform$3.run(EDMPlatform.java:293)
...


I used the CDO Explorer view to open the model and when I try to save it I get the same exception.

The tablename it is trying to init is the EAnnotation table (line 118 of AbstractHorizontalClassMapping) There is no schemaTransaction set for IDBDatabase.

Some guidance on how to debug this would be welcome.
Re: [CDO] NPE in AbstractHorizintalClassMapping.initTable() [message #1737470 is a reply to message #1737467] Fri, 08 July 2016 13:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 08.07.2016 um 16:02 schrieb David Wynter:
> I am using CDO 4.4.1.v20160215 in Kepler
Kepler is very old, but probably unrelated to CDO issues.

CDO 4.4 is also out of maintenance. Have you tried the same scenario with the just release CDO 4.5?

What database are you using?

>
> Here is my stack trace, which occurs when I try to save the model
>
> !STACK 0
> org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: java.lang.NullPointerException
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.initTable(AbstractHorizontalClassMapping.java:127)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.<init>(AbstractHorizontalClassMapping.java:111)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalAuditClassMapping.<init>(HorizontalAuditClassMapping.java:94)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalAuditMappingStrategy.doCreateClassMapping(HorizontalAuditMappingStrategy.java:48)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.createClassMapping(AbstractMappingStrategy.java:678)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.getClassMapping(AbstractMappingStrategy.java:726)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.queryXRefs(AbstractHorizontalMappingStrategy.java:164)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.queryXRefs(HorizontalMappingStrategy.java:189)
> at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.queryXRefs(DBStoreAccessor.java:337)
> at
> org.eclipse.emf.cdo.internal.server.TransactionCommitContext$XRefContext.getXRefs(TransactionCommitContext.java:1601)
> at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.checkXRefs(TransactionCommitContext.java:1267)
You could try the same usage scenario without referential integrity checks. That could gives us some pointers.

> at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:647)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:48)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
> at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
> at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1144)
> at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1137)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:293)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:101)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:98)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:100)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:369)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:73)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:67)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:275)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:154)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
>
> at
> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:89)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commitSynced(CDOTransactionImpl.java:1316)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1290)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1257)
> at com.yambina.edm.commons.platform.internalservices.EResourceService.commit(EResourceService.java:339)
> at com.yambina.edm.commons.platform.EDMPlatform$3.run(EDMPlatform.java:293)
> ..
>
>
> I used the CDO Explorer view to open the model and when I try to save it I get the same exception.
>
> The tablename it is trying to init is the EAnnotation table (line 118 of AbstractHorizontalClassMapping) There is no
> schemaTransaction set for IDBDatabase.
I'd need exact steps to follow in order to reproduce the problem ;-(

>
> Some guidance on how to debug this would be welcome.
It would probably be good to set a breakpoint on the line that acquires the null pointer and then step through the code.
Depending on what you find out I might be able to give more advice.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] NPE in AbstractHorizintalClassMapping.initTable() [message #1737484 is a reply to message #1737470] Fri, 08 July 2016 15:06 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
I'll upgrade to 4.5. As you said in earlier advice to me CDO is independent of the Eclipse version, at least as far back a Kepler, which we have to use for a while yet.

Re: [CDO] NPE in AbstractHorizintalClassMapping.initTable() [message #1737565 is a reply to message #1737484] Sun, 10 July 2016 05:47 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 08.07.2016 um 18:06 schrieb David Wynter:
> I'll upgrade to 4.5.
Great. You'll let us know how it goes ;-)

> As you said in earlier advice to me CDO is independent of the Eclipse version,
That is correct. At least for the non-UI parts of Net4j and CDO.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



> at least as far back a Kepler, which we have to use for a while yet.


Previous Topic:[CDO] CDOViews and controlling updates
Next Topic:CDO mapping with UUIDs
Goto Forum:
  


Current Time: Wed Apr 24 16:47:41 GMT 2024

Powered by FUDForum. Page generated in 0.02962 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top