This looks to be the same problem as bug 34910. eg. http://issues.apache.org/bugzilla/show_bug.cgi?id=34910
Jacob opened this bug for transaction targets with a space in their name but, as the bug description notes, this indicates the uri encoding is incorrect. Warwick > -----Original Message----- > From: Laurent Michenaud [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 19, 2005 3:10 AM > To: Slide Users Mailing List > Subject: RE: Binding store & rename & accents > > > I think the problem comes from transaction. > > I have created a resource /slide/files/yé > > Next, if i execute the following code : > > public static void testRenameSimple() throws HttpException, > IOException { > HttpURL oHttpURL = new > HttpURL("http://localhost:8082/slide/"); > oHttpURL.setUserinfo("root", "root"); > WebdavResource oWebdavResource = new WebdavResource(oHttpURL); > try { > oWebdavResource.setPath("/slide/files/yé"); > } catch( HttpException e ) { > e.printStackTrace(); > System.out.println( e.getReasonCode()); > } catch (Exception e) { > e.printStackTrace(); > } > } > > => No error. > > The http request is well encoded : > > <?xml version="1.0" encoding="utf-8" ?> > <D:propfind xmlns:D="DAV:"> > <D:prop><D:displayname/><D:getcontentlength/><D:getcontenttype/> > <D:resourcetype/><D:getlastmodified/><D:lockdiscovery/></D:prop> > </D:propfind>PROPFIND /slide/files/y%C3%A9 HTTP/1.1 > Authorization: Basic cm9vdDpyb290 > Content-Type: text/xml; charset=utf-8 > User-Agent: Jakarta Commons-HttpClient/3.0-rc2 > Host: localhost:8082 > Cookie: $Version=0; > JSESSIONID=88EC6B6A6234E029D8053339B6953881; $Path=/slide > Content-Length: 207 > Depth: 0 > > > > If I had in my code, the notion of transaction : > > public static void testRenameSimple() throws HttpException, > IOException { > HttpURL oHttpURL = new > HttpURL("http://localhost:8082/slide/"); > oHttpURL.setUserinfo("root", "root"); > WebdavResource oWebdavResource = new WebdavResource(oHttpURL); > oWebdavResource.startTransaction("root", 2000); > try { > oWebdavResource.setPath("/slide/files/yé"); > oWebdavResource.commitTransaction(); > } catch( HttpException e ) { > oWebdavResource.abortTransaction(); > e.printStackTrace(); > System.out.println( e.getReasonCode()); > } catch (Exception e) { > oWebdavResource.abortTransaction(); > e.printStackTrace(); > } > } > > I get : > > java.lang.IllegalArgumentException: Invalid uri > '/slide/files/yé': escaped absolute path not valid > at > org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethod > Base.java:219) > at > org.apache.webdav.lib.methods.HttpRequestBodyMethodBase.<init> > (HttpRequestBodyMethodBase.java:73) > at > org.apache.webdav.lib.methods.XMLResponseMethodBase.<init>(XML > ResponseMethodBase.java:92) > at > org.apache.webdav.lib.methods.UnlockMethod.<init>(UnlockMethod > .java:85) > at > org.apache.webdav.lib.methods.UnlockMethod.<init>(UnlockMethod > .java:69) > at > org.apache.webdav.lib.WebdavResource.endTransaction(WebdavReso > urce.java:438) > at > org.apache.webdav.lib.WebdavResource.abortTransaction(WebdavRe > source.java:4370) > at > com.a2a.slide.test.TestSlideBindingFactory.testRenameSimple(Te > stSlideBindingFactory.java:173) > at > com.a2a.slide.test.TestSlideBindingFactory.main(TestSlideBindi > ngFactory.java:198) > > There is no http request sent. > > Adding a transaction for a setPath is stupid. > It is just to show u that there is a problem. > > > -----Message d'origine----- > De : Jacob Lund [mailto:[EMAIL PROTECTED] > Envoyé : mercredi 18 mai 2005 09:32 > À : Slide Users Mailing List > Objet : Re: Binding store & rename & accents > > If you are using the files based store and windows then you > have to have > following parameter on you java machine -Dfile.encoding=UTF-8 > - otherwise > java will use local characterset instead of unicode in IO operations. > > I am not familiar with the client lib, but I don't think that > lib will do > the UTF-8 conversion for you. If I am correct the you will > have to change > "/slide/files/testéàù" to "/slide/files/test%c3%a9%c3%a0%c3%b9". > > /jacob > > > ----- Original Message ----- > From: "Laurent Michenaud" <[EMAIL PROTECTED]> > To: "Slide Users Mailing List" <slide-user@jakarta.apache.org> > Sent: Wednesday, May 18, 2005 9:06 AM > Subject: RE: Binding store & rename & accents > > > Slide 2.1 > Encoding : UTF-8 > Client : Java Webdavlib > Store : BindingStore > > The code : > > HttpURL oHttpURL = new HttpURL("http://localhost:8080/slide"); > oHttpURL.setUserinfo(SLIDE_ADMIN, SLIDE_PASSWORD); > WebdavResource oWebdavResource = new > WebdavResource(oHttpURL); > oWebdavResource.startTransaction(SLIDE_ADMIN, SLIDE_TIMEOUT > ); if ( oWebdavResource.moveMethod( "/slide/files/test", > "/slide/files/testéàù")) { oWebdavResource.commitTransaction(); > } > else oWebdavResource.abortTransaction(); > oWebdavResource.close(); > > > -----Message d'origine----- > De : Jacob Lund [mailto:[EMAIL PROTECTED] > Envoyé : mercredi 18 mai 2005 08:57 > À : Slide Users Mailing List > Objet : Re: Binding store & rename & accents > > Sounds like an encoding problem! > > What version of slide are you using? What client? What > encoding have you configured? > > /jacob > > ----- Original Message ----- > From: "Laurent Michenaud" <[EMAIL PROTECTED]> > To: "Slide Users Mailing List" <slide-user@jakarta.apache.org> > Sent: Tuesday, May 17, 2005 12:18 PM > Subject: Binding store & rename & accents > > > Hi, > > > > I use the binding store. > > > > If I try to rename a resource and the new resource name > contains accents, then > > my resource disappears. I can't see it anymore. > > > > In the console, I can see when I access the parent folder of > my resource > : > > http-8081-Processor20, 17-mai-2005 12:17:31, root, GET, 500 > "Internal Server Error", 16 ms, /files/workspaces > > > > Any idea ? > > > > Thanks > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]