Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1
    • Component/s: Annotations
    • Labels:
      None
    • Environment:
      jdk 1.5.0_07
      tapestry snapshot 4.1.0-20060711.165511-11
      jetty 5.1.10

      Description

      I hope this stack trace is enough. I will try to narrow it down to a reproduction recipe if need be. I am not using the new @EventListener annotation. I just dropped in the 4.1.0-SNAPSHOT as a replacement for 4.0.2 and hit this.

      Error: Error enhancing method public abstract int com.whatever.page.presentation.ListPresentations.getDefaultPageSize(): java.lang.NullPointerException

      • org.apache.tapestry.annotations.EventListenerAnnotationWorker.peformEnhancement(EventListenerAnnotationWorker.java:50)
      • $SecondaryAnnotationWorker_10c5fea843f.peformEnhancement($SecondaryAnnotationWorker_10c5fea843f.java)
      • $SecondaryAnnotationWorker_10c5fea8441.peformEnhancement($SecondaryAnnotationWorker_10c5fea8441.java)
      • $SecondaryAnnotationWorker_10c5fea843b.peformEnhancement($SecondaryAnnotationWorker_10c5fea843b.java)
      • org.apache.tapestry.annotations.AnnotationEnhancementWorker.performMethodEnhancement(AnnotationEnhancementWorker.java:119)
      • org.apache.tapestry.annotations.AnnotationEnhancementWorker.performEnhancement(AnnotationEnhancementWorker.java:70)
      • $EnhancementWorker_10c5fea8439.performEnhancement($EnhancementWorker_10c5fea8439.java)
      • $EnhancementWorker_10c5fea8438.performEnhancement($EnhancementWorker_10c5fea8438.java)
      • $EnhancementWorker_10c5fea843a.performEnhancement($EnhancementWorker_10c5fea843a.java)
      • $EnhancementWorker_10c5fea8411.performEnhancement($EnhancementWorker_10c5fea8411.java)
      • $EnhancementWorker_10c5fea8410.performEnhancement($EnhancementWorker_10c5fea8410.java)
      • org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:97)
      • $ComponentConstructorFactory_10c5fea83fe.getComponentConstructor($ComponentConstructorFactory_10c5fea83fe.java)
      • $ComponentConstructorFactory_10c5fea83fd.getComponentConstructor($ComponentConstructorFactory_10c5fea83fd.java)
      • org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:567)
      • org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:594)
      • $IPageLoader_10c5fea83f7.loadPage($IPageLoader_10c5fea83f7.java)
      • $IPageLoader_10c5fea83f8.loadPage($IPageLoader_10c5fea83f8.java)
      • org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:117)
      • $IPageSource_10c5fea8358.getPage($IPageSource_10c5fea8358.java)
      • $IPageSource_10c5fea8357.getPage($IPageSource_10c5fea8357.java)
      • org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:249)
      • org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
      • org.apache.tapestry.engine.RequestCycle.activate(RequestCycle.java:580)
      • org.apache.tapestry.engine.PageService.service(PageService.java:66)
      • $IEngineService_10c5fea83e1.service($IEngineService_10c5fea83e1.java)
      • org.apache.tapestry.services.impl.EngineServiceInnerProxy.service(EngineServiceInnerProxy.java:77)
      • org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
      • org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:241)
      • org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
      • $WebRequestServicer_10c5fea83b6.service($WebRequestServicer_10c5fea83b6.java)
      • $WebRequestServicer_10c5fea83b5.service($WebRequestServicer_10c5fea83b5.java)
      • $WebRequestServicer_10c5fea83b2.service($WebRequestServicer_10c5fea83b2.java)
      • $WebRequestServicer_10c5fea83b1.service($WebRequestServicer_10c5fea83b1.java)
      • org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
      • $ServletRequestServicer_10c5fea839e.service($ServletRequestServicer_10c5fea839e.java)
      • $ServletRequestServicer_10c5fea839d.service($ServletRequestServicer_10c5fea839d.java)
      • org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
      • $ServletRequestServicerFilter_10c5fea839a.service($ServletRequestServicerFilter_10c5fea839a.java)
      • $ServletRequestServicerFilter_10c5fea8399.service($ServletRequestServicerFilter_10c5fea8399.java)
      • $ServletRequestServicer_10c5fea839f.service($ServletRequestServicer_10c5fea839f.java)
      • org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
      • $ServletRequestServicerFilter_10c5fea8398.service($ServletRequestServicerFilter_10c5fea8398.java)
      • $ServletRequestServicerFilter_10c5fea8397.service($ServletRequestServicerFilter_10c5fea8397.java)
      • $ServletRequestServicer_10c5fea839f.service($ServletRequestServicer_10c5fea839f.java)
      • org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      • $ServletRequestServicerFilter_10c5fea839c.service($ServletRequestServicerFilter_10c5fea839c.java)
      • $ServletRequestServicerFilter_10c5fea839b.service($ServletRequestServicerFilter_10c5fea839b.java)
      • $ServletRequestServicer_10c5fea839f.service($ServletRequestServicer_10c5fea839f.java)
      • $ServletRequestServicer_10c5fea8392.service($ServletRequestServicer_10c5fea8392.java)
      • $ServletRequestServicer_10c5fea8391.service($ServletRequestServicer_10c5fea8391.java)
      • org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
      • org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:104)
      • javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      • javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      • org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
      • org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
      • org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
      • org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
      • org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
      • org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
      • org.mortbay.http.HttpServer.service(HttpServer.java:909)
      • org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
      • org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
      • org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
      • org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
      • org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
      • org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

        Activity

        Hide
        Jesse Kuhnert added a comment -

        Sorry Mark. I thought I was going to get to this tonight but was offered free tasty steak for dinner and couldn't resist.

        It's a scary exception as that particular type of worker should be guaranteed to have an EventListener annotation when performEnhancement() is called. If I can't create a test case that explains it tomorrow I might want more environmental info from you tomororw. (I will look at it first thing tomorrow and deploy a new snapshot if I succeed.)

        Show
        Jesse Kuhnert added a comment - Sorry Mark. I thought I was going to get to this tonight but was offered free tasty steak for dinner and couldn't resist. It's a scary exception as that particular type of worker should be guaranteed to have an EventListener annotation when performEnhancement() is called. If I can't create a test case that explains it tomorrow I might want more environmental info from you tomororw. (I will look at it first thing tomorrow and deploy a new snapshot if I succeed.)
        Hide
        Mark Reynolds added a comment -

        The method it choked on in the page class looks like this:

        @InitialValue("literal:5")
        public abstract int getDefaultPageSize();

        An abstract setter is not declared.

        Show
        Mark Reynolds added a comment - The method it choked on in the page class looks like this: @InitialValue("literal:5") public abstract int getDefaultPageSize(); An abstract setter is not declared.
        Hide
        Mark Reynolds added a comment -

        @InitialValue may be the culprit. I tried to go to another page with doesn't have an @InitialValue annotation in the page itself, and then i got the same NPE during enhancement of a method in in my border component that has an @InitialValue annotation.

        Error: Error enhancing method public abstract java.lang.String com.whatever.component.PageBorder.getBaseUrl(): java.lang.NullPointerException (basically the same stack trace as above).

        Here are a couple methods from my page border class:

        @InjectObject("infrastructure:request")
        public abstract WebRequest getWebRequest();

        @InitialValue("ognl:webRequest.contextPath")
        public abstract String getBaseUrl();

        Show
        Mark Reynolds added a comment - @InitialValue may be the culprit. I tried to go to another page with doesn't have an @InitialValue annotation in the page itself, and then i got the same NPE during enhancement of a method in in my border component that has an @InitialValue annotation. Error: Error enhancing method public abstract java.lang.String com.whatever.component.PageBorder.getBaseUrl(): java.lang.NullPointerException (basically the same stack trace as above). Here are a couple methods from my page border class: @InjectObject("infrastructure:request") public abstract WebRequest getWebRequest(); @InitialValue("ognl:webRequest.contextPath") public abstract String getBaseUrl();
        Hide
        Jesse Kuhnert added a comment -

        Thanks Mark, that does help to narrow it down. Sounds like an issue with the top level chain worker. I've added a temporary fix just to get you on your way again but am finally being forced to create a tapestry-test project so I can share testing resources. Shouldn't take very long. I'll update the ticket when I'm done.

        Show
        Jesse Kuhnert added a comment - Thanks Mark, that does help to narrow it down. Sounds like an issue with the top level chain worker. I've added a temporary fix just to get you on your way again but am finally being forced to create a tapestry-test project so I can share testing resources. Shouldn't take very long. I'll update the ticket when I'm done.
        Hide
        Jesse Kuhnert added a comment -

        Hey Mark, this has been fixed and deployed now. I'm going to leave this ticket open as I'm not sure chain of command is the right pattern for this interface. (either that or the interface isn't right).

        Show
        Jesse Kuhnert added a comment - Hey Mark, this has been fixed and deployed now. I'm going to leave this ticket open as I'm not sure chain of command is the right pattern for this interface. (either that or the interface isn't right).
        Hide
        Jesse Kuhnert added a comment -

        Changed configuration of SecondaryAnnotationEnhancementWorkers to be a simple list.

        Show
        Jesse Kuhnert added a comment - Changed configuration of SecondaryAnnotationEnhancementWorkers to be a simple list.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Mark Reynolds
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development