Announcement Announcement Module
Collapse
No announcement yet.
EL1027E After 1.1.0 -> 1.1.1 Upgrade (Solved) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • EL1027E After 1.1.0 -> 1.1.1 Upgrade (Solved)

    It took me a while to figure this one out, so I thought I'd post in case anyone else has this issue. Searching for "EL1027E" didn't yield any relevant results for me.

    After upgrading to Roo 1.1.1 I started getting an exception like this:

    Code:
    org.springframework.expression.spel.SpelEvaluationException: EL1027E:(pos 4): Indexing into type 'com.example.MyParentClass' is not supported
    This was happening in table.tagx, here:

    Code:
    <spring:eval expression="item[column]" />
    Where "item" is an instance of MyParentClass and column is a field name.

    The exception makes it sound like you can't index into the class, but the problem turned out to be "column" was not a valid field. DBRE in 1.1.1 changes ManyToOne field names from "relatedClass1" to "fieldnameId". This is nice, and it updates most references automatically, but I had a couple user-managed tags that were not updated. Thus, the above expression was being evaluated with the old field name, resulting in the exception.

    - Luke

  • #2
    Thanks Luke! This was helpful. I was facing this issue too.

    Originally posted by luke.way View Post
    It took me a while to figure this one out, so I thought I'd post in case anyone else has this issue. Searching for "EL1027E" didn't yield any relevant results for me.

    After upgrading to Roo 1.1.1 I started getting an exception like this:

    Code:
    org.springframework.expression.spel.SpelEvaluationException: EL1027E:(pos 4): Indexing into type 'com.example.MyParentClass' is not supported
    This was happening in table.tagx, here:

    Code:
    <spring:eval expression="item[column]" />
    Where "item" is an instance of MyParentClass and column is a field name.

    The exception makes it sound like you can't index into the class, but the problem turned out to be "column" was not a valid field. DBRE in 1.1.1 changes ManyToOne field names from "relatedClass1" to "fieldnameId". This is nice, and it updates most references automatically, but I had a couple user-managed tags that were not updated. Thus, the above expression was being evaluated with the old field name, resulting in the exception.

    - Luke

    Comment


    • #3
      Luke, thank you very much for this tip! It helped me a lot.

      Comment


      • #4
        Originally posted by anton1980 View Post
        Luke, thank you very much for this tip! It helped me a lot.
        Ok folks,

        Trying to solve this issue I made the following changes in the table.tagx,
        I replaced this:

        Code:
        <spring:eval expression="item[typeIdFieldName]"/>
        and this:

        Code:
        <spring:eval expression="item[column]" htmlEscape="false" />

        for this:
        Code:
        <spring:eval expression="item.${typeIdFieldName}"/>
        and

        Code:
        <spring:eval expression="item.${column}"  htmlEscape="false" />

        And then not only the error message for this issue turns into a much clear message like the following:

        PHP Code:
        "EL1008E:(pos 5): Field or property 'id' cannot be found on 
        object of type" 
        but also you can now access nested properties when using the column tags
        like this:

        Code:
        property="person.firstName"

        Comment


        • #5
          Thanks for the post. Really helped.

          Comment

          Working...
          X