Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7874

wysiwyg: attachments not listing in "link" button "all pages" tab - transport error caused by rest UriBuilderException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.2-milestone-1
    • 3.5
    • REST
    • None
    • Tomcat 7
    • rest wysiwyg link all pages
    • Unknown
    • N/A
    • N/A

    Description

      I'm getting a TRANSPORT ERROR and an empty list of attachments on the current page when I go to attempt to link to an attachment:

      Here are the steps to reproduce:

      • Upload an attachment via Webdav to any page called: "Cabin int-[rw].jpg" (not sure if the Webdav upload is required, regular upload may work as well)
      • Go to that page and edit in WYSIWYG editor mode.
      • Type in text, then highlight and click "link" -> "Attached File".
        (note: "Current Page" listing seems to work fine)
      • Click "All Pages"
      • Wait a little bit while it selects the correct page,
        then after the "Attachments" node is opened up for that page you will receive the following error:
        "Server returned TRANSPORT_ERROR with no error message."

      I noticed the following in my tomcat error logs:

      javax.ws.rs.core.UriBuilderException: Could not build the URI from String http://aaaaaaa.mysitezhomes.com/corp/rest/wikis/xwiki/spaces/PhotoLibrary/pages/Cardinal/attachments/Cabin%20int-[rw].jpg
      	at org.restlet.ext.jaxrs.AbstractUriBuilder.buildUri(AbstractUriBuilder.java:287)
      	at org.restlet.ext.jaxrs.AbstractUriBuilder.build(AbstractUriBuilder.java:207)
      	at org.xwiki.rest.DomainObjectFactory.createAttachment(DomainObjectFactory.java:530)
      	at org.xwiki.rest.resources.BaseAttachmentsResource.getAttachmentsForDocument(BaseAttachmentsResource.java:270)
      	at org.xwiki.rest.resources.attachments.AttachmentsResource.getAttachments(AttachmentsResource.java:69)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.restlet.ext.jaxrs.internal.wrappers.AbstractMethodWrapper.internalInvoke(AbstractMethodWrapper.java:168)
      	at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:289)
      	at org.restlet.ext.jaxrs.JaxRsRestlet.invokeMethod(JaxRsRestlet.java:976)
      	at org.restlet.ext.jaxrs.JaxRsRestlet.handle(JaxRsRestlet.java:725)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Router.doHandle(Router.java:497)
      	at org.restlet.routing.Router.handle(Router.java:737)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:151)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111)
      	at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:72)
      	at org.restlet.Application.handle(Application.java:388)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Router.doHandle(Router.java:497)
      	at org.restlet.routing.Router.handle(Router.java:737)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.routing.Router.doHandle(Router.java:497)
      	at org.restlet.routing.Router.handle(Router.java:737)
      	at org.restlet.routing.Filter.doHandle(Filter.java:156)
      	at org.restlet.routing.Filter.handle(Filter.java:203)
      	at org.restlet.engine.ChainHelper.handle(ChainHelper.java:111)
      	at org.restlet.Component.handle(Component.java:388)
      	at org.restlet.Server.handle(Server.java:488)
      	at org.restlet.engine.ServerHelper.handle(ServerHelper.java:71)
      	at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:150)
      	at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1028)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      	at sun.reflect.GeneratedMethodAccessor563.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:166)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:299)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      	at org.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:79)
      	at sun.reflect.GeneratedMethodAccessor634.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:246)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      	at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      	at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:246)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217)
      	at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:246)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
      	at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
      	at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
      	at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
      	at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:246)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      	at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.net.URISyntaxException: Illegal character in path at index 113: http://aaaaaaa.mysitezhomes.com/corp/rest/wikis/xwiki/spaces/PhotoLibrary/pages/Cardinal/attachments/Cabin%20int-[rw].jpg
      	at java.net.URI$Parser.fail(URI.java:2810)
      	at java.net.URI$Parser.checkChars(URI.java:2983)
      	at java.net.URI$Parser.parseHierarchical(URI.java:3067)
      	at java.net.URI$Parser.parse(URI.java:3015)
      	at java.net.URI.<init>(URI.java:577)
      	at org.restlet.ext.jaxrs.AbstractUriBuilder.buildUri(AbstractUriBuilder.java:285)
      	... 142 more
      

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              jamiem Jamie Maher
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: