Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO]: CDOViewImpl#getResource on resource that does not exist throws InvalidURIException
[CDO]: CDOViewImpl#getResource on resource that does not exist throws InvalidURIException [message #426178] Thu, 18 December 2008 09:54 Go to next message
Andre Dietisheim is currently offline Andre DietisheimFriend
Messages: 131
Registered: July 2009
Senior Member
Hi all!

I'm writing tests for my Defs when I came across the following:

I execute CDOViewImpl#getResource with a path that denotes a resource
that does not exist yet. The result is that CDOURIUtil throws a

org.eclipse.emf.cdo.util.InvalidURIException: Invalid URI: cdo://repo1/test1

On the other hand, if I use no demandLoad, I get null.

Is this behaviour correct?

the cause I tracked so far is that this happens when the inexisting
resource gets demand loaded. CDOView tries to register a proxy resource
(CDOViewImpl#registerProxyResource(CDOResourceImpl resource)) and fails
when its up to get its resource id (getResourceID(path)).

Cheers
André
Re: [CDO]: CDOViewImpl#getResource on resource that does not exist throws InvalidURIException [message #426179 is a reply to message #426178] Thu, 18 December 2008 10:14 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
André,

Yes, this is currently the expected behaviour for CDO 2.0.
A discussion about this topic with Ed is pending ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com






André Dietisheim schrieb:
> Hi all!
>
> I'm writing tests for my Defs when I came across the following:
>
> I execute CDOViewImpl#getResource with a path that denotes a resource
> that does not exist yet. The result is that CDOURIUtil throws a
>
> org.eclipse.emf.cdo.util.InvalidURIException: Invalid URI:
> cdo://repo1/test1
>
> On the other hand, if I use no demandLoad, I get null.
>
> Is this behaviour correct?
>
> the cause I tracked so far is that this happens when the inexisting
> resource gets demand loaded. CDOView tries to register a proxy
> resource (CDOViewImpl#registerProxyResource(CDOResourceImpl resource))
> and fails when its up to get its resource id (getResourceID(path)).
>
> Cheers
> André


Re: [CDO]: CDOViewImpl#getResource on resource that does not exist throws InvalidURIException [message #426180 is a reply to message #426179] Thu, 18 December 2008 10:18 Go to previous message
Andre Dietisheim is currently offline Andre DietisheimFriend
Messages: 131
Registered: July 2009
Senior Member
Hi Eike

I thought so, it matches quite what I read about ResourceFactories in
Eds Book. I wasn't quite sure though if it's correct to let it fail by
throwing an Exception that tells about an invalid URI. Thanks!

Cheers
André


Eike Stepper wrote:
> André,
>
> Yes, this is currently the expected behaviour for CDO 2.0.
> A discussion about this topic with Ed is pending ;-)
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
>
>
>
> André Dietisheim schrieb:
>> Hi all!
>>
>> I'm writing tests for my Defs when I came across the following:
>>
>> I execute CDOViewImpl#getResource with a path that denotes a resource
>> that does not exist yet. The result is that CDOURIUtil throws a
>>
>> org.eclipse.emf.cdo.util.InvalidURIException: Invalid URI:
>> cdo://repo1/test1
>>
>> On the other hand, if I use no demandLoad, I get null.
>>
>> Is this behaviour correct?
>>
>> the cause I tracked so far is that this happens when the inexisting
>> resource gets demand loaded. CDOView tries to register a proxy
>> resource (CDOViewImpl#registerProxyResource(CDOResourceImpl resource))
>> and fails when its up to get its resource id (getResourceID(path)).
>>
>> Cheers
>> André
Previous Topic:new generic Datatype not generated properly
Next Topic:Using Sample Reflective Ecore Model Editor on our XMI files
Goto Forum:
  


Current Time: Thu Apr 25 15:59:42 GMT 2024

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

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

Back to the top