Skip to main content



      Home
Home » Modeling » EMF » [CDO] Invalid Classifier URI: null(New repo with ~20 elements only has this error)
[CDO] Invalid Classifier URI: null [message #1722196] Wed, 03 February 2016 05:44 Go to next message
Eclipse UserFriend
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

Re: [CDO] Invalid Classifier URI: null [message #1722223 is a reply to message #1722196] Wed, 03 February 2016 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Am 03.02.2016 um 11:44 schrieb David Wynter:
> 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 single element 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 th eonly 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;
> }
>
>
> How do we go about debugging these broken repos?
If the repo can be opened and loaded from the CDO Explorer it's unlikely that the repo is broken. Probably your
application does something wrong, but I can't guess what that is. Is it possible that you send me a zip with the H2
database, the cdo-server.xml, and the generated models, so that I can try to reproduce the problem? Maybe you can even
write some test code (as similar to your application's configuration as possible) that reproduces the exception?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] Invalid Classifier URI: null [message #1722237 is a reply to message #1722223] Wed, 03 February 2016 10:08 Go to previous message
Eclipse UserFriend
Hi,

I am following this http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/StandaloneContainerExample.java closely and the only difference I can see is that Konstantin had not put the EPackage, session.getPackageRegistry().putEPackage(EDMModelPackage.eINSTANCE);
. I added that but still got the same error. So I'll build a test case as you suggest.

Thx.

David
Previous Topic:[CDO] Missing class when running CDOServer
Next Topic:Augment existing plugin to generate UML diagrams from custom model
Goto Forum:
  


Current Time: Tue Oct 28 20:01:46 EDT 2025

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

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

Back to the top