Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-1167

Enabling "Merge URL and form" in the administrator stops cffile action="upload"

    Details

      Description

      When you enable Merge URL and FORM scopes in the administrator, and you are doing a form post + file upload you get the following error.

      I have replicated this with script and tag based code. I can provide example code if required. But just upload a form submit, then enable Merge URL and FORM scopes and you get this error.

      Railo 3.3.0.001 Error (java.lang.ClassCastException)
      Message railo.runtime.type.scope.UrlFormImpl cannot be cast to railo.runtime.type.scope.FormImpl
      Cause java.lang.ClassCastException
      Stacktrace The Error Occurred in
      /Library/WebServer/Documents/Development/imageservice/img.cfm: line 92
      90:
      91: if(Len(Trim(Req.image)))

      { 92: file action="upload" filefield="form.image" destination="uploads" nameconflict="makeunique"; 93: 94: }

      Java Stacktrace
      railo.runtime.type.scope.UrlFormImpl cannot be cast to railo.runtime.type.scope.FormImpl
      at railo.runtime.tag.FileTag.getFormItem(FileTag.java:901):901
      at railo.runtime.tag.FileTag.actionUpload(FileTag.java:681):681
      at railo.runtime.tag.FileTag.doStartTag(FileTag.java:323):323
      at img_cfm$cf.call(/Library/WebServer/Documents/Development/imageservice/img.cfm:92):92
      at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:746):746
      at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:208):208
      at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23):23
      at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1986):1986
      at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:281):281
      at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853):853
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502):502
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390):390
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216):216
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182):182
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765):765
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418):418
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199):199
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114):114
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152):152
      at org.mortbay.jetty.Server.handle(Server.java:326):326
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536):536
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:928):928
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747):747
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218):218
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405):405
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409):409
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451):451
      at railo.runtime.op.Caster.toPageException(Caster.java:2995):2995
      at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:749):749
      at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:208):208
      at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23):23
      at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1986):1986
      at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:281):281
      at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853):853
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502):502
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390):390
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216):216
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182):182
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765):765
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418):418
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199):199
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114):114
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152):152
      at org.mortbay.jetty.Server.handle(Server.java:326):326
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536):536
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:928):928
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747):747
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218):218
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405):405
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409):409
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451):451

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                markdrew Mark Drew
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: