Uploaded image for project: 'VIVO'
  1. VIVO
  2. VIVO-951

During N3 editing, errors in optional SPARQL are almost silently ignored

    Details

    • Type: Code Task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Custom forms
    • Labels:
      None
    • Attachments:
      1
    • Comments:
      0

      Description

      Errors like this appear in the log:
      ==> vivo.all.log <==
      2015-01-23 15:34:09,413 ERROR [riot] [line: 6, col: 91] Unrecognized: [DOT]
      2015-01-23 15:34:09,414 ERROR [riot] [line: 1, col: 91] Triples not terminated by DOT
      2015-01-23 15:34:09,414 ERROR [riot] [line: 4, col: 91] Unrecognized: [DOT]
      2015-01-23 15:34:09,415 ERROR [riot] [line: 1, col: 93] Triples not terminated by DOT
      2015-01-23 15:34:09,416 ERROR [riot] [line: 5, col: 91] Unrecognized: [DOT]
      2015-01-23 15:34:09,417 ERROR [riot] [line: 5, col: 91] Unrecognized: [DOT]
      2015-01-23 15:34:09,418 ERROR [riot] [line: 6, col: 90] Unrecognized: [VAR:awardedDegreeLabel]
      2015-01-23 15:34:09,419 ERROR [riot] [line: 1, col: 89] Unrecognized: [VAR:newOrg]
      2015-01-23 15:34:09,419 ERROR [riot] [line: 1, col: 91] Unrecognized: [VAR:newOrg]
      2015-01-23 15:34:09,420 ERROR [riot] [line: 3, col: 90] Unrecognized: [VAR:awardedDegreeLabel]
      2015-01-23 15:34:09,421 ERROR [riot] [line: 1, col: 102] Unrecognized: [VAR:intervalNode]
      2015-01-23 15:34:09,421 ERROR [riot] [line: 1, col: 102] Unrecognized: [VAR:intervalNode]

      There is not enough information here, but we can get more by adding a separate appender to debug.log4j.properties, like this:
      log4j.appender.RiotAppender=org.apache.log4j.RollingFileAppender
      log4j.appender.RiotAppender.File= $$

      {catalina.home}

      /logs/$

      {webapp.name}

      .riot.log
      log4j.appender.RiotAppender.MaxFileSize=10MB
      log4j.appender.RiotAppender.MaxBackupIndex=10
      log4j.appender.RiotAppender.layout=edu.cornell.mannlib.vitro.webapp.utils.logging.StackTraceLayout
      log4j.logger.org.apache.jena.riot=INFO, RiotAppender

      This shows that the error coming from N3 editing, and is being swallowed at ProcessRdfForm.parseN3ToRDF().

      The stated intention is that, if the absence of an optional value makes the SPARQL invalid, the problem should be reported.

      The problem is that the same error would occur if the optional value was present and the SPARQL was inherently invalid, and this is what is not being reported.

      In this particular case, I was editing an educational training entry for a person (see attached screen shot).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              j2blake Jim Blake
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: