McClain Looney <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I'm a new slide user, and  have cvs current compiled and running in tomcat, 
> but am having a couple of problems:
> 
> 1. I have some junit tests which i'm using to play with the slide api. in one 
> particular test, i'm trying to create a new user SubjectNode in /users (see 
> below), when i call structure.create(), the txfilestore throws "access error: 
> Invalid transaction Id". no idea why.
> 

> 
> //test case
>       NamespaceAccessToken namespace =
>                       Domain.accessNamespace(new SecurityToken(new String()), 
> "slide");
>               assertNotNull(namespace);
>               CredentialsToken credentials = new CredentialsToken("root");
>               Security security = namespace.getSecurityHelper();
>               Structure structure = namespace.getStructureHelper();
>               SlideToken slide = new SlideTokenImpl(credentials);
>               SubjectNode usersNode = (SubjectNode)structure.retrieve(slide, 
> "/users/");
>               assertNotNull(usersNode);
>               String userUri = "/users/user." + System.currentTimeMillis();
>               slide = new SlideTokenImpl(credentials);
> /*  ServiceAccess exception thrown  here */
>               structure.create(slide,new SubjectNode(), userUri);
>               log.debug(structure.getChildren(slide, usersNode));
> 

Wrap the operations into a namespace.begin() and namespace.commit().
Unlike slide 1.0.16 the cvs head requires you to do your operations 
inside a transaction. Probably some of the examples/documentation are 
still wrong here.

Martin

--
Martin Holz     <[EMAIL PROTECTED]>

Softwareentwicklung / Vernetztes Studium - Chemie
FIZ CHEMIE Berlin
Franklinstrasse 11
D-10587 Berlin     


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

Reply via email to