Problems with path that has non-URL characters in it

Issue #22 resolved
Anonymous created an issue

Whenever you have a path that contains characters that will be URL encoded the server throws a "Path not Found" 500 error. It seems that the path resolver does not decode the URL and uses it as-it-is.

We are running SCM-Manager at a Tomcat 6.0.30.

Stacktrace:

message org.tmatesoft.svn.core.SVNException: svn: Path '/Seminar%20Algorithm%20Engineering' you requested not found at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.server.dav.handlers.DAVGetHandler.execute(DAVGetHandler.java:52) at org.tmatesoft.svn.core.internal.server.dav.DAVServlet.service(DAVServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:63) at sonia.scm.web.filter.PermissionFilter.doFilter(PermissionFilter.java:148) at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:100) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at sonia.scm.web.filter.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:143) at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:100) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at sonia.scm.filter.SSLFilter.doFilter(SSLFilter.java:93) at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:100) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:122) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110) at sonia.scm.boot.BootstrapFilter.doFilter(BootstrapFilter.java:104) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)

description The requested resource (org.tmatesoft.svn.core.SVNException: svn: Path '/Seminar%20Algorithm%20Engineering' you requested not found at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.server.dav.handlers.DAVGetHandler.execute(DAVGetHandler.java:52) at org.tmatesoft.svn.core.internal.server.dav.DAVServlet.service(DAVServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:63) at sonia.scm.web.filter.PermissionFilter.doFilter(PermissionFilter.java:148) at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:100) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at sonia.scm.web.filter.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:143) at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:100) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:134) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at sonia.scm.filter.SSLFilter.doFilter(SSLFilter.java:93) at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:100) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:129) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:59) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:122) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110) at sonia.scm.boot.BootstrapFilter.doFilter(BootstrapFilter.java:104) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) ) is not available.

Comments (13)

  1. Stefan Bechtold

    Thanks for that quick fix. I will test it right away and get back to you after testing.

    Just to answer your question from comment #1, it's not the repository's name but the name of a folder within the repository. I think it's no problem to avoid spaces and special characters within the repository's name but it is kind of impossible to tell all your users not to commit resources that have special chars in their names (which then will crash the repository). So let's see if your fix resolves that issue. :-)

  2. Stefan Bechtold

    Sorry that I come back to you again: It seems that there is still a problem when using eclipse (or Cornerstone on my Mac) to access the repository. I checked it from within the browser and that worked out very well.

    In the logfile of my eclipse workspace I found the following exception:

    !ENTRY org.eclipse.team.svn.core.svnnature 4 0 2011-05-28 19:12:43.094
    !MESSAGE SVN: '0x00000230: Get Repository Folder Children' operation finished with error
    !SUBENTRY 1 org.eclipse.team.svn.core.svnnature 4 0 2011-05-28 19:12:43.094
    !MESSAGE Get repository folder children operation failed.
    !STACK 0
    org.eclipse.team.svn.core.connector.SVNConnectorException: svn: For input string: ""
    	at org.polarion.team.svn.connector.svnkit.SVNKitConnector.handleClientException(SVNKitConnector.java:1424)
    	at org.polarion.team.svn.connector.svnkit.SVNKitConnector.list(SVNKitConnector.java:1274)
    	at org.eclipse.team.svn.core.extension.factory.ThreadNameModifier.list(ThreadNameModifier.java:278)
    	at org.eclipse.team.svn.core.utility.SVNUtility.list(SVNUtility.java:335)
    	at org.eclipse.team.svn.core.svnstorage.SVNRepositoryContainer.getChildren(SVNRepositoryContainer.java:79)
    	at org.eclipse.team.svn.core.operation.remote.GetRemoteFolderChildrenOperation.runImpl(GetRemoteFolderChildrenOperation.java:76)
    	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:81)
    	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
    	at org.eclipse.team.svn.core.operation.CompositeOperation.runImpl(CompositeOperation.java:95)
    	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:81)
    	at org.eclipse.team.svn.core.operation.LoggedOperation.run(LoggedOperation.java:39)
    	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
    	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTaskExternal(ProgressMonitorUtility.java:90)
    	at org.eclipse.team.svn.ui.utility.DefaultCancellableOperationWrapper.run(DefaultCancellableOperationWrapper.java:55)
    	at org.eclipse.team.svn.ui.utility.ScheduledOperationWrapper.run(ScheduledOperationWrapper.java:37)
    	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: org.tigris.subversion.javahl.ClientException: svn: For input string: ""
    	at org.tigris.subversion.javahl.JavaHLObjectFactory.throwException(JavaHLObjectFactory.java:778)
    	at org.tmatesoft.svn.core.javahl.SVNClientImpl.throwException(SVNClientImpl.java:1924)
    	at org.tmatesoft.svn.core.javahl.SVNClientImpl.list(SVNClientImpl.java:365)
    	at org.tmatesoft.svn.core.javahl.SVNClientImpl.list(SVNClientImpl.java:337)
    	at org.polarion.team.svn.connector.svnkit.SVNKitConnector.list(SVNKitConnector.java:1263)
    	... 14 more
    Caused by: org.tmatesoft.svn.core.SVNException: svn: For input string: ""
    	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
    	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
    	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getDir(DAVRepository.java:373)
    	at org.tmatesoft.svn.core.io.SVNRepository.getDir(SVNRepository.java:1309)
    	at org.tmatesoft.svn.core.wc.SVNLogClient.list(SVNLogClient.java:1373)
    	at org.tmatesoft.svn.core.wc.SVNLogClient.doList(SVNLogClient.java:1364)
    	at org.tmatesoft.svn.core.wc.SVNLogClient.doList(SVNLogClient.java:1213)
    	at org.tmatesoft.svn.core.javahl.SVNClientImpl.list(SVNClientImpl.java:350)
    	... 16 more
    Caused by: java.lang.NumberFormatException: For input string: ""
    	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    	at java.lang.Long.parseLong(Long.java:431)
    	at java.lang.Long.parseLong(Long.java:468)
    	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getDir(DAVRepository.java:371)
    	... 21 more
    

    The exception occurs whenever I use the SVN Repository Browser and open the first level of the repository. I'm not quite sure if this issue is still related with the SCM-Manager but I do not run into this problem if I configure my server's apache to serve the SVN repository via DAV. So it feels as if there still is a little issue within the service. :-(

  3. Stefan Bechtold

    I tested the fix but it still does not work. Steps to reproduce:

    It seems that there is no information about the requested resource (which is "") and therefor the method getDir from DAVRepository throws a NumberFormatException during parsing a Long value instead of ignoring the resource or setting its value to -1 or 0.

    I will be traveling around for the next weeks but a friend of mine will continue to support you with testing.

  4. Log in to comment