Uploaded image for project: 'Commons OGNL (Dormant)'
  1. Commons OGNL (Dormant)
  2. OGNL-75

Ognl Exception source is null for getProperty(null, "mapKey") when using split on a map

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.7
    • ExpressionCompiler
    • None
    • ognl-2.7-20070513 snapshot, tapestry 4.1.2-20070514 snapshots, windows xp, any browser

    Description

      The simplified testing version setup below throws: ognl.OgnlException: source is null for getProperty(null, "mapKey")... Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class ognl.ASTChain27475362753.0Accessor: [source error] split(java.lang.String) not found in java.lang.Object....

      <span jwcid="@Insert" value="ognl:changeMap[mapKey].split('=')[0]" />

      public Map getChangeMap()

      { Map changeMap = new HashMap(); changeMap.put(new Long(82), "StringStuff=someValue"); return changeMap; }

      public Long getMapKey()

      { return new Long(82); }

      The original problem that we tried to mock up above was that we were passing a Map symbol into a script which had issues with a split. This was working but not sure which snapshot it stopped working in.

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            avo Anna Vo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: