Tapestry 5
  1. Tapestry 5
  2. TAP5-443

Clicking an action link when using tapestry-upload always throws an exception

    Details

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

      Description

      This causes a bad exception when tapestry tries to resolve an IoC dependency asking for @Traditional ComponentEventResultProcessor...

      I think you just want to remove it from ComponentInstanceResultProcessor.java, and remove it from TapestryModule.java:1346 (where it uses the secondary marker, @ComponentInstanceProcessor ).

        Activity

        Hide
        Fernando Padilla added a comment -

        Index: tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstanceResultProcessor.java
        ===================================================================
        — tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstanceResultProcessor.java (revision 732923)
        +++ tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstanceResultProcessor.java (working copy)
        @@ -24,7 +24,7 @@

        import java.io.IOException;

        -@Marker(

        {Traditional.class, ComponentInstanceProcessor.class}

        )
        +@Marker(

        {ComponentInstanceProcessor.class}

        )
        public class ComponentInstanceResultProcessor implements ComponentEventResultProcessor<Component>
        {
        private final RequestPageCache requestPageCache;
        Index: tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
        ===================================================================
        — tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (revision 732923)
        +++ tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (working copy)
        @@ -1343,7 +1343,7 @@

        • external URL</dd> </dl>
          */
          public void contributeComponentEventResultProcessor(
        • @Traditional @ComponentInstanceProcessor
          + @ComponentInstanceProcessor
          ComponentEventResultProcessor componentInstanceProcessor,

        MappedConfiguration<Class, ComponentEventResultProcessor> configuration)

        Show
        Fernando Padilla added a comment - Index: tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstanceResultProcessor.java =================================================================== — tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstanceResultProcessor.java (revision 732923) +++ tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstanceResultProcessor.java (working copy) @@ -24,7 +24,7 @@ import java.io.IOException; -@Marker( {Traditional.class, ComponentInstanceProcessor.class} ) +@Marker( {ComponentInstanceProcessor.class} ) public class ComponentInstanceResultProcessor implements ComponentEventResultProcessor<Component> { private final RequestPageCache requestPageCache; Index: tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java =================================================================== — tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (revision 732923) +++ tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (working copy) @@ -1343,7 +1343,7 @@ external URL</dd> </dl> */ public void contributeComponentEventResultProcessor( @Traditional @ComponentInstanceProcessor + @ComponentInstanceProcessor ComponentEventResultProcessor componentInstanceProcessor, MappedConfiguration<Class, ComponentEventResultProcessor> configuration)
        Hide
        Howard M. Lewis Ship added a comment -

        I can't verify this bug; it works for me as the code currently stands, it works on Bamboo, so I don't get why you are having a problem.

        Show
        Howard M. Lewis Ship added a comment - I can't verify this bug; it works for me as the code currently stands, it works on Bamboo, so I don't get why you are having a problem.
        Hide
        Fernando Padilla added a comment -

        but it's been broken on our end for a while.. since checkin: r732188

        And in the exception logs, it complains about UploadModule. Are you including that in your tests?

        we include (5.1.0.0-SNAPSHOT): tapestry-core, tapestry-ioc, tapestry-spring (5.0.18), tapestry-upload, tapestry-annotations

        and even if you don't see an error, conceptually it is broken right? Two services are declaring a @Traditional Marker.. not sure why it should work.

        Show
        Fernando Padilla added a comment - but it's been broken on our end for a while.. since checkin: r732188 And in the exception logs, it complains about UploadModule. Are you including that in your tests? we include (5.1.0.0-SNAPSHOT): tapestry-core, tapestry-ioc, tapestry-spring (5.0.18), tapestry-upload, tapestry-annotations and even if you don't see an error, conceptually it is broken right? Two services are declaring a @Traditional Marker.. not sure why it should work.
        Hide
        Howard M. Lewis Ship added a comment -

        $ mvn clean install
        [INFO] Scanning for projects...
        [INFO] ------------------------------------------------------------------------
        [INFO] Building Tapestry File Upload Component Library
        [INFO] task-segment: [clean, install]
        [INFO] ------------------------------------------------------------------------
        [INFO] [clean:clean]
        [INFO] Deleting directory /Users/Howard/work/tapestry5/tapestry-upload/target
        [INFO] [cobertura:clean

        {execution: clean}

        ]
        [INFO] [resources:resources]
        [INFO] Using default encoding to copy filtered resources.
        [INFO] snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT: checking for updates from tapestry
        [WARNING] repository metadata for: 'snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT' could not be retrieved from repository: tapestry due to an error: Error transferring file
        [INFO] Repository 'tapestry' will be blacklisted
        [INFO] snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT: checking for updates from tapestry-snapshot
        [WARNING] repository metadata for: 'snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT' could not be retrieved from repository: tapestry-snapshot due to an error: Error transferring file
        [INFO] Repository 'tapestry-snapshot' will be blacklisted
        [INFO] snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT: checking for updates from OpenQA_Release
        [INFO] snapshot org.apache.tapestry:tapestry-ioc:5.1.0.0-SNAPSHOT: checking for updates from OpenQA_Release
        [INFO] snapshot org.apache.tapestry:tapestry-test:5.1.0.0-SNAPSHOT: checking for updates from OpenQA_Release
        [INFO] [compiler:compile]
        [INFO] Compiling 13 source files to /Users/Howard/work/tapestry5/tapestry-upload/target/classes
        [INFO] [resources:testResources]
        [INFO] Using default encoding to copy filtered resources.
        [INFO] [compiler:testCompile]
        [INFO] Compiling 13 source files to /Users/Howard/work/tapestry5/tapestry-upload/target/test-classes
        [INFO] [surefire:test]
        [INFO] Surefire report directory: /Users/Howard/work/tapestry5/tapestry-upload/target/surefire-reports

        -------------------------------------------------------
        T E S T S
        -------------------------------------------------------
        Running TestSuite
        [Parser] Running:
        /Users/Howard/work/tapestry5/tapestry-upload/src/test/conf/testng.xml

        Tests run: 43, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.966 sec

        Results :

        Tests run: 43, Failures: 0, Errors: 0, Skipped: 0

        [INFO] [jar:jar]
        [INFO] Building jar: /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT.jar
        [INFO] Preparing source:jar
        [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
        [INFO] No goals needed for project - skipping
        [INFO] [source:jar

        {execution: default}

        ]
        [INFO] Building jar: /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT-sources.jar
        [INFO] [install:install]
        [INFO] Installing /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT.jar to /Users/Howard/.m2/repository/org/apache/tapestry/tapestry-upload/5.1.0.0-SNAPSHOT/tapestry-upload-5.1.0.0-SNAPSHOT.jar
        [INFO] Installing /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT-sources.jar to /Users/Howard/.m2/repository/org/apache/tapestry/tapestry-upload/5.1.0.0-SNAPSHOT/tapestry-upload-5.1.0.0-SNAPSHOT-sources.jar
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD SUCCESSFUL
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 13 seconds
        [INFO] Finished at: Mon Jan 12 13:32:42 PST 2009
        [INFO] Final Memory: 11M/28M
        [INFO] ------------------------------------------------------------------------
        ~/work/tapestry5/tapestry-upload
        $

        BTW, when there are multiple markers at the point of injection, what's injected is based on the intersection of type and all markers.

        Show
        Howard M. Lewis Ship added a comment - $ mvn clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Tapestry File Upload Component Library [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean] [INFO] Deleting directory /Users/Howard/work/tapestry5/tapestry-upload/target [INFO] [cobertura:clean {execution: clean} ] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT: checking for updates from tapestry [WARNING] repository metadata for: 'snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT' could not be retrieved from repository: tapestry due to an error: Error transferring file [INFO] Repository 'tapestry' will be blacklisted [INFO] snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT: checking for updates from tapestry-snapshot [WARNING] repository metadata for: 'snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT' could not be retrieved from repository: tapestry-snapshot due to an error: Error transferring file [INFO] Repository 'tapestry-snapshot' will be blacklisted [INFO] snapshot org.apache.tapestry:tapestry-core:5.1.0.0-SNAPSHOT: checking for updates from OpenQA_Release [INFO] snapshot org.apache.tapestry:tapestry-ioc:5.1.0.0-SNAPSHOT: checking for updates from OpenQA_Release [INFO] snapshot org.apache.tapestry:tapestry-test:5.1.0.0-SNAPSHOT: checking for updates from OpenQA_Release [INFO] [compiler:compile] [INFO] Compiling 13 source files to /Users/Howard/work/tapestry5/tapestry-upload/target/classes [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Compiling 13 source files to /Users/Howard/work/tapestry5/tapestry-upload/target/test-classes [INFO] [surefire:test] [INFO] Surefire report directory: /Users/Howard/work/tapestry5/tapestry-upload/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite [Parser] Running: /Users/Howard/work/tapestry5/tapestry-upload/src/test/conf/testng.xml Tests run: 43, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.966 sec Results : Tests run: 43, Failures: 0, Errors: 0, Skipped: 0 [INFO] [jar:jar] [INFO] Building jar: /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT.jar [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: default} ] [INFO] Building jar: /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT-sources.jar [INFO] [install:install] [INFO] Installing /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT.jar to /Users/Howard/.m2/repository/org/apache/tapestry/tapestry-upload/5.1.0.0-SNAPSHOT/tapestry-upload-5.1.0.0-SNAPSHOT.jar [INFO] Installing /Users/Howard/work/tapestry5/tapestry-upload/target/tapestry-upload-5.1.0.0-SNAPSHOT-sources.jar to /Users/Howard/.m2/repository/org/apache/tapestry/tapestry-upload/5.1.0.0-SNAPSHOT/tapestry-upload-5.1.0.0-SNAPSHOT-sources.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13 seconds [INFO] Finished at: Mon Jan 12 13:32:42 PST 2009 [INFO] Final Memory: 11M/28M [INFO] ------------------------------------------------------------------------ ~/work/tapestry5/tapestry-upload $ BTW, when there are multiple markers at the point of injection, what's injected is based on the intersection of type and all markers.
        Hide
        Fernando Padilla added a comment -

        But the thing is that just reading the markers. Some code is asking for @Traditional, and TWO services are marked with that.. so it can't figure it out...

        and someone on the mailing list is having the same issues!

        are you sure the unit test actually brings in all of the tapestry dependencies while testing? Maybe this should be an integration test, not a unit test??

        Show
        Fernando Padilla added a comment - But the thing is that just reading the markers. Some code is asking for @Traditional, and TWO services are marked with that.. so it can't figure it out... and someone on the mailing list is having the same issues! are you sure the unit test actually brings in all of the tapestry dependencies while testing? Maybe this should be an integration test, not a unit test??
        Hide
        Fernando Padilla added a comment -

        "BTW, when there are multiple markers at the point of injection, what's injected is based on the intersection of type and all markers." - Howard

        So this statement was eating at me.. You're right that TIoC is smart enough to use a long list of markers to determine what to bind, but exception was not the code that I patched. There was a service that was depending on the service ComponentEventResultProcessor (CERP) but with only a @Traditional marker.. so at that point, tapestry had no other way to differentiate between the two service implementations. So one way to fix it would be to force everyone to also add @Primary @Traditional every time they want to bring in a ComponentEventResultProcessor (CERP)..

        I can go on and on, but here is the summary of how someone trying to inject a CERP service would see. CIRP == ComponentInstanceResultProcessor.

        currently:
        @Primary @Traditional CERP ==> umbrella CERP
        @Traditional @ComponentInstanceProcessor CERP ==> CIRP
        @Primary CERP ==> umbrella CERP
        @Traditional CERP ==> EXCEPTION, can't differentiate between the two.

        patch (submitted above):
        @Traditional CERP ==> umbrella CERP
        @ComponentInstanceProcessor ==> CIRP
        @Primary CERP ==> umbrealla CERP

        dream patch (mentioned below):
        CERP ==> umbrella CERP
        CIRP ==> CIRP
        @Traditional CERP ==> umbrella CERP
        @Primary CERP ==> umbrealla CERP

        My dream patch refers to actually removing the @ComponentInstanceProcessor marker all together, and adding CIRP to Tapestry IoC without markers, simply as itself:

        sudo patch:

        • bind( ComponentEventResultProcessor.class, ComponentInstanceResultProcessor.class ).withMarkers( Traditional.class, ComponentInstanceProcessor.class )
          + bind( ComponentInstanceResultProcessor.class, ComponentInstanceResultProcessor.class )
        Show
        Fernando Padilla added a comment - "BTW, when there are multiple markers at the point of injection, what's injected is based on the intersection of type and all markers." - Howard So this statement was eating at me.. You're right that TIoC is smart enough to use a long list of markers to determine what to bind, but exception was not the code that I patched. There was a service that was depending on the service ComponentEventResultProcessor (CERP) but with only a @Traditional marker.. so at that point, tapestry had no other way to differentiate between the two service implementations. So one way to fix it would be to force everyone to also add @Primary @Traditional every time they want to bring in a ComponentEventResultProcessor (CERP).. I can go on and on, but here is the summary of how someone trying to inject a CERP service would see. CIRP == ComponentInstanceResultProcessor. currently: @Primary @Traditional CERP ==> umbrella CERP @Traditional @ComponentInstanceProcessor CERP ==> CIRP @Primary CERP ==> umbrella CERP @Traditional CERP ==> EXCEPTION, can't differentiate between the two. patch (submitted above): @Traditional CERP ==> umbrella CERP @ComponentInstanceProcessor ==> CIRP @Primary CERP ==> umbrealla CERP dream patch (mentioned below): CERP ==> umbrella CERP CIRP ==> CIRP @Traditional CERP ==> umbrella CERP @Primary CERP ==> umbrealla CERP My dream patch refers to actually removing the @ComponentInstanceProcessor marker all together, and adding CIRP to Tapestry IoC without markers, simply as itself: sudo patch: bind( ComponentEventResultProcessor.class, ComponentInstanceResultProcessor.class ).withMarkers( Traditional.class, ComponentInstanceProcessor.class ) + bind( ComponentInstanceResultProcessor.class, ComponentInstanceResultProcessor.class )
        Hide
        Howard M. Lewis Ship added a comment -

        Sorry to dismiss this one out of hand, I was a bit worked up on some (many) other issues.

        Anyway, I can reproduce this now; I created a new empty project with dependency on tapestry-upload.

        ERROR] ioc.Registry Unable to locate a single service assignable to type org.apache.tapestry5.services.ComponentEventResultProcessor with marker annotation(s) org.apache.tapestry5.services.Traditional. All of the following services match: org.apache.tapestry5.internal.services.ComponentInstanceResultProcessor(Logger, RequestPageCache, ActionRenderResponseGenerator) (at ComponentInstanceResultProcessor.java:38) via org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at TapestryModule.java:148), org.apache.tapestry5.services.TapestryModule.buildComponentEventResultProcessor(Map) (at TapestryModule.java:1101).
        [ERROR] ioc.Registry Operations trace:
        [ERROR] ioc.Registry [ 1] Realizing service ComponentEventRequestHandler
        [ERROR] ioc.Registry [ 2] Invoking org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294)
        [ERROR] ioc.Registry [ 3] Determining injection value for parameter #1 (java.util.List)
        [ERROR] ioc.Registry [ 4] Collecting ordered configuration for service ComponentEventRequestHandler
        [ERROR] ioc.Registry [ 5] Invoking method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration, ObjectLocator) (at UploadModule.java:94).
        [ERROR] ioc.Registry [ 6] Determining injection value for parameter #2 (org.apache.tapestry5.services.ComponentEventResultProcessor)
        [ERROR] TapestryModule.ComponentEventRequestHandler Construction of service ComponentEventRequestHandler failed: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294) (for service 'ComponentEventRequestHandler'): Error invoking service contribution method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration, ObjectLocator): Error invoking constructor org.apache.tapestry5.upload.internal.services.UploadExceptionFilter(MultipartDecoder, ComponentEventResultProcessor, ComponentSource) (at UploadExceptionFilter.java:40) (for service 'ComponentEventRequestHandler'): Unable to locate a single service assignable to type org.apache.tapestry5.services.ComponentEventResultProcessor with marker annotation(s) org.apache.tapestry5.services.Traditional. All of the following services match: org.apache.tapestry5.internal.services.ComponentInstanceResultProcessor(Logger, RequestPageCache, ActionRenderResponseGenerator) (at ComponentInstanceResultProcessor.java:38) via org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at TapestryModule.java:148), org.apache.tapestry5.services.TapestryModule.buildComponentEventResultProcessor(Map) (at TapestryModule.java:1101).
        java.lang.RuntimeException: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294) (for service 'ComponentEventRequestHandler'): Error invoking service contribution method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration, ObjectLocator): Error invoking constructor org.apache.tapestry5.upload.internal.services.UploadExceptionFilter(MultipartDecoder, ComponentEventResultProcessor, ComponentSource) (at UploadExceptionFilter.java:40) (for service 'ComponentEventRequestHandler'): Unable to locate a single service assignable to type org.apache.tapestry5.services.ComponentEventResultProcessor with marker annotation(s) org.apache.tapestry5.services.Traditional. All of the following services match: org.apache.tapestry5.internal.services.ComponentInstanceResultProcessor(Logger, RequestPageCache, ActionRenderResponseGenerator) (at ComponentInstanceResultProcessor.java:38) via org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at TapestryModule.java:148), org.apache.tapestry5.services.TapestryModule.buildComponentEventResultProcessor(Map) (at TapestryModule.java:1101).
        at org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:76)
        at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
        at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
        at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
        at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:910)
        at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
        at org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29)
        at org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:52)
        at org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:56)
        at org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
        at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
        at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
        at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
        at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:910)
        at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
        at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:65)
        at $ComponentEventRequestHandler_11edb48cbe4.delegate($ComponentEventRequestHandler_11edb48cbe4.java)
        at $ComponentEventRequestHandler_11edb48cbe4.handle($ComponentEventRequestHandler_11edb48cbe4.java)
        at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:140)
        at $Dispatcher_11edb48cbe7.dispatch($Dispatcher_11edb48cbe7.java)
        at $Dispatcher_11edb48cbdd.dispatch($Dispatcher_11edb48cbdd.java)
        at org.apache.tapestry5.services.TapestryModule$18.service(TapestryModule.java:1061)
        at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
        at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java)
        at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:649)
        at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java)
        at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:639)
        at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java)
        at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
        at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java)
        at foo.bar.services.AppModule$1.service(AppModule.java:84)
        at $RequestFilter_11edb48cbda.service($RequestFilter_11edb48cbda.java)
        at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
        at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
        at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
        at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java)
        at $RequestHandler_11edb48cbd3.service($RequestHandler_11edb48cbd3.java)
        at org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1039)
        at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
        at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java)
        at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
        at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java)
        at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
        at $HttpServletRequestFilter_11edb48cbd2.service($HttpServletRequestFilter_11edb48cbd2.java)
        at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java)
        at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:601)
        at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java)
        at $HttpServletRequestHandler_11edb48cbcf.service($HttpServletRequestHandler_11edb48cbcf.java)
        at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:179)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

        Show
        Howard M. Lewis Ship added a comment - Sorry to dismiss this one out of hand, I was a bit worked up on some (many) other issues. Anyway, I can reproduce this now; I created a new empty project with dependency on tapestry-upload. ERROR] ioc.Registry Unable to locate a single service assignable to type org.apache.tapestry5.services.ComponentEventResultProcessor with marker annotation(s) org.apache.tapestry5.services.Traditional. All of the following services match: org.apache.tapestry5.internal.services.ComponentInstanceResultProcessor(Logger, RequestPageCache, ActionRenderResponseGenerator) (at ComponentInstanceResultProcessor.java:38) via org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at TapestryModule.java:148), org.apache.tapestry5.services.TapestryModule.buildComponentEventResultProcessor(Map) (at TapestryModule.java:1101). [ERROR] ioc.Registry Operations trace: [ERROR] ioc.Registry [ 1] Realizing service ComponentEventRequestHandler [ERROR] ioc.Registry [ 2] Invoking org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294) [ERROR] ioc.Registry [ 3] Determining injection value for parameter #1 (java.util.List) [ERROR] ioc.Registry [ 4] Collecting ordered configuration for service ComponentEventRequestHandler [ERROR] ioc.Registry [ 5] Invoking method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration, ObjectLocator) (at UploadModule.java:94). [ERROR] ioc.Registry [ 6] Determining injection value for parameter #2 (org.apache.tapestry5.services.ComponentEventResultProcessor) [ERROR] TapestryModule.ComponentEventRequestHandler Construction of service ComponentEventRequestHandler failed: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294) (for service 'ComponentEventRequestHandler'): Error invoking service contribution method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration, ObjectLocator): Error invoking constructor org.apache.tapestry5.upload.internal.services.UploadExceptionFilter(MultipartDecoder, ComponentEventResultProcessor, ComponentSource) (at UploadExceptionFilter.java:40) (for service 'ComponentEventRequestHandler'): Unable to locate a single service assignable to type org.apache.tapestry5.services.ComponentEventResultProcessor with marker annotation(s) org.apache.tapestry5.services.Traditional. All of the following services match: org.apache.tapestry5.internal.services.ComponentInstanceResultProcessor(Logger, RequestPageCache, ActionRenderResponseGenerator) (at ComponentInstanceResultProcessor.java:38) via org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at TapestryModule.java:148), org.apache.tapestry5.services.TapestryModule.buildComponentEventResultProcessor(Map) (at TapestryModule.java:1101). java.lang.RuntimeException: Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294) (for service 'ComponentEventRequestHandler'): Error invoking service contribution method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration, ObjectLocator): Error invoking constructor org.apache.tapestry5.upload.internal.services.UploadExceptionFilter(MultipartDecoder, ComponentEventResultProcessor, ComponentSource) (at UploadExceptionFilter.java:40) (for service 'ComponentEventRequestHandler'): Unable to locate a single service assignable to type org.apache.tapestry5.services.ComponentEventResultProcessor with marker annotation(s) org.apache.tapestry5.services.Traditional. All of the following services match: org.apache.tapestry5.internal.services.ComponentInstanceResultProcessor(Logger, RequestPageCache, ActionRenderResponseGenerator) (at ComponentInstanceResultProcessor.java:38) via org.apache.tapestry5.services.TapestryModule.bind(ServiceBinder) (at TapestryModule.java:148), org.apache.tapestry5.services.TapestryModule.buildComponentEventResultProcessor(Map) (at TapestryModule.java:1101). at org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:76) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:910) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29) at org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:52) at org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:56) at org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:910) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:65) at $ComponentEventRequestHandler_11edb48cbe4.delegate($ComponentEventRequestHandler_11edb48cbe4.java) at $ComponentEventRequestHandler_11edb48cbe4.handle($ComponentEventRequestHandler_11edb48cbe4.java) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:140) at $Dispatcher_11edb48cbe7.dispatch($Dispatcher_11edb48cbe7.java) at $Dispatcher_11edb48cbdd.dispatch($Dispatcher_11edb48cbdd.java) at org.apache.tapestry5.services.TapestryModule$18.service(TapestryModule.java:1061) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:649) at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:639) at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java) at foo.bar.services.AppModule$1.service(AppModule.java:84) at $RequestFilter_11edb48cbda.service($RequestFilter_11edb48cbda.java) at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) at $RequestHandler_11edb48cbde.service($RequestHandler_11edb48cbde.java) at $RequestHandler_11edb48cbd3.service($RequestHandler_11edb48cbd3.java) at org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1039) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java) at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_11edb48cbd2.service($HttpServletRequestFilter_11edb48cbd2.java) at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:601) at $HttpServletRequestHandler_11edb48cbd5.service($HttpServletRequestHandler_11edb48cbd5.java) at $HttpServletRequestHandler_11edb48cbcf.service($HttpServletRequestHandler_11edb48cbcf.java) at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:179) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
        Hide
        Howard M. Lewis Ship added a comment -

        Hm. Found a gap where OperationTracker wasn't being used, thus:

        [ERROR] ioc.Registry Operations trace:
        [ERROR] ioc.Registry [ 1] Realizing service ComponentEventRequestHandler
        [ERROR] ioc.Registry [ 2] Invoking org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294)
        [ERROR] ioc.Registry [ 3] Determining injection value for parameter #1 (java.util.List)
        [ERROR] ioc.Registry [ 4] Collecting ordered configuration for service ComponentEventRequestHandler
        [ERROR] ioc.Registry [ 5] Invoking method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration) (at UploadModule.java:93).
        [ERROR] ioc.Registry [ 6] Autobuilding instance of class org.apache.tapestry5.upload.internal.services.UploadExceptionFilter
        [ERROR] ioc.Registry [ 7] Determining injection value for parameter #2 (org.apache.tapestry5.services.ComponentEventResultProcessor)

        Show
        Howard M. Lewis Ship added a comment - Hm. Found a gap where OperationTracker wasn't being used, thus: [ERROR] ioc.Registry Operations trace: [ERROR] ioc.Registry [ 1] Realizing service ComponentEventRequestHandler [ERROR] ioc.Registry [ 2] Invoking org.apache.tapestry5.services.TapestryModule.buildComponentEventRequestHandler(List, Logger, ComponentEventRequestHandlerImpl) (at TapestryModule.java:1294) [ERROR] ioc.Registry [ 3] Determining injection value for parameter #1 (java.util.List) [ERROR] ioc.Registry [ 4] Collecting ordered configuration for service ComponentEventRequestHandler [ERROR] ioc.Registry [ 5] Invoking method org.apache.tapestry5.upload.services.UploadModule.contributeComponentEventRequestHandler(OrderedConfiguration) (at UploadModule.java:93). [ERROR] ioc.Registry [ 6] Autobuilding instance of class org.apache.tapestry5.upload.internal.services.UploadExceptionFilter [ERROR] ioc.Registry [ 7] Determining injection value for parameter #2 (org.apache.tapestry5.services.ComponentEventResultProcessor)
        Hide
        Howard M. Lewis Ship added a comment -

        What was really needed was a @Primary annotation to distinguish the pipeline from the services contributed into the pipeline.

        Show
        Howard M. Lewis Ship added a comment - What was really needed was a @Primary annotation to distinguish the pipeline from the services contributed into the pipeline.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development