Hi, Ivan!

Well, I've got the same error and fortunately found an easy way to fix it.
Here's the explanation if you're still interested.

First of all, the error that the system gives you isn't quite accurate.
When Slide tries to create a new node it calls the following methods of the
org.apache.slide.structure.StructureImpl class:

public void create(SlideToken token, ObjectNode object,String strUri)
public void store(SlideToken token, ObjectNode object)
protected void store(SlideToken token, ObjectNode object, boolean
setModificationDate)

and the last one tries to check if the active user has the appropriate
access rights (write, in fact) to the object that is being created. So it
calls the method

public void checkCredentials(SlideToken token, ObjectNode object, ActionNode
action)

of the org.apache.slide.security.SecurityImpl class which, in turn, tries to
find the object:

ObjectNode realObject = objectUri.getStore().retrieveObject(objectUri);

And this very call failed for me throwing up the ObjectNotFoundException.
This exception is caught in the same method, swallowed and the familiar
AccessDeniedException is thrown instead. Imho, it's a wrong way of handling
this exception, it should be at least logged.

And now about the reason of having this ObjectNotFoundException. It's
actually quite simple. The SlideToken I was using didn't have its store
enlistment flag mutator set to true. As a result the retrieveObject method
failed to find the object - the "creation" transaction hadn't been committed
at that moment. So I just set this flag to true:

slideToken.setForceStoreEnlistment(true);

and the problem was solved. I hope it'll work for you as well.
And why did it worked in the 2.0 release? I have noticed certain changes in
the store method in the org.apache.slide.structure.StructureImpl class that
might have caused this error but I haven't looked into them.

Yours sincerely,
Andrey.


> -----Original Message-----
> From: Slide Users Mailing List [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 01, 2005 3:10 PM
> To: Slide Users Mailing List <[email protected]>
> Subject: RE: Errors when creating a new node
> Importance: Low
> 
> -----Original Message-----
> From: Andrey Shulinsky [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 31, 2005 5:48 PM
> To: 'Slide Users Mailing List'
> Subject: RE: Errors when creating a new node
> 
> > I'm working with the 2.0 so it ought to be the 2.1 problem. 
> > And can a user (say, root) actually put a file using a 
> WebDAV client?
> 
> I am not using WebDAV, so testing from a client is not an 
> option.  Is it simply that Slide 2.1 is broken for such 
> simple operations?
> 
> Cheers,
> 
> Ivan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> [EMAIL PROTECTED] <mailto:> For 
> additional commands, e-mail: 
> [EMAIL PROTECTED] <mailto:> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to