Tapestry
  1. Tapestry
  2. TAPESTRY-2094

Exception when creating service MultipartDecoder prevents the use of the Upload component

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0.10
    • Fix Version/s: 5.0.10
    • Component/s: tapestry-upload
    • Labels:
      None

      Description

      The Upload component provided by tapestry-upload seems to be broken in the current svn (r615743). The component renders fine, however when the parent form is submitted the following exception is thrown. The problem seems to be related to the auto-building of org.apache.tapestry.upload.services.MultipartDecoderImpl:

      [ERROR] olive-notes Tapestry 5 Application /OliveNotes/blog/admin/createpost.postform;jsessionid=1szfzzqkr9bqo:
      java.lang.RuntimeException: Error invoking service builder method org.apache.tapestry.upload.services.UploadModule.buildMultipartDecoder(ThreadCleanupHub, RegistryShutdownHub, ObjectLocator) (at UploadModule.java:47) (for service 'MultipartDecoder'): Error invoking constructor org.apache.tapestry.upload.services.MultipartDecoderImpl(String, int, long, long) (at MultipartDecoderImpl.java:61) (for service 'MultipartDecoder'): Class org.apache.tapestry.ioc.internal.ConstructorServiceCreator can not access a member of class org.apache.tapestry.upload.services.MultipartDecoderImpl with modifiers "public"
      at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:88)
      at org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.initialValue(PerThreadServiceCreator.java:47)
      at java.lang.ThreadLocal$ThreadLocalMap.getAfterMiss(ThreadLocal.java:374)
      at java.lang.ThreadLocal$ThreadLocalMap.get(ThreadLocal.java:347)
      at java.lang.ThreadLocal$ThreadLocalMap.access$000(ThreadLocal.java:225)
      at java.lang.ThreadLocal.get(ThreadLocal.java:127)
      at org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.createObject(PerThreadServiceCreator.java:53)
      at $MultipartDecoder_117bf563559._perThreadInstance($MultipartDecoder_117bf563559.java)
      at $MultipartDecoder_117bf563559.decode($MultipartDecoder_117bf563559.java)
      at $MultipartDecoder_117bf5634bb.decode($MultipartDecoder_117bf5634bb.java)
      at org.apache.tapestry.upload.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:40)
      at $HttpServletRequestHandler_117bf5634bd.service($HttpServletRequestHandler_117bf5634bd.java)
      at $HttpServletRequestHandler_117bf5634ba.service($HttpServletRequestHandler_117bf5634ba.java)
      at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164)
      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
      at org.mortbay.http.HttpServer.service(HttpServer.java:909)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
      Caused by: java.lang.RuntimeException: Error invoking constructor org.apache.tapestry.upload.services.MultipartDecoderImpl(String, int, long, long) (at MultipartDecoderImpl.java:61) (for service 'MultipartDecoder'): Class org.apache.tapestry.ioc.internal.ConstructorServiceCreator can not access a member of class org.apache.tapestry.upload.services.MultipartDecoderImpl with modifiers "public"
      at org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)
      at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.autobuild(ServiceResourcesImpl.java:123)
      at org.apache.tapestry.upload.services.UploadModule.buildMultipartDecoder(UploadModule.java:47)
      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:585)
      at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:76)
      ... 26 more
      Caused by: java.lang.IllegalAccessException: Class org.apache.tapestry.ioc.internal.ConstructorServiceCreator can not access a member of class org.apache.tapestry.upload.services.MultipartDecoderImpl with modifiers "public"
      at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:486)
      at org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:51)
      ... 33 more

        Issue Links

          Activity

          Chris Lewis created issue -
          Howard M. Lewis Ship made changes -
          Field Original Value New Value
          Summary Upload component tapestry-upload Exception when creating service MultipartDecoder prevents the use of the Upload component
          Priority Major [ 3 ] Blocker [ 1 ]
          Assignee Howard M. Lewis Ship [ hlship ]
          Hide
          Howard M. Lewis Ship added a comment -

          Annoying that uploads are so hard to test, even with Selenium. And this is a wierd error!

          Show
          Howard M. Lewis Ship added a comment - Annoying that uploads are so hard to test, even with Selenium. And this is a wierd error!
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Howard M. Lewis Ship made changes -
          Link This issue is related to TAPESTRY-2096 [ TAPESTRY-2096 ]
          Hide
          Howard M. Lewis Ship added a comment -

          The fix is to make the MultipartDecoderImpl class public.

          Show
          Howard M. Lewis Ship added a comment - The fix is to make the MultipartDecoderImpl class public.
          Howard M. Lewis Ship made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 5.0.10 [ 12312936 ]
          Mark Thomas made changes -
          Workflow jira [ 12422165 ] Default workflow, editable Closed status [ 12569361 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12569361 ] jira [ 12590619 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          10h 11m 1 Howard M. Lewis Ship 28/Jan/08 17:50
          In Progress In Progress Closed Closed
          38m 49s 1 Howard M. Lewis Ship 28/Jan/08 18:29

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Chris Lewis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development