You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Patrick van Kann <pa...@fortune-cookie.com> on 2004/02/19 22:26:36 UTC

2 questions about the beta

First of all, it's great to see Slide 2.0 hit the beta phase - well 
done, and thanks for the time and effort.

Secondly, I have 2 questions that will hopefully be easy to answer:

1) I use the single-sign-on mechanism for Tomcat with slide as a webapp. 
I don't want to use SlideRealm because my other webapps would also have 
to use it, so my users/roles are in a standard Tomcat RDBMS realm. I 
created roles called root, guest and user and assigned these to the 
users in my RDBMS realm. These users can access /slide/files path and 
/slide/users/. They can open and save existing files using XP webfolders 
as the client. However, when I try and create a new file I get a 403 on 
the PUT - I suspect this is because my users don't have access to the 
revisions stuff (you get a 403 if you try and read /slide/history, 
/slide/workspace/ and slide/workresource/. This applies even to users 
with the root role! What am I doing wrong? It seems to be very close to 
working. Is it necessary to use the slide realm?

2) I'm using the J2EE realm, configured as described in the slide-doc 
web app. However, I am using the pre 2.0 beta schema. It all seems to 
work as before, but I am wondering where I can get the latest schema 
from? It doesn't seem to be part of the binary distribution for the beta.

BTW, I am using SQL Server.

Cheers,

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: 2 questions about the beta

Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Hi Patrick!

Patrick van Kann wrote:
> Hi Oliver,
> 
> I have done a little digging and I think I have eliminated transaction 
> management as the cause. Here is what I did.
> 
> 1) Changed over to the straight JDBC version using the SQL Server 
> adapter (thereby eliminating Tyrex from the equation).
> 2) Closed browser and logged in with a NON-SLIDE user
> 3) Recieved a 500 internal server error, but WITHOUT the warning about 
> transactions.
> 4) Closed browser and logged in with a Slide user (good 'ol John) and it 
> worked fine. This made me think this might be the original problem.
> 5) Changed back to the J2EE version using Tyrex and logged in as John - 
> all fine!
> 
> Therefore, it appears that the problem is caused by logging into Slide 
> with a user who is in my JDBC realm but NOT in Slide's Domain.xml.
> 
> I have noticed that the <auto-create-user> option seems to no longer 
> exist in Slide 2. Is there an equivalent in the new version?
> 
> If not, how do I add new users to Slide without editing Domain.xml? It 
> seems the client utility lacks a command for this. Must it be done 
> programmatically?

You have more knowledge about Slide's past than me :( Did not even know 
of this option and what it did. I guess Peter is the right one to ask.

Peter, do you have any information about this?

> Sorry to bombard you with questions - however, it might give me the 
> impetus to resurrect the old admin app for user management and migrate 
> it to Struts 1.1...

I would be most delighted if somebody did so! Slide is so HUGE I really 
saw myself forced to *temporarily* remove unmaintained stuff until 
someone volunteers to resurrect and take care of them. If you decide to 
do so I will assist in as much as I can.

Oliver



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: 2 questions about the beta

Posted by Patrick van Kann <pa...@fortune-cookie.com>.
Hi Oliver,

I have done a little digging and I think I have eliminated transaction 
management as the cause. Here is what I did.

1) Changed over to the straight JDBC version using the SQL Server 
adapter (thereby eliminating Tyrex from the equation).
2) Closed browser and logged in with a NON-SLIDE user
3) Recieved a 500 internal server error, but WITHOUT the warning about 
transactions.
4) Closed browser and logged in with a Slide user (good 'ol John) and it 
worked fine. This made me think this might be the original problem.
5) Changed back to the J2EE version using Tyrex and logged in as John - 
all fine!

Therefore, it appears that the problem is caused by logging into Slide 
with a user who is in my JDBC realm but NOT in Slide's Domain.xml.

I have noticed that the <auto-create-user> option seems to no longer 
exist in Slide 2. Is there an equivalent in the new version?

If not, how do I add new users to Slide without editing Domain.xml? It 
seems the client utility lacks a command for this. Must it be done 
programmatically?

Sorry to bombard you with questions - however, it might give me the 
impetus to resurrect the old admin app for user management and migrate 
it to Struts 1.1...

Cheers,

Patrick



Oliver Zeigermann wrote:

> Patrick van Kann wrote:
>
>> Hi,
>>
>> Thanks for the schema However,. I think I may have found a mistake in 
>> the documentation for the J2EEstores, and possibly a regression 
>> problem in the binary release.
>>
>> The docs (at http://jakarta.apache.org/slide/howto-j2eestore.html) 
>> says to use the following config for the content store
>>
>> <contentstore classname="slidestore.j2ee.J2EEContentStore">
>>   <parameter name="datasource">jdbc/CookieslideDS</parameter>
>> </contentstore>
>
>
> Yes, you are right. I will fix this...
>
>> But this class doesn't exist in the slide-stores2.0b.jar. Instead, I 
>> have tried to replace this with:
>>
>> <contentstore>
>>  <reference store="nodestore"/>
>> </contentstore>
>
>
> Right...
>
>> However, I am having trouble to get this to work. This is what 
>> happens when I try to access content.
>>
>> 20 Feb 2004 14:48:47 - WARNING - WARNING: No active transaction
>> Thread-6, 20-Feb-2004 14:48:47, patrick, GET, 500 "Internal Server 
>> Error", 50 ms, /files
>
>
> As far as I remember no transaction is started for a GET. There are 
> other methods you will not need a transaction for. That's why I open a 
> temporary connection when there is no active transaction and thus no 
> connection associated to it. The code looks like:
>
>         if (getActiveTransactionContext() == null) {
>             Connection connection = null;
>             try {
>                 connection = getNewConnection();
>                 return adapter.retrieveObject(connection, uri);
>             } catch (SQLException e) {
>                 throw new ServiceAccessException(this, e);
>             } finally {
>                 if (connection != null) {
>                     try {
>                         connection.close();
>                     } catch (SQLException e) {
>                         getLogger().log(e, LOG_CHANNEL, Logger.WARNING);
>                     }
>                 }
>             }
>         } else {
>             return adapter.retrieveObject(getCurrentConnection(), uri);
>         }
>
> This works fine with Slide's internal JTA implementaion, but I have no 
> idea what about Tyrex or other implementations more compliant to the 
> spec. Would be interesting to find out though...
>
>> It may be because I am using Tyrex to manage transactions and manage 
>> my datasource. However, this exact configuration worked with the CVS 
>> version I downloaded in October/November 2003.
>>
>> It is a regression problem? I seem to recall that the J2EE stores 
>> were patched mid-last year because of transaction management problems.
>
>
> Most likely. I have changed pretty much concerning connections and 
> transaction stuff.
>
> It would be a great help if you could persue this a little bit more 
> and see why this fails. Any ideas?
>
> Oliver
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: 2 questions about the beta

Posted by Oliver Zeigermann <ol...@zeigermann.de>.
I guess you do not call the store from the WebDAV layer, do you? All 
write operations require an active transaction as more than one DB 
request is done. Thus you should be fine if you start a transaction 
before calling those methods.

Cheers,

Oliver

Willie Vu wrote:
> Oliver,
> 
> I notice that some methods in AbstractRDBMSStore such as retrieveObject() has
> the code as you mentioned below.  
> 
> 
>>>20 Feb 2004 14:48:47 - WARNING - WARNING: No active transaction
>>>Thread-6, 20-Feb-2004 14:48:47, patrick, GET, 500 "Internal Server 
>>>Error", 50 ms, /files
>>
>>As far as I remember no transaction is started for a GET. There are
>>other methods you will not need a transaction for. That's why 
>>I open a 
>>temporary connection when there is no active transaction and thus no 
>>connection associated to it. The code looks like:
>>
>>         if (getActiveTransactionContext() == null) {
>>             Connection connection = null;
>>             try {
>>                 connection = getNewConnection();
>>                 return adapter.retrieveObject(connection, uri);
>>             } catch (SQLException e) {
>>                 throw new ServiceAccessException(this, e);
>>             } finally {
>>                 if (connection != null) {
>>                     try {
>>                         connection.close();
>>                     } catch (SQLException e) {
>>                         getLogger().log(e, LOG_CHANNEL,
>>Logger.WARNING);
>>                     }
>>                 }
>>             }
>>         } else {
>>             return 
>>adapter.retrieveObject(getCurrentConnection(), uri);
>>         }
>>
>>This works fine with Slide's internal JTA implementaion, but
>>I have no 
>>idea what about Tyrex or other implementations more compliant to the 
>>spec. Would be interesting to find out though...
>>
> 
> 
> I wonder why it isn't done in all other methods.  I ran into
> NullPointerException due to No active transaction when grantPermission() is
> called.
> 
> 27 Feb 2004 15:55:58 - WARNING - WARNING: No active transaction 27 Feb 2004
> 15:55:58 - org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - Getting current
> connection for thread Thread[main,5,main] 27 Feb 2004 15:55:58 -
> org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - No id for current thread -
> called outside transaction? 27 Feb 2004 15:55:58 -
> org.apache.slide.common.SlideException - DEBUG -
> org.apache.slide.common.ServiceAccessException: Service
> org.apache.slide.store.impl.rdbms.JDBCStore@16f70a4 access error :
> java.lang.NullPointerException 	at
> org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.grantPermission(StandardR
> DBMSAdapter.java:534) 	at
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.grantPermission(AbstractRDB
> MSStore.java:501) 	at
> org.apache.slide.store.AbstractStore.grantPermission(AbstractStore.java:622)
> at org.apache.slide.store.ExtendedStore.grantPermission(ExtendedStore.java:476)
> at org.apache.slide.security.SecurityImpl.grantPermission(SecurityImpl.java:239)
> 
> Regards,
> 
> 
> Willie Vu
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: 2 questions about the beta

Posted by Willie Vu <ct...@ust.hk>.
Oliver,

I notice that some methods in AbstractRDBMSStore such as retrieveObject() has
the code as you mentioned below.  

> > 20 Feb 2004 14:48:47 - WARNING - WARNING: No active transaction
> > Thread-6, 20-Feb-2004 14:48:47, patrick, GET, 500 "Internal Server 
> > Error", 50 ms, /files
> 
> As far as I remember no transaction is started for a GET. There are
> other methods you will not need a transaction for. That's why 
> I open a 
> temporary connection when there is no active transaction and thus no 
> connection associated to it. The code looks like:
> 
>          if (getActiveTransactionContext() == null) {
>              Connection connection = null;
>              try {
>                  connection = getNewConnection();
>                  return adapter.retrieveObject(connection, uri);
>              } catch (SQLException e) {
>                  throw new ServiceAccessException(this, e);
>              } finally {
>                  if (connection != null) {
>                      try {
>                          connection.close();
>                      } catch (SQLException e) {
>                          getLogger().log(e, LOG_CHANNEL,
> Logger.WARNING);
>                      }
>                  }
>              }
>          } else {
>              return 
> adapter.retrieveObject(getCurrentConnection(), uri);
>          }
> 
> This works fine with Slide's internal JTA implementaion, but
> I have no 
> idea what about Tyrex or other implementations more compliant to the 
> spec. Would be interesting to find out though...
> 

I wonder why it isn't done in all other methods.  I ran into
NullPointerException due to No active transaction when grantPermission() is
called.

27 Feb 2004 15:55:58 - WARNING - WARNING: No active transaction 27 Feb 2004
15:55:58 - org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - Getting current
connection for thread Thread[main,5,main] 27 Feb 2004 15:55:58 -
org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - No id for current thread -
called outside transaction? 27 Feb 2004 15:55:58 -
org.apache.slide.common.SlideException - DEBUG -
org.apache.slide.common.ServiceAccessException: Service
org.apache.slide.store.impl.rdbms.JDBCStore@16f70a4 access error :
java.lang.NullPointerException 	at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.grantPermission(StandardR
DBMSAdapter.java:534) 	at
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.grantPermission(AbstractRDB
MSStore.java:501) 	at
org.apache.slide.store.AbstractStore.grantPermission(AbstractStore.java:622)
at org.apache.slide.store.ExtendedStore.grantPermission(ExtendedStore.java:476)
at org.apache.slide.security.SecurityImpl.grantPermission(SecurityImpl.java:239)

Regards,


Willie Vu



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: 2 questions about the beta

Posted by Willie Vu <wi...@yahoo.com>.
Oliver,

I notice that some methods in AbstractRDBMSStore such as retrieveObject() has
the code as you mentioned below.  

> > 20 Feb 2004 14:48:47 - WARNING - WARNING: No active transaction 
> > Thread-6, 20-Feb-2004 14:48:47, patrick, GET, 500 "Internal Server 
> > Error", 50 ms, /files
> 
> As far as I remember no transaction is started for a GET. There are 
> other methods you will not need a transaction for. That's why 
> I open a 
> temporary connection when there is no active transaction and thus no 
> connection associated to it. The code looks like:
> 
>          if (getActiveTransactionContext() == null) {
>              Connection connection = null;
>              try {
>                  connection = getNewConnection();
>                  return adapter.retrieveObject(connection, uri);
>              } catch (SQLException e) {
>                  throw new ServiceAccessException(this, e);
>              } finally {
>                  if (connection != null) {
>                      try {
>                          connection.close();
>                      } catch (SQLException e) {
>                          getLogger().log(e, LOG_CHANNEL, 
> Logger.WARNING);
>                      }
>                  }
>              }
>          } else {
>              return 
> adapter.retrieveObject(getCurrentConnection(), uri);
>          }
> 
> This works fine with Slide's internal JTA implementaion, but 
> I have no 
> idea what about Tyrex or other implementations more compliant to the 
> spec. Would be interesting to find out though...
> 

I wonder why it isn't done in all other methods.  I ran into
NullPointerException due to No active transaction when grantPermission() is
called.

27 Feb 2004 15:55:58 - WARNING - WARNING: No active transaction 27 Feb 2004
15:55:58 - org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - Getting current
connection for thread Thread[main,5,main] 27 Feb 2004 15:55:58 -
org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG - No id for current thread -
called outside transaction? 27 Feb 2004 15:55:58 -
org.apache.slide.common.SlideException - DEBUG -
org.apache.slide.common.ServiceAccessException: Service
org.apache.slide.store.impl.rdbms.JDBCStore@16f70a4 access error :
java.lang.NullPointerException 	at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.grantPermission(StandardR
DBMSAdapter.java:534) 	at
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.grantPermission(AbstractRDB
MSStore.java:501) 	at
org.apache.slide.store.AbstractStore.grantPermission(AbstractStore.java:622)
at org.apache.slide.store.ExtendedStore.grantPermission(ExtendedStore.java:476)
at org.apache.slide.security.SecurityImpl.grantPermission(SecurityImpl.java:239)

Regards,


Willie Vu




---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: 2 questions about the beta

Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Patrick van Kann wrote:
> Hi,
> 
> Thanks for the schema However,. I think I may have found a mistake in 
> the documentation for the J2EEstores, and possibly a regression problem 
> in the binary release.
> 
> The docs (at http://jakarta.apache.org/slide/howto-j2eestore.html) says 
> to use the following config for the content store
> 
> <contentstore classname="slidestore.j2ee.J2EEContentStore">
>   <parameter name="datasource">jdbc/CookieslideDS</parameter>
> </contentstore>

Yes, you are right. I will fix this...

> But this class doesn't exist in the slide-stores2.0b.jar. Instead, I 
> have tried to replace this with:
> 
> <contentstore>
>  <reference store="nodestore"/>
> </contentstore>

Right...

> However, I am having trouble to get this to work. This is what happens 
> when I try to access content.
> 
> 20 Feb 2004 14:48:47 - WARNING - WARNING: No active transaction
> Thread-6, 20-Feb-2004 14:48:47, patrick, GET, 500 "Internal Server 
> Error", 50 ms, /files

As far as I remember no transaction is started for a GET. There are 
other methods you will not need a transaction for. That's why I open a 
temporary connection when there is no active transaction and thus no 
connection associated to it. The code looks like:

         if (getActiveTransactionContext() == null) {
             Connection connection = null;
             try {
                 connection = getNewConnection();
                 return adapter.retrieveObject(connection, uri);
             } catch (SQLException e) {
                 throw new ServiceAccessException(this, e);
             } finally {
                 if (connection != null) {
                     try {
                         connection.close();
                     } catch (SQLException e) {
                         getLogger().log(e, LOG_CHANNEL, Logger.WARNING);
                     }
                 }
             }
         } else {
             return adapter.retrieveObject(getCurrentConnection(), uri);
         }

This works fine with Slide's internal JTA implementaion, but I have no 
idea what about Tyrex or other implementations more compliant to the 
spec. Would be interesting to find out though...

> It may be because I am using Tyrex to manage transactions and manage my 
> datasource. However, this exact configuration worked with the CVS 
> version I downloaded in October/November 2003.
> 
> It is a regression problem? I seem to recall that the J2EE stores were 
> patched mid-last year because of transaction management problems.

Most likely. I have changed pretty much concerning connections and 
transaction stuff.

It would be a great help if you could persue this a little bit more and 
see why this fails. Any ideas?

Oliver



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: 2 questions about the beta

Posted by Patrick van Kann <pa...@fortune-cookie.com>.
Hi,

Thanks for the schema However,. I think I may have found a mistake in 
the documentation for the J2EEstores, and possibly a regression problem 
in the binary release.

The docs (at http://jakarta.apache.org/slide/howto-j2eestore.html) says 
to use the following config for the content store

<contentstore classname="slidestore.j2ee.J2EEContentStore">
   <parameter name="datasource">jdbc/CookieslideDS</parameter>
</contentstore>

But this class doesn't exist in the slide-stores2.0b.jar. Instead, I 
have tried to replace this with:

<contentstore>
  <reference store="nodestore"/>
</contentstore>

However, I am having trouble to get this to work. This is what happens 
when I try to access content.

20 Feb 2004 14:48:47 - WARNING - WARNING: No active transaction
Thread-6, 20-Feb-2004 14:48:47, patrick, GET, 500 "Internal Server 
Error", 50 ms, /files

It may be because I am using Tyrex to manage transactions and manage my 
datasource. However, this exact configuration worked with the CVS 
version I downloaded in October/November 2003.

It is a regression problem? I seem to recall that the J2EE stores were 
patched mid-last year because of transaction management problems.

Patrick

Oliver Zeigermann wrote:

> Patrick van Kann wrote:
>
>> First of all, it's great to see Slide 2.0 hit the beta phase - well 
>> done, and thanks for the time and effort.
>>
>> Secondly, I have 2 questions that will hopefully be easy to answer:
>>
>> 1) I use the single-sign-on mechanism for Tomcat with slide as a 
>> webapp. I don't want to use SlideRealm because my other webapps would 
>> also have to use it, so my users/roles are in a standard Tomcat RDBMS 
>> realm. I created roles called root, guest and user and assigned these 
>> to the users in my RDBMS realm. These users can access /slide/files 
>> path and /slide/users/. They can open and save existing files using 
>> XP webfolders as the client. However, when I try and create a new 
>> file I get a 403 on the PUT - I suspect this is because my users 
>> don't have access to the revisions stuff (you get a 403 if you try 
>> and read /slide/history, /slide/workspace/ and slide/workresource/. 
>> This applies even to users with the root role! What am I doing wrong? 
>> It seems to be very close to working. Is it necessary to use the 
>> slide realm?
>
>
> Just guessing, but maybe, for some reason, you do not have write access?!
>
>> 2) I'm using the J2EE realm, configured as described in the slide-doc 
>> web app. However, I am using the pre 2.0 beta schema. It all seems to 
>> work as before, but I am wondering where I can get the latest schema 
>> from? It doesn't seem to be part of the binary distribution for the 
>> beta.
>
>
> Oooops. You are right, the schema is not part of the binary release. I 
> will think about how to make this public, though. Anyway until this 
> happens I will attach the version from CVS for SQL Server...
>
> Oliver
>
>> BTW, I am using SQL Server.
>>
>> Cheers,
>>
>> Patrick
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>
>------------------------------------------------------------------------
>
>/**********************************************************************/
>/******    DROP SLIDE TABLES                                     ******/
>/**********************************************************************/
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[OBJECT]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[OBJECT]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[BINDING]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[BINDING]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PARENT_BINDING]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[PARENT_BINDING]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[CHILDREN]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[CHILDREN]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[LINKS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[LINKS]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[LOCKS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[LOCKS]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[VERSION_CONTENT]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[VERSION_CONTENT]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PROPERTIES]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[PROPERTIES]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PERMISSIONS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[PERMISSIONS]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[VERSION_PREDS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[VERSION_PREDS]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[VERSION_LABELS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[VERSION_LABELS]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[VERSION_HISTORY]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[VERSION_HISTORY]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[VERSION]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[VERSION]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[BRANCH]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[BRANCH]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[LABEL]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[LABEL]
>GO
>
>IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[URI]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
>DROP TABLE [dbo].[URI]
>GO
>
>/**********************************************************************/
>/******    DROP EXISTING USER DEFINED DATA TYPES                 ******/
>/**********************************************************************/
>
>sp_droptype id_type
>GO
>
>sp_droptype uri_str_type
>GO
>
>sp_droptype revision_no_type
>GO
>
>sp_droptype hash_type
>GO
>
>sp_droptype literal_str_type
>GO
>
>sp_droptype value_str_type
>GO
>
>
>/**********************************************************************/
>/******    ADD USER DEFINED DATA TYPES                           ******/
>/**********************************************************************/
>
>sp_addtype id_type,           bigint
>GO
>
>sp_addtype uri_str_type,     "nvarchar(800)"
>GO
>
>sp_addtype revision_no_type, "nvarchar(20)"
>GO
>
>sp_addtype hash_type,         bigint
>GO
>
>sp_addtype literal_str_type, "nvarchar(3000)"
>GO
>
>sp_addtype value_str_type,   "nvarchar(255)"
>GO
>
>/**********************************************************************/
>/******    CREATE SLIDE TABLES                                   ******/
>/**********************************************************************/
>
>CREATE TABLE dbo.URI (
>    URI_ID          id_type               IDENTITY  UNIQUE  NOT NULL,
>    URI_STRING      uri_str_type          UNIQUE  NOT NULL,
> --   UNIQUE NONCLUSTERED (URI_ID)
>)
>GO
>
>CREATE INDEX XUID
>	ON URI(URI_ID) 
>GO
>
>CREATE INDEX XUSTRING
>	ON URI(URI_STRING) 
>GO
>
>CREATE TABLE dbo.OBJECT (
>    URI_ID          id_type               PRIMARY KEY,
>    CLASS_NAME      nvarchar(255)          NOT NULL,
>    CONSTRAINT      FK_OBJECT_URI_ID
>       FOREIGN KEY (URI_ID)
>       REFERENCES   URI (URI_ID)
>)
>GO    
>
>CREATE TABLE dbo.BINDING (
>    URI_ID          id_type               NOT NULL
>        REFERENCES  URI (URI_ID),
>    NAME            uri_str_type          NOT NULL,
>    CHILD_UURI_ID    id_type              NOT NULL
>        REFERENCES  URI (URI_ID),
>    UNIQUE CLUSTERED (URI_ID, NAME, CHILD_UURI_ID)
>)
>GO
>
>CREATE TABLE dbo.PARENT_BINDING (
>    URI_ID          id_type               NOT NULL
>        REFERENCES  URI (URI_ID),
>    NAME            uri_str_type          NOT NULL,
>    PARENT_UURI_ID    id_type             NOT NULL
>        REFERENCES  URI (URI_ID),
>    UNIQUE CLUSTERED (URI_ID, NAME, PARENT_UURI_ID)
>) 
>GO
>
>CREATE TABLE dbo.LINKS (
>    URI_ID          id_type               NOT NULL  FOREIGN KEY
>        REFERENCES  URI (URI_ID),
>    LINK_TO_ID      id_type               NOT NULL  FOREIGN KEY
>        REFERENCES  URI (URI_ID),
>    --UNIQUE CLUSTERED (URI_ID, LINK_TO_ID)
>)
>GO
>
>CREATE INDEX XURI_ID
>	ON LINKS(URI_ID) 
>GO
>
>
>CREATE INDEX XLINK_TO_ID
>	ON LINKS(LINK_TO_ID) 
>GO
>
>CREATE TABLE dbo.LOCKS (
>    LOCK_ID         id_type               PRIMARY KEY,
>    OBJECT_ID       id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   URI (URI_ID),
>    SUBJECT_ID      id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   URI (URI_ID),
>    TYPE_ID         id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   URI (URI_ID),
>    EXPIRATION_DATE numeric(14, 0)   	  NOT NULL,
>    IS_INHERITABLE  bit                   NOT NULL, 
>    IS_EXCLUSIVE    bit                   NOT NULL,
>    OWNER           nvarchar(255),
>    CONSTRAINT      FK_LOCKS_LOCK_ID
>       FOREIGN KEY (LOCK_ID)
>       REFERENCES   URI (URI_ID)
>)
>GO
>
>CREATE TABLE dbo.BRANCH ( 
>    BRANCH_ID       id_type               IDENTITY  UNIQUE NOT NULL,
>    BRANCH_STRING   nvarchar(255)          UNIQUE NOT NULL,
>    UNIQUE NONCLUSTERED (BRANCH_ID)
>)
>GO
>
>CREATE TABLE dbo.LABEL (
>    LABEL_ID        id_type               IDENTITY  UNIQUE NOT NULL,
>    LABEL_STRING    nvarchar(255)          NOT NULL,
>    UNIQUE NONCLUSTERED (LABEL_ID)
>)
>GO
>
>CREATE TABLE dbo.VERSION (
>    URI_ID          id_type               PRIMARY KEY,
>    IS_VERSIONED    bit                   NOT NULL,    
>    CONSTRAINT      FK_VERSION_URI_ID
>       FOREIGN KEY (URI_ID)
>       REFERENCES   URI (URI_ID)
>)
>GO
>
>CREATE TABLE dbo.VERSION_HISTORY (
>    VERSION_ID      id_type               IDENTITY  UNIQUE NOT NULL,
>    URI_ID          id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   VERSION (URI_ID),
>    BRANCH_ID       id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   BRANCH (BRANCH_ID),
>    REVISION_NO     nVARCHAR(20)	       	  NOT NULL,
>    --UNIQUE CLUSTERED (URI_ID, BRANCH_ID, REVISION_NO)
>)
>GO
>CREATE INDEX XVERSION_HISTORY1 
>	ON VERSION_HISTORY(URI_ID, BRANCH_ID, REVISION_NO) 
>GO
>
>CREATE TABLE dbo.VERSION_PREDS (
>    VERSION_ID         id_type            NOT NULL  FOREIGN KEY 
>        REFERENCES  VERSION_HISTORY (VERSION_ID),
>    PREDECESSOR_ID     id_type            NOT NULL  FOREIGN KEY
>        REFERENCES  VERSION_HISTORY (VERSION_ID),
>    UNIQUE CLUSTERED (VERSION_ID, PREDECESSOR_ID)
>)
>GO
>CREATE INDEX XVERSION_PREDS1 
>	ON VERSION_PREDS(VERSION_ID, PREDECESSOR_ID) 
>GO
>
>CREATE TABLE dbo.VERSION_LABELS (
>    VERSION_ID         id_type            NOT NULL  FOREIGN KEY
>        REFERENCES  VERSION_HISTORY (VERSION_ID),
>    LABEL_ID           id_type            NOT NULL  FOREIGN KEY
>        REFERENCES  LABEL (LABEL_ID), 
>    UNIQUE CLUSTERED (VERSION_ID, LABEL_ID)
>)
>GO
>
>CREATE TABLE dbo.VERSION_CONTENT (
>    VERSION_ID         id_type            PRIMARY KEY,
>    CONTENT            image              NOT NULL,
>    CONSTRAINT FK_VC_VERSION_ID 
>        FOREIGN KEY (VERSION_ID)
>        REFERENCES  VERSION_HISTORY (VERSION_ID),
>)
>GO
>
>CREATE TABLE dbo.PROPERTIES (
>    VERSION_ID         id_type            NOT NULL  FOREIGN KEY
>        REFERENCES  VERSION_HISTORY (VERSION_ID),    
>    PROPERTY_NAMESPACE nvarchar(50)        NOT NULL, 
>    PROPERTY_NAME      nvarchar(50)        NOT NULL,        
>    PROPERTY_VALUE     nvarchar(255)       NOT NULL,
>    PROPERTY_TYPE      nvarchar(50)        NOT NULL, 
>    IS_PROTECTED       bit                NOT NULL,
>    UNIQUE CLUSTERED (VERSION_ID, PROPERTY_NAMESPACE, PROPERTY_NAME)
>)
>GO
>
>CREATE TABLE dbo.PERMISSIONS (
>    OBJECT_ID       id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   URI (URI_ID),
>    SUBJECT_ID      id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   URI (URI_ID),
>    ACTION_ID       id_type               NOT NULL  FOREIGN KEY
>       REFERENCES   URI (URI_ID),
>    VERSION_NO      nVARCHAR(20)           NULL,
>    IS_INHERITABLE  bit                   NOT NULL,
>    IS_NEGATIVE     bit                   NOT NULL,
>    -- Both order and sequence would be more suitable, but can not be used
>    SUCCESSION      int                   NOT NULL,
>    UNIQUE CLUSTERED (OBJECT_ID, SUBJECT_ID, ACTION_ID),
>    UNIQUE (OBJECT_ID, SUCCESSION)
>)
>GO
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: 2 questions about the beta

Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Patrick van Kann wrote:

> First of all, it's great to see Slide 2.0 hit the beta phase - well 
> done, and thanks for the time and effort.
> 
> Secondly, I have 2 questions that will hopefully be easy to answer:
> 
> 1) I use the single-sign-on mechanism for Tomcat with slide as a webapp. 
> I don't want to use SlideRealm because my other webapps would also have 
> to use it, so my users/roles are in a standard Tomcat RDBMS realm. I 
> created roles called root, guest and user and assigned these to the 
> users in my RDBMS realm. These users can access /slide/files path and 
> /slide/users/. They can open and save existing files using XP webfolders 
> as the client. However, when I try and create a new file I get a 403 on 
> the PUT - I suspect this is because my users don't have access to the 
> revisions stuff (you get a 403 if you try and read /slide/history, 
> /slide/workspace/ and slide/workresource/. This applies even to users 
> with the root role! What am I doing wrong? It seems to be very close to 
> working. Is it necessary to use the slide realm?

Just guessing, but maybe, for some reason, you do not have write access?!

> 2) I'm using the J2EE realm, configured as described in the slide-doc 
> web app. However, I am using the pre 2.0 beta schema. It all seems to 
> work as before, but I am wondering where I can get the latest schema 
> from? It doesn't seem to be part of the binary distribution for the beta.

Oooops. You are right, the schema is not part of the binary release. I 
will think about how to make this public, though. Anyway until this 
happens I will attach the version from CVS for SQL Server...

Oliver

> BTW, I am using SQL Server.
> 
> Cheers,
> 
> Patrick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
>