[jira] Created: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

[jira] Created: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


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 "</HR>".
javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".

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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594218#action_12594218 ]

angela commented on JCR-1571:
-----------------------------

julio, could you attach the http-conversion? that would make it easier for me to
track the problem.

thanks in advance!
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
>
> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Assigned: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela reassigned JCR-1571:
---------------------------

    Assignee: 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
>
> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Updated: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julio Castillo updated JCR-1571:
--------------------------------

    Attachment: trace_JCR-1571.txt

Angela,
attached are the excerpts of 2 PROPFIND http requests:
first one searching for the node /com which it finds and the second one searching for the node /com/myCompany which will not find because it doesn't exist.

Let me know if you need more information.

** julio

> 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: 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595148#action_12595148 ]

angela commented on JCR-1571:
-----------------------------

hi julio

first of all: i don't think that the <HR> is sent by the JCR-server.

i quickly tried it out having the attached test cases:

test 1) creating a 'myTest' node -> save -> new session -> parent.hasNode should return true
test 2) same as 1) by trying parent.hasNode without the node being created before.

both work for me as expected... did i misunderstand your test? please let me know.

test 1) log

C-2-#022602 -> [PROPFIND /mytest/server/default/jcr%3aroot/testroot/myTest HTTP/1.1 ]
C-2-#022671 -> [Depth: 1 ]
C-2-#022681 -> [Authorization: Basic YWRtaW46YWRtaW4= ]
C-2-#022720 -> [User-Agent: Jakarta Commons-HttpClient/3.0 ]
C-2-#022764 -> [Host: localhost:5502 ]
C-2-#022786 -> [Content-Length: 599 ]
C-2-#022807 -> [Content-Type: text/xml; charset=UTF-8 ]
C-2-#022846 -> [ ]
C-2-#022848 -> [<?xml version="1.0" encoding="UTF-8"?>]
C-2-#022887 -> [<D:propfind xmlns:D="DAV:"><D:prop><dcr:name xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/><dcr:referen
ces xmlns:dcr="http://www.day.com/jcr/]
C-2-#023028 -> [webdav/1.0"/><dcr:index xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/><dcr:path xmlns:dcr="http://www.d
ay.com/jcr/webdav/1.0"/><dcr:mixinnod]
C-2-#023169 -> [etypes xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/><dcr:parent xmlns:dcr="http://www.day.com/jcr/webd
av/1.0"/><dcr:primarynodetype xmlns:d]
C-2-#023310 -> [cr="http://www.day.com/jcr/webdav/1.0"/><D:resourcetype/><dcr:uuid xmlns:dcr="http://www.day.com/jcr/web
dav/1.0"/></D:prop></D:propfind>]
S-2-#117910 -> [HTTP/1.1 207 Code 207 ]
[...]


test 2) log

C-0-#013648 -> [PROPFIND /mytest/server/default/jcr%3aroot/testroot/myTest HTTP/1.1 ]
C-0-#013717 -> [Depth: 1 ]
C-0-#013727 -> [Authorization: Basic YW5vbnltb3VzOg== ]
C-0-#013766 -> [User-Agent: Jakarta Commons-HttpClient/3.0 ]
C-0-#013810 -> [Host: localhost:5502 ]
C-0-#013832 -> [Content-Length: 599 ]
C-0-#013853 -> [Content-Type: text/xml; charset=UTF-8 ]
C-0-#013892 -> [ ]
C-0-#013894 -> [<?xml version="1.0" encoding="UTF-8"?>]
C-0-#013933 -> [<D:propfind xmlns:D="DAV:"><D:prop><dcr:name xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/><dcr:referen
ces xmlns:dcr="http://www.day.com/jcr/]
C-0-#014074 -> [webdav/1.0"/><dcr:index xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/><dcr:path xmlns:dcr="http://www.d
ay.com/jcr/webdav/1.0"/><dcr:mixinnod]
C-0-#014215 -> [etypes xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/><dcr:parent xmlns:dcr="http://www.day.com/jcr/webd
av/1.0"/><dcr:primarynodetype xmlns:d]
C-0-#014356 -> [cr="http://www.day.com/jcr/webdav/1.0"/><D:resourcetype/><dcr:uuid xmlns:dcr="http://www.day.com/jcr/web
dav/1.0"/></D:prop></D:propfind>]
S-0-#077856 -> [HTTP/1.1 404 Not Found ]
S-0-#077880 -> [Host: localhost:4302 ]
S-0-#077902 -> [Connection: Close ]
S-0-#077921 -> [Server: Communique Servlet Engine/4.0.2 ]
S-0-#077962 -> [Content-Type: text/html ]
S-0-#077987 -> [Date: Thu, 08 May 2008 08:26:54 GMT ]
S-0-#078024 -> [Transfer-Encoding: chunked ]
S-0-#078052 -> [ ]
S-0-#078054 -> [65 ]
S-0-#078058 -> [<html><head><title> ]
S-0-#078079 -> [404 ]
S-0-#078084 -> [  ]
S-0-#078087 -> [Not Found ]
S-0-#078098 -> [</title></head><body><h1> ]
S-0-#078125 -> [Not Found ]
S-0-#078136 -> [</h1> ]
S-0-#078143 -> [</body></html> ]
S-0-#078159 -> [ ]
S-0-#078161 -> [0 ]
S-0-#078164 -> [ ]
S-0-Finished: 78166 bytes (3.0 kb/s)
C-0-Finished: 14493 bytes (0.0 kb/s)



> 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: 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Updated: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated JCR-1571:
------------------------

    Attachment: HasNodeTest.java

testcases (my understanding of the problem description).

> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595203#action_12595203 ]

Julian Reschke commented on JCR-1571:
-------------------------------------

What happens here is that the servlet container generates an error page for the 404 status, and sends it out as text/html.

The client component seems to try to parse it as XML, which of course fails.



> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595376#action_12595376 ]

Julio Castillo commented on JCR-1571:
-------------------------------------

Angela,
Yes that is the process to reproduce the problem (test on a node that
doesn't yet exist -BTW, I created my repository by using the "Populate" link
in the default Jackrabbit deployment of the war file.

I don't know if the comment from Julian Reschle is sufficient to isolate it.
These are some notes on your log and mine
- I do see HR tags in the response from the server
- 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)
- You are using a different version of the servlet container (I am using
Tomcat)

Let me know if you need more information from me.

Thanks

** julio



> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595568#action_12595568 ]

Julian Reschke commented on JCR-1571:
-------------------------------------

> 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?

Wait.

It's perfectly ok for a server to send a text/html response body with a 404 status. The client really needs to be able to deal with that!


> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595572#action_12595572 ]

angela commented on JCR-1571:
-----------------------------

if there is a simple way to disable the HTML (which the servlet did not generate), i don't want
to spent a lot of time extracting the original response body created by the servlet. it's a
sandbox project...

> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Commented: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595576#action_12595576 ]

Julian Reschke commented on JCR-1571:
-------------------------------------

(talked to Angela on the phone, summarizing)

- for a non-success code, it's ok for the server to return text/html

- in Angela's case (see trace), this did not cause problems as the response body appears to be wellformed XML anyway (although HTML)

- the code that handles responses and tries to extract error details should handle this case as non-fatal; there's simply no information in addition to the HTTP status code available


> 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 "</HR>".
> javax.jcr.RepositoryException: The element type "HR" must be terminated by the matching end-tag "</HR>".: The element type "HR" must be terminated by the matching end-tag "</HR>".
> 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 <String> 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.


[jira] Updated: (JCR-1571) JCR Webdav Server doesn't support node.hasNode() method

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/JCR-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

angela updated JCR-1571:
------------------------

    Attachment: JCR-1571.diff

> 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
>