From dev-return-18700-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Fri May 09 11:05:18 2008 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 78046 invoked from network); 9 May 2008 11:05:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 May 2008 11:05:18 -0000 Received: (qmail 5943 invoked by uid 500); 9 May 2008 11:05:19 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 5556 invoked by uid 500); 9 May 2008 11:05:18 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 5539 invoked by uid 99); 9 May 2008 11:05:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 May 2008 04:05:18 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 May 2008 11:04:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E167E234C10F for ; Fri, 9 May 2008 04:04:55 -0700 (PDT) Message-ID: <1537937786.1210331095922.JavaMail.jira@brutus> Date: Fri, 9 May 2008 04:04:55 -0700 (PDT) From: "angela (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method In-Reply-To: <1061036008.1209768295645.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595553#action_12595553 ] angela commented on JCR-1571: ----------------------------- > I created my repository by using the "Populate" link in the default Jackrabbit deployment of > the war file. that's fine (an probably does something similar as my manual test) > I don't know if the comment from Julian Reschle is sufficient to isolate it. i guess it is. > These are some notes on your log and mine > - I do see HR tags in the response from the server yes. but i'm quite sure, that they are not generated by the webdav servlet. > - The version of the http client you are using is different from mine (I'm > running 3.1 -although I don't think this is the problem) nor do i. httpclient 3.0 is the version used with the spi2dav project. > - You are using a different version of the servlet container (I am > usingTomcat) yes. and i assume, that it is tomcat that generates the html error page... and i assume that there is a way to turn that off as it should be possible to configure a custom error page. can you try that? angela > JCR Webdav Server doesn't support node.hasNode() method > ------------------------------------------------------- > > Key: JCR-1571 > URL: https://issues.apache.org/jira/browse/JCR-1571 > Project: Jackrabbit > Issue Type: Bug > Components: sandbox > Affects Versions: core 1.4.2 > Environment: JDK 1.6; Tomcat 6; Windows 2003 > Reporter: Julio Castillo > Assignee: angela > Attachments: HasNodeTest.java, trace_JCR-1571.txt > > > I have a set up that uses the JCR Webdav Server from a custom remote client. > I've noticed one thing, anytime I request a node that doesn't exist the error that comes back from the server is as follows: > [Fatal Error] :1:941: The element type "HR" must be terminated by the matching end-tag "". > javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "".: The element type "HR" must be terminated by the matching end-tag "". > Doesn't really make sense, but that is OK, I can handle that. > My problem: > I have a partially populated repository that at the root has a few nodes like > /edu/.... > /com/ibm/.. > So, I want to create a few nodes of type nt:folder under > com/myCompany/folder1 > I have no problem creating them, but since "com" already exists I end up with > com[2]/myCompany/folder1. > So, I went ahead and used the parentNode.hasNode("folderName") method. > This method returns true for the "com" portion, but when I test for the "myCompany" folder which should return false I get the error response shown above from the server. > The webdav request looks as follows: > PROPFIND /jackrabbit/server/default/jcr%3aroot/com/myCompany > The snippet of code looks as follows: > private Node createFolders (Session session, Node parentNode, List folders) > throws RepositoryException { > Node folderNode = null; > for (String folder : folders) { > if (parentNode.hasNode(folder)) > folderNode = parentNode.getNode(folder); > else > folderNode = parentNode.addNode(folder, "nt:folder"); > parentNode = folderNode; > } > session.save(); > return (folderNode); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.