Kevin,

I'm using Slide 1.0.16 as well but with MySQL.  I noticed that your user creation code 
initializes the domain with the default configuration file.  I was able to get user 
creation to work but before retrieving the NamespaceAccessToken I had to call 
Domain.init(/path/to/config/file) with my own stripped down version of the config 
file.  Here's the config file below.  You'd need to modify it for Oracle of course.  
Notice that I didn't provide any <data> since the client will be managing users with 
the helpers. 

Tom

*******************************************************************************
<?xml version="1.0"?>

<slide>

  <namespace name="novus">

  <definition>
    <store name="jdbc">
      <nodestore classname="slidestore.reference.JDBCDescriptorsStore">
       <parameter name="driver">org.gjt.mm.mysql.Driver</parameter>
       <parameter name="url">jdbc:mysql://localhost/slidedb</parameter>
       <parameter name="user">root</parameter>
       <parameter name="password">####</parameter>
      </nodestore>
      <securitystore>
        <reference store="nodestore" />
      </securitystore>
      <lockstore>
        <reference store="nodestore" />
      </lockstore>
      <revisiondescriptorsstore>
        <reference store="nodestore" />
      </revisiondescriptorsstore>
      <revisiondescriptorstore>
        <reference store="nodestore" />
      </revisiondescriptorstore>
      <contentstore classname="slidestore.reference.FileContentStore">
        <parameter name="rootpath">c:/dev/contentstore</parameter>
        <parameter name="version">true</parameter>
        <parameter name="resetBeforeStarting">false</parameter>
      </contentstore>
    </store>
    <scope match="/" store="jdbc" />
    <logger classname="org.apache.slide.util.logger.SimpleLogger" 
     logger-level="6" />
  </definition>
     
  <configuration>

    <!-- Actions mapping -->
    <default-action>/actions</default-action>
    <read-object>/actions/read</read-object>
    <create-object>/actions/write</create-object>
    <remove-object>/actions/write</remove-object>
    <grant-permission>/actions/manage</grant-permission>
    <revoke-permission>/actions/manage</revoke-permission>
    <read-permissions>/actions/manage</read-permissions>
    <lock-object>/actions/write</lock-object>
    <kill-lock>/actions/manage</kill-lock>
    <read-locks>/actions/read</read-locks>
    <read-revision-metadata>/actions/read</read-revision-metadata>
    <create-revision-metadata>/actions/write</create-revision-metadata>
    <modify-revision-metadata>/actions/write</modify-revision-metadata>
    <remove-revision-metadata>/actions/write</remove-revision-metadata>
    <read-revision-content>/actions/read</read-revision-content>
    <create-revision-content>/actions/write</create-revision-content>
    <modify-revision-content>/actions/write</modify-revision-content>
    <remove-revision-content>/actions/write</remove-revision-content>

    <!-- Paths configuration -->
    <userspath>/users</userspath>
    <guestpath>guest</guestpath>
    <filespath>/documents</filespath>
    <parameter name="dav">true</parameter>
    <parameter name="standalone">true</parameter>

    <!-- Roles definition -->
    <role name="root">slideroles.basic.RootRole</role>
    <role name="user">slideroles.basic.UserRole</role>
    <role name="guest">slideroles.basic.GuestRole</role>

    <!-- Users management -->
    <auto-create-users>false</auto-create-users>

  </configuration>
    
  </namespace>

</slide>




-----Original Message-----
From: Kevin Moran [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 11:44 AM
To: [EMAIL PROTECTED]
Subject: Commit in JDBCDescriptorsStore?


Hi all,
    I'm trying desperately to create a user in Slide
and am not having much luck.  Perhaps someone can shed
some light on my problem.  I'm finding that
JDBCDescriptorsStore.commit() is not being called
after I create a node and its revision descriptor. 
I'm wondering if that's expected behavior.
    I'm using the code at
http://marc.theaimsgroup.com/?l=slide-user&m=102033777129601&w=2
to create a user.  In order to provide the method with
Content and Structure arguments, I call
Domain.accessNamespace() once and then get the
helpers.  When I do that I see the tables in my
database are updated to reflect what's in Domain.xml. 
I also see that JDBCDescriptorsStore.commit() is
called a time or two.  All of this is what I'd expect
to see.
    However, when I create a node and call
Structure.create() followed by Content.create(), those
same tables are not updated.  I know Slide is at least
partially aware of the new node because I get an
ObjectAlreadyExistsException if I try to create the
same user.  Debugging statements show me that
JDBCDescriptorsStore.commit() is not being called.  I
guess that's why the database is not being updated.
    Not that it's an acceptable hack, but I did find
that if I modified JDBCDescriptorsStore to turn on
autoCommit() on the Connection, the node I created
showed up immediately in the database.  This is
probably not a good idea as the comment in
JDBCDescriptorsStore indicates autoCommit must be
false for the updates to be in a transaction.  Having
said that, I do get several warnings about "No active
transaction."  So I don't know if that's part, if not
all, of the problem.
    Anyway, if anyone has seen this problem or has any
suggestions, I'd love to hear from them.

Thanks much!
-kevin

P.S.  I'm using JDK 1.4.0 and Slide 1.0.16 with a
JDBCDescriptorsStore that accesses an Oracle 8.1.7
database.


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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


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

Reply via email to