tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Peter" <cpe...@rostock.igd.fhg.de>
Subject Re: WEBDAV: [Fatal Error] :-1:-1: Premature end of file
Date Fri, 31 Jan 2003 13:10:35 GMT
Hello Remy and all others,

I finally found the 4.1.19 version of Tomcat, and its behavior is 
somewhat better:
Using the Tomcat with its build-in webdav allows me now to move and 
copy folders and bunches of files, although it still throws this 
fatal error message ([Fatal Error] :-1:-1: Premature end of file) 
when navigating in those folders.
Using my own webdav running as an ordinary servlet, however, does 
create the folders and sub-folders, but doesn't copy the files into 
them (a warning window pops up reading something like "Error while 
copying one or all of the selected files").
I traced that problem being in the doPut() method. The input stream 
actually comes in, but the bind failes.
The actual code snippet of the DefaultServlet class:

   try {
	Resource newResource = new Resource(resourceInputStream);
	// FIXME: Add attributes
	if (exists) {
	    resources.rebind(path, newResource);
	} else {
	    resources.bind(path, newResource);
	}
   } catch(NamingException e) {
	result = false;
   }

Here, newRecource is well created, but resources.bind throws an 
exception.

What am I doing wrong?

Christian

--
Remy Maucherat wrote:
> Christian Peter wrote:
> 
>> Hi all,
>>
>> I have set up Tomcat 4 on my Win2000 workstation (using 
>> jakarta-tomcat-4.1.18).
>> Using webdav via webfolder seems to work fine with single files, so 
>> does creating folders "manually" in the webfolder. However, when 
>> dragging and dropping a folder with several subfolders and some files 
>> in it I sometimes get the following error message printed on the 
>> Tomcat console:
>>   [Fatal Error] :-1:-1: Premature end of file.
>>
>> The folder than is copied incompletely, some files of the subfolders 
>> are missing.
>> Is that a known behavior, or just a bad configuration of my system? 
>> Does anybody have an idea how I could solve this problem?
>>
>> As background information, I'm currently working on extracting the 
>> webdav module from Tomcat in order to make some project-specific 
>> changes to it. With this version, this error occurs much more 
>> frequently, which speaks for a configuration thing?
>>
>> As far as I have traced it, this message is thrown inside the 
>> doPropfind method of the WebdavServlet class, seemingly at
>>  Document document = documentBuilder.parse
>>                       (new InputSource(req.getInputStream()));
>>
>>
>> Anybody an idea?
> 
> 
> There was a bug in the cache invalidation in 4.1.18 with subcontexts 
> (folders). This could cause that. Try to see if 4.1.19 works better, or 
> do a quick try by disabling the cache for your context (which will 
> likely make the performance bad, but at least that would indicate that 
> this was the problem).
> 
> Remy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 



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


Mime
View raw message