jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julio Castillo (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1571) DavMethodBase#getResponseException fails if the body is not (valid) XML
Date Tue, 13 May 2008 19:01:57 GMT

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

Julio Castillo commented on JCR-1571:

I rebuilt jackrabbit-webdav from the main trunk refreshed today (
-1.5-SNAPSHOT.jar) and deployed in my tomcat webapp lib directory for
jackrabbit, but unfortunately the behavior is still the same. This time I
debugged the client further as I understood the comment about the XML

The client as it stands right now
sDocument:118) still expects a response in XML format (fails while trying to
parse an HTML document -the HR tag is not terminated). This method is called
on failure too by (getResponseException()).

The server side with the new webdav jar file sends an HTML document with the
"404 Not Found" response. I captured the response again, see is below.
Please also note the Content-Type is html rather than xml.

HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 952
Date: Tue, 13 May 2008 18:08:40 GMT

<head><title>Apache Tomcat/6.0.16 - Error report</title>
nt-size:22px;} H2
nt-size:16px;} H3
nt-size:14px;} BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
12px;}A {color : black;}A.name {color : black;}HR {color :
#525D76;}--></style> </head>
<body><h1>HTTP Status 404 - </h1><HR size="1"
noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b>
<u></u></p><p><b>description</b> <u>The requested
resource () is not
available.</u></p><HR size="1" noshade="noshade"><h3>Apache

I just checked the svn log file for the jackrabbit-webdav directory and
noticed that the last check-in was on March 5th. So I'm guessing I'm picking
the wrong tree?


** julio

> DavMethodBase#getResponseException fails if the body is not (valid) XML
> -----------------------------------------------------------------------
>                 Key: JCR-1571
>                 URL: https://issues.apache.org/jira/browse/JCR-1571
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>         Environment: JDK 1.6; Tomcat 6; Windows 2003
>            Reporter: Julio Castillo
>            Assignee: angela
>         Attachments: HasNodeTest.java, JCR-1571.diff, 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 "</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.

View raw message