| [CDO] Invalid Classifier URI: null [message #1722196] |
Wed, 03 February 2016 05:44  |
Eclipse User |
|
|
|
Hi,
This is a common theme we have with our CDO repos. We often get this exception rendering them useless. Previously it has always been large repos. But now I have one that is manageable in size, a couple of dozen elements is in the repo, the model however is reasonably large.
Caused by: java.lang.IllegalArgumentException: Invalid classifier URI:null
at org.eclipse.emf.cdo.common.model.CDOClassifierRef.<init>(CDOClassifierRef.java:64)
at org.eclipse.emf.cdo.common.model.CDOClassifierRef.<init>(CDOClassifierRef.java:82)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOClassifierRef(CDODataInputImpl.java:164)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl.readCDOClassifierRefAndResolve(CDODataInputImpl.java:169)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readResult(RevisionInfo.java:304)
at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readResult(RevisionInfo.java:166)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:143)
at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:1)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequest.confirming(CDOClientRequest.java:97)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedInput(RequestWithConfirmation.java:125)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:105)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:442)
at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:502)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:535)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.loadRevisions(CDOClientProtocol.java:172)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.loadRevisions(CDORevisionManagerImpl.java:387)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:292)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:282)
at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.convertToEMF(CDOStoreImpl.java:652)
at org.eclipse.emf.internal.cdo.view.CDOStoreImpl.get(CDOStoreImpl.java:191)
at org.eclipse.emf.ecore.impl.EStoreEObjectImpl$BasicEStoreEList.delegateGet(EStoreEObjectImpl.java:241)
at org.eclipse.emf.common.util.DelegatingEList.get(DelegatingEList.java:230)
at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:705)
at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:692)
at org.apache.commons.collections.CollectionUtils.find(CollectionUtils.java:369)
I had a look in the H2 database repo to see which CDO tables were populated. CDO_External_Refs is the only table I could find that has a URI column name. All rows have a value in the URI column name. They take the form
http://www.example.com/edmmodel#//Product
I can open this same repo using the CDO Explorer view in Eclipse and all elements therein show CLEAN against their entry.
So maybe it is something about the way we open the repo from within our code?
Here is the call to CollectionsUtil you see in the trace above
private ResourceMap getResourceMap() {
ResourceMap resourceMap = null;
if (this.eResourceService.getEResource() != null) {
resourceMap = (ResourceMap) CollectionUtils.find(this.eResourceService.getEResource().getContents(), new InstanceofPredicate(ResourceMap.class));
}
return resourceMap;
}
public interface ResourceMap extends CDOObject {
EList<Resource> getResource();
}
I added the source code we use to load our CDO resources as an attachment. The author of it has long gone.
How do we go about debugging these broken repos?
Thx.
David
[Updated on: Wed, 03 February 2016 07:57] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03762 seconds