Marco Ferretti | 1 Jun 11:29
Picon

Re: Help! My DASL search not ordering results

On Wednesday 20 April 2005 12:56, Paul Hussein wrote:
> I am trying to get my DASL search to order my results.
>
> I use this XML
>
> <D:searchrequest xmlns:D="DAV:">
> <D:basicsearch><D:select><D:allprop/></D:select><D:from><D:scope>
> <D:href></D:href><D:depth>1</D:depth></D:scope></D:from></D:basicsearch>
> <D:orderby>
>    <D:order>
>       <D:prop><D:displayname/></D:prop>
>    </D:order>
> </D:orderby>
> </D:searchrequest>
>
>
> Can anyone tell me why my results done order on the displayname ?
>
>
> Cheers
>
> Paul.
>

Probably is the </D:basicsearch> tag that should be moved after the 
</D:orderby> tag. This *should* make the <D:orderby> tag ignored .

A question : wouldn't it be nice if the grammar parser could tell the end user 
of the <D:orderby> tag outside the <D:basicsearch> tag ? In general : since 
the specification says that the server MUST support the <D:basicsearch> 
(Continue reading)

Marco Ferretti | 1 Jun 12:04
Picon

Re: correct way of using NotificationListener

Hi Daniel,
sorry for bugging you, but I am trying to use the approach that you suggested 
in the previous post on this topic : 

#########################################
#### Test.java
#########################################
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.protocol.Protocol;
import org.apache.webdav.lib.NotificationListener;
import org.apache.webdav.lib.methods.DepthSupport;

public class Test {

    public static void main ( String args[] ){
        Test.testListener();
    }

    static void testListener() {
        NotificationListener listener = null;
        mySubscriber subscriber = null;
        try{

            String root = "/slide";
            String resource = "files/test.log";
            listener = new NotificationListener("",0,"127.0.0.1",8080,
                    Protocol.getProtocol("http"), new 
UsernamePasswordCredentials("root","root"),
                    root,30000,false);

(Continue reading)

Brusic, Ivan | 1 Jun 20:50

Retrieving namespace definition / store properties

I am trying to access the /slide/namespace/defintion/story/contentstore
properties defined in domain.xml via code.  NamespaceConfig obviously
doesn't have them, and there are no get methods defined in ContentStore.
I am basically trying to retrieve the value of path to the content root.
Is this at all possible?

Thanks in advance.

--

-- 
Ivan

Charlton Chris | 2 Jun 12:00
Favicon

Anyone get Slide WebDAV working with Weblogic?


Hi -  

I'm having problems getting Slide working with Weblogic8.1 SP4 (it works
fine with Tomcat), and am wondering if anyone else has had more luck and has
got it working.

I've followed searched throught the mail threads, and followed the advice on
the weblogic config in the Llide wiki, and it (apparently) deploys nicely -
however a browser call to http://localhost:7001/slide/ returns a 404 file
not found, and connecting with DavExplorer returns DAV Interpreter: 400 bad
request.

The weblogic log looks like the following (for the davexplorer failed
connection).

ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',
26-May-2005 13:39:14, root, OPTIONS, 200 "OK", 311 ms, /index.jsp
ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',
26-May-2005 13:39:20, root, OPTIONS, 200 "OK", 50 ms, /index.jsp
ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',
26-May-2005 13:39:20, root, PROPFIND, 400 "Bad Request", 20 ms, /index.jsp

I thought it could be the default of WLS of not generating a directory
page... so in my weblogic.xml I included
  <container-descriptor>
    <index-directory-enabled>true</index-directory-enabled>
  </container-descriptor>
but that didn't sort it.

(Continue reading)

Mark Breitner | 2 Jun 13:22
Picon
Picon

WebDAV - Exchange - Question : Tasks with attachments

Hi,

I know this is not a slide-only question but maybe someone knows the answer.

I want to create an exchange task (already done) with several attachments in
it (not yet done).

Who knows how to create these attachments for tasks in exchange  ?

Thanks in advance

Mark Breitner

--

-- 
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++
Martin Kalén | 2 Jun 18:55
Picon
Favicon

Re: Store object

Guillaume Chervet wrote:
> Do you know where I can find more informations about slide? I don't
> understand the store system. I am using (org.apache.slide.content) but I
> don't find how to store some java objects. I can store "String" object
> using this example
> http://wiki.apache.org/jakarta-slide/Sample_API_application, but nothing
> more.
> Do you know how it works?

If you can serialize your objects, you can use Java serialization to
byte array or ObjectOutputStream/ObjectInputStream and store the
contents by calling:

void store(SlideToken token, String strUri,
                NodeRevisionDescriptor revisionDescriptor,
                NodeRevisionContent revisionContent)

The NodeRevisionContent is the Slide API object carrying the content
itself and you need to attach content to it like so:
   NodeRevisionContent content = new NodeRevisionContent();
   content.setContent(bytes[] or char[] or Reader or InputStream);

To understand how to use the API it's a good idea to browse through
different methods in the WebDAV servlet implementation. Or you can
try WCK for an API that might be easier to "digest" than the full
Content / Storage etc in Slide.

HTH,
  Martin
(Continue reading)

Martin Kalén | 2 Jun 19:05
Picon
Favicon

Re: Deadlock in Slide 2.1 RC 1 /Tomcat 5.0.29

Scott Lewis wrote:
> Is there a version of Slide that runs on 5.5 (jvm 1.5)?

P.S. Slide kernel from CVS HEAD runs fine under Tomcat 5.5.x,
at least with JRE 1.4 and the Tomcat compatibility JAR installed.

I have not tried with either JRE 5.0 or the Slide WebDAV servlet.

Regards,
  Martin
Martin Kalén | 2 Jun 19:03
Picon
Favicon

Re: Deadlock in Slide 2.1 RC 1 /Tomcat 5.0.29

Scott Lewis wrote:
> We are working with/using the Slide libraries (2.1RC1) on Tomcat (v 
> 5.0.28 currently).   We are having what seems to be a deadlock condition 
> inside the Slide server code.

Are you using different RDBMS-based stores pointing to the same database?

I have a reproducable case where Slide from CVS HEAD (pre-2.2) deadlocks
if permissions for two stores are configured to the same DB through
DBCP pools in each store.

(My usage pattern is that I share permissions in DB but have content for
one URL-tree on disk and content for another URL-tree in RDBMS.)

When Slide loads the initial permissions entries from Domain.xml on
a blank DB it will deadlock when it tries to grant permission on one
store and calls assertUri for the root note just created by the other
store.

I haven't had time to debug this further or work on a patch, but you
can easily verify if your condition is similar by starting Tomcat in
JPDA debug mode, attach a debugger with the Slide source code available
and check if the deadlock is in a executeUpdate call to your JDBC driver
called from grantPermission and assertUri on top of that in the stack.

Regards,
  Martin
Scott Lewis | 2 Jun 20:33

Re: Deadlock in Slide 2.1 RC 1 /Tomcat 5.0.29

Hi Martin,

I'm not using RDBMS at all...just FileSystemStore (or whatever the class 
name is), so it sounds like this probably isn't the same thing.

Thanks though.

Scott

Martin Kalén wrote:

> Scott Lewis wrote:
>
>> We are working with/using the Slide libraries (2.1RC1) on Tomcat (v 
>> 5.0.28 currently).   We are having what seems to be a deadlock 
>> condition inside the Slide server code.
>
>
> Are you using different RDBMS-based stores pointing to the same database?
>
> I have a reproducable case where Slide from CVS HEAD (pre-2.2) deadlocks
> if permissions for two stores are configured to the same DB through
> DBCP pools in each store.
>
> (My usage pattern is that I share permissions in DB but have content for
> one URL-tree on disk and content for another URL-tree in RDBMS.)
>
> When Slide loads the initial permissions entries from Domain.xml on
> a blank DB it will deadlock when it tries to grant permission on one
> store and calls assertUri for the root note just created by the other
(Continue reading)

Martin Kalén | 2 Jun 20:54
Picon
Favicon

Re: Retrieving namespace definition / store properties

Brusic, Ivan wrote:
> I am trying to access the /slide/namespace/defintion/story/contentstore
> properties defined in domain.xml via code.  NamespaceConfig obviously
> doesn't have them, and there are no get methods defined in ContentStore.
> I am basically trying to retrieve the value of path to the content root.
> Is this at all possible?

I didn't find any easily accessible API methods to retrieve this.

However, if you are using an EmbeddedDomain and don't mind extremly
ugly code (major hack-warning!) the answer is:
  yes, it is _possible_
(bot not supported by the API, not nice or clean,
  and as far as I could see not possible under a strict JRE
  security model since the hacky solution includes looking
  up protected fields by reflection).

//EmbeddedDomain domain;
//...init domain...

String namespaceName = "yourNamespace";
String principal = "yourUser";
String uri = "/your/path/of/choice";

String key = "rootpath";

Namespace ns = domain.getNamespace(namespaceName);
CredentialsToken credentials = new CredentialsToken(principal);
SlideToken slideToken = new SlideTokenImpl(credentials);
Uri slideUri = ns.getUri(slideToken, uri);
(Continue reading)


Gmane