Tapestry
  1. Tapestry
  2. TAPESTRY-1256

IllegalStateException if you try to access an ASO with OGNL, before accessing it in code

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      java 1.5_06, tomcat 5.5

      Description

      This appears to be a regression, as it didn't happen with 4.1.1 or 4.1. With 4.1.2-SNAPSHOT, if you make an ASO and try to use it in an html template with OGNL, you will get an IllegalAccessException, unless you first access it in code, within a pageBeginRender method, for instance.

      There's a demo app here:

      http://jwoodchip.blogspot.com/2007/02/application-state-objects-in-tapestry.html

        Activity

        Julian Wood created issue -
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Fix Version/s 4.1.2 [ 12312202 ]
        Hide
        Jesse Kuhnert added a comment -

        I tried to download your sample but it won't resolve in maven2. If you can get that part working I can try looking again but otherwise can't help as you've not outlined anything specific.

        Show
        Jesse Kuhnert added a comment - I tried to download your sample but it won't resolve in maven2. If you can get that part working I can try looking again but otherwise can't help as you've not outlined anything specific.
        Hide
        Julian Wood added a comment -

        Sorry, that dependency wasn't required at all. I've removed it and it should build with maven now (as I've just come across the same issue again while working on a new project, and wanted to see what had become of it).

        There's not really a lot to it - it's one of those things which is easy to work around, but it bugs you because it is not clean (as it was previously). All you need to do is make an ASO, say a session object, and then access it from ognl. You'll get an illegal state exception unless you go and access it in, say a PageBeginRender method.

        The code provided will throw the exception when you hit the home page. If you uncomment the pagebeginrender, it will be fine.

        Show
        Julian Wood added a comment - Sorry, that dependency wasn't required at all. I've removed it and it should build with maven now (as I've just come across the same issue again while working on a new project, and wanted to see what had become of it). There's not really a lot to it - it's one of those things which is easy to work around, but it bugs you because it is not clean (as it was previously). All you need to do is make an ASO, say a session object, and then access it from ognl. You'll get an illegal state exception unless you go and access it in, say a PageBeginRender method. The code provided will throw the exception when you hit the home page. If you uncomment the pagebeginrender, it will be fine.
        Hide
        Jesse Kuhnert added a comment -

        Things should be happier in tomcat specifically now.

        Show
        Jesse Kuhnert added a comment - Things should be happier in tomcat specifically now.
        Jesse Kuhnert made changes -
        Assignee Jesse Kuhnert [ jkuhnert ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12395845 ] Default workflow, editable Closed status [ 12568146 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568146 ] jira [ 12591233 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development