Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1291

EOModel import chokes on \r

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0M6
    • Undefined future
    • EOF integration
    • None

    Description

      EOModel import via CayenneModeler throws on the String like the one below, that contains "\r" in the documentation field. This is a parser problem, failing to handle \r's in side the quoted strings. The workaround is rather trivial - remove the special char manually.

      {
      columnName = xxxxx;
      name = xxxxx;
      userInfo = {
      "_EntityModeler" =

      { documentation = "xxxxxx\rxxxxxx"; }

      ;
      };
      }

      CayenneModeler Info
      Version: cayenne.version
      Build Date: cayenne.build.date
      Exception:
      =================================
      org.apache.cayenne.wocompat.parser.TokenMgrError: Lexical error at line 103, column 89. Encountered: "r" (114), after : "xxxxxxxxxxxxx.
      "
      at org.apache.cayenne.wocompat.parser.ParserTokenManager.getNextToken(ParserTokenManager.java:782)
      at org.apache.cayenne.wocompat.parser.Parser.jj_ntk(Parser.java:469)
      at org.apache.cayenne.wocompat.parser.Parser.object(Parser.java:96)
      at org.apache.cayenne.wocompat.parser.Parser.keyValuePair(Parser.java:190)
      at org.apache.cayenne.wocompat.parser.Parser.map(Parser.java:157)
      at org.apache.cayenne.wocompat.parser.Parser.object(Parser.java:102)
      at org.apache.cayenne.wocompat.parser.Parser.keyValuePair(Parser.java:190)
      at org.apache.cayenne.wocompat.parser.Parser.map(Parser.java:157)
      at org.apache.cayenne.wocompat.parser.Parser.object(Parser.java:102)
      at org.apache.cayenne.wocompat.parser.Parser.keyValuePair(Parser.java:190)
      at org.apache.cayenne.wocompat.parser.Parser.map(Parser.java:166)
      at org.apache.cayenne.wocompat.parser.Parser.object(Parser.java:102)
      at org.apache.cayenne.wocompat.parser.Parser.collection(Parser.java:219)
      at org.apache.cayenne.wocompat.parser.Parser.object(Parser.java:98)
      at org.apache.cayenne.wocompat.parser.Parser.keyValuePair(Parser.java:190)
      at org.apache.cayenne.wocompat.parser.Parser.map(Parser.java:157)
      at org.apache.cayenne.wocompat.parser.Parser.object(Parser.java:102)
      at org.apache.cayenne.wocompat.parser.Parser.propertyList(Parser.java:64)
      at org.apache.cayenne.wocompat.EOModelHelper.loadEntityIndex(EOModelHelper.java:372)

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: