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

Attachments upload doesn't work on Caucho Resin web server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Critical
    • None
    • 2.4 M1
    • Old Core
    • Caucho Resin 4.0.9, XWiki 2.4M1
    • upload, attachments
    • Trivial

    Description

      (At the moment of writing I have solved the issue)

      Having migrated from GlassFish to Caucho Resin, I observed that file uploading doesn't work. I have enabled logging wherever I thought it to be relevant:

      DEBUG fileupload.FileUploadPlugin     - Loading uploaded files 
      DEBUG web.UploadAction                - Found files to upload: {} 
      DEBUG web.UploadAction                - Failed attachments: [] 
      DEBUG web.UploadAction                - Wrong attachment names: [] 
      DEBUG fileupload.FileUploadPlugin     - Searching file uploaded for field xredirect 
      ERROR lucene.IndexUpdater             - invalid parameters given to add: Res.p2p, null, {grouplist={xwiki:xwiki:XWiki.OCTAGRAM=[xwiki:XWiki.XWikiAdminGroup, xwiki:XWiki.XWikiAllGroup], xwiki:xwiki:XWiki.XWikiAllGroup=[]}, activitystream_requestid=1224017466-1286608342000-vYtV75uG, msg=com.xpn.xwiki.web.XWikiMessageTool@1ca749d, fileuploadlist=[], language=ru, originalWiki=xwiki, tdoc=Res.p2p, locale=ru, ajax=false, doc=Res.p2p, mainxwiki=xwiki, fileuploadplugin=com.xpn.xwiki.plugin.fileupload.FileUploadPlugin@ae2cdc, vcontext=org.apache.velocity.VelocityContext@1032604, wiki=xwiki} 
      DEBUG fileupload.FileUploadPlugin     - Cleaning uploaded files 
      

      Useful links were:
      https://issues.apache.org/jira/browse/FILEUPLOAD-38
      http://blog.caucho.com/?p=237

      I have solved the problem by putting <multipart-form enable="false"/> into my resin-web.xml. The complete contents of my resin-web.xml are:

      <?xml version="1.0"?>
      <web-app xmlns="http://caucho.com/ns/resin"
               xmlns:sec="urn:java:com.caucho.security">
      
        <multipart-form enable="false"/>
      
        <sec:Deny>
           <sec:url-pattern>/log/*</sec:url-pattern>
        </sec:Deny>
      
      </web-app>
      

      It seems to be not Resin-specific issue. Resin just implements Servlet 3.0 API.

      But <multipart-form enable="false"/> seems to be specific to Resin because it resides inside Resin XML namespace.

      So I think XWiki should either contain this resin-web.xml or use Sevlet 3.0 API when available.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              octagram Ivan Levashew
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: