Uploaded image for project: 'Lucee Development'
  1. LDEV-1129

cffile throws java.lang.ClassCastException when accessing s3 file

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.34
    • Fix Version/s: S3 0.9.4.112, 5.1.3.8
    • Labels:
      None
    • Environment:

      Window 10

    • Sprint:
      March 2017 Sprint

      Description

      <cffile action="copy" source="s3://_could_path_" destination="#expandpath('/test/')#">
      

      Throws error: java.lang.ClassCastException

      Error message: lucee.commons.io.res.type.file.FileResource cannot be cast to org.lucee.extension.resource.s3.S3Resource

      lucee.runtime.exp.NativeException: lucee.commons.io.res.type.file.FileResource cannot be cast to org.lucee.extension.resource.s3.S3Resource at org.lucee.extension.resource.s3.S3Resource.copy(S3Resource.java:521) at org.lucee.extension.resource.s3.S3Resource.copyTo(S3Resource.java:515) at lucee.commons.io.IOUtil.copy(IOUtil.java:118) at lucee.runtime.tag.FileTag.actionCopy(FileTag.java:535) at lucee.runtime.tag.FileTag.doStartTag(FileTag.java:377) at test.scribble_cfm$cf.call(/test/scribble.cfm:1) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:918) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:833) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:828) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:819) at applicationproxy_cfc$cf.udfCall1(/applicationProxy.cfc:82) at applicationproxy_cfc$cf.udfCall(/applicationProxy.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337) at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:210) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:693) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:583) at lucee.runtime.SuperComponent.callWithNamedValues(SuperComponent.java:92) at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:814) at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1614) at application_cfc$cf.udfCall(/Application.cfc:23) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:224) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:692) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:575) at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1898) at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:422) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:224) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2293) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2284) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2252) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:891) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: lucee.commons.io.res.type.file.FileResource cannot be cast to org.lucee.extension.resource.s3.S3Resource ... 58 more
      

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              vikaskanani Vikas Patel
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: