Uploaded image for project: 'XNAT'
  1. XNAT
  2. XNAT-5831

Snapshots failing to be generated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.7.5
    • Fix Version/s: 1.7.5
    • Component/s: None
    • Labels:
      None
    • Sprint:
      1.7.5-RC-1
    • Rank:
      0|ii1lj9:x
    • Sprint:
      1.7.5-RC-1

      Description

      If you attempt to use the master branch of the pipeline engine with current XNAT code, snapshots will fail to generate due to changes in the data model in 1.7.5. This results in things like:

      -----------------------------xnat-latest----------------
      2018/08/29 17:30:51
      Executing: /data/xnat/pipeline/image-tools/WebBasedQCImageCreator -session Sample_ID -project t -xnatId XNAT_E00002 -host http://10.1.100.17/ -u d8c5a188-abd6-4758-8217-cb9f9fd0ecf9 -pwd ######## -raw
      --------------------------------------------------------------------------------------
      Aug 29, 2018 5:30:53 PM com.noelios.restlet.ext.net.HttpClientHelper start
      INFO: Starting the HTTP client
      Aug 29, 2018 5:30:53 PM com.noelios.restlet.http.HttpClientCall getResponseEntity
      INFO: The length of the message body is unknown. The entity must be handled carefully and consumed entirely in order to surely release the connection.
      org.xml.sax.SAXException: Invalid field 'start_date'
              at org.nrg.xdat.bean.reader.XDATXMLReader.endElement(XDATXMLReader.java:307)
              at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
              at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
              at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
              at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
              at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
              at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
              at org.nrg.xdat.bean.reader.XDATXMLReader.parse(XDATXMLReader.java:528)
              at org.nrg.xnattools.xml.AbsService.getBeanFromStream(AbsService.java:109)
              at org.nrg.xnattools.xml.XMLSearch.getBeanFromHost(XMLSearch.java:230)
              at org.nrg.xnat.plexiviewer.converter.WebBasedQCImageCreator.createQCRawImages(WebBasedQCImageCreator.java:300)
              at org.nrg.xnat.plexiviewer.converter.WebBasedQCImageCreator.createQCImages(WebBasedQCImageCreator.java:127)
              at org.nrg.xnat.plexiviewer.converter.WebBasedQCImageCreator.main(WebBasedQCImageCreator.java:581)
      -----------------------------xnat-latest----------------
      2018/08/29 17:30:55
      Executing: /data/xnat/pipeline/xnat-tools/XnatDataClient -u d8c5a188-abd6-4758-8217-cb9f9fd0ecf9 -p ######## -r "http://10.1.100.17//data/projects/t/pipelines/AUTO_ARCHIVE/experiments/XNAT_E00002?match=LIKE" -m POST
      --------------------------------------------------------------------------------------
      

      Therefore, we need to release a 1.7.5-compatible version of the pipeline engine alongside 1.7.5. Previously, the develop branch of the pipeline engine worked fine with XNAT 1.7.5 development code. However, some time somewhat recently, this also started failing. It fails with a stacktrace like this:

      -----------------------------xnat-dev05.nrg.mir----------------
      2018/08/29 11:48:01
      Executing: /data/xnat/pipeline/image-tools/WebBasedQCImageCreator -session SPP_0x220790_CT -project t -xnatId XNAT_E00173 -host http://xnat-dev05.nrg.mir/ -u 0af8621b-6b86-4cd0-9d83-3854b4b52dbe -pwd ######## -raw
      --------------------------------------------------------------------------------------
      Aug 29, 2018 11:48:02 AM com.noelios.restlet.ext.net.HttpClientHelper start
      INFO: Starting the HTTP client
      Aug 29, 2018 11:48:02 AM com.noelios.restlet.http.HttpClientCall getResponseEntity
      INFO: The length of the message body is unknown. The entity must be handled carefully and consumed entirely in order to surely release the connection.
      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils
              at org.nrg.xdat.bean.base.BaseElement.ValueParser(BaseElement.java:293)
              at org.nrg.xdat.bean.XnatAbstractresourceBean.getXMLAtts(XnatAbstractresourceBean.java:342)
              at org.nrg.xdat.bean.XnatResourceBean.getXMLAtts(XnatResourceBean.java:350)
              at org.nrg.xdat.bean.XnatResourcecatalogBean.getXMLAtts(XnatResourcecatalogBean.java:137)
              at org.nrg.xdat.bean.XnatResourcecatalogBean.toXML(XnatResourcecatalogBean.java:100)
              at org.nrg.xnat.plexiviewer.converter.WebBasedQCImageCreator.createThumbnail(WebBasedQCImageCreator.java:487)
              at org.nrg.xnat.plexiviewer.converter.WebBasedQCImageCreator.createQCRawImages(WebBasedQCImageCreator.java:344)
              at org.nrg.xnat.plexiviewer.converter.WebBasedQCImageCreator.createQCImages(WebBasedQCImageCreator.java:127)
              at org.nrg.xnat.plexiviewer.converter.WebBasedQCImageCreator.main(WebBasedQCImageCreator.java:588)
      Caused by: java.lang.ClassNotFoundException: org.apache.commons.text.StringEscapeUtils
              at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
              ... 9 more
      -----------------------------xnat-dev05.nrg.mir----------------
      2018/08/29 11:48:08
      Executing: /data/xnat/pipeline/xnat-tools/XnatDataClient -u 0af8621b-6b86-4cd0-9d83-3854b4b52dbe -p ######## -r "http://xnat-dev05.nrg.mir//data/projects/t/pipelines/AUTO_ARCHIVE/experiments/XNAT_E00173?match=LIKE" -m POST
      --------------------------------------------------------------------------------------
      

      I diffed the lib folder of a working version of the pipeline engine (develop branch) on my local VM with what currently builds from the develop branch of the pipeline engine:

      24c24
      < 34074bad31d71c7a3ccc4e8b80366c58  core-1.7.5-SNAPSHOT.jar
      ---
      > 96a96652b0d776a00a096e3184b31c5a  core-1.7.5-SNAPSHOT.jar
      32c32
      < b2c828132bdba8a743f6fc1254cd9ebb  framework-1.7.5-SNAPSHOT.jar
      ---
      > 03ff648fbf0e75104b529595a1a2b5e7  framework-1.7.5-SNAPSHOT.jar
      105c105
      < 0853785d62e89d9015066f4288e57749  xnat-data-models-1.7.5-SNAPSHOT.jar
      ---
      > 48aff8fee6ff3bbb302aceb0a7f59aaf  xnat-data-models-1.7.5-SNAPSHOT.jar
      

      Note that the framework jar has updated. In particular, a commit to framework explicitly imports a class in the org.apache.commons.text package: https://bitbucket.org/xnatdev/framework/commits/22d24c9120cbf2da9517f26be18e9a533068c8c7?at=develop.

      Note that recent-ish changes to parent deal with the org.apache.commons:commons-text library:

      https://bitbucket.org/xnatdev/parent/commits/3d31ed965ded116b3541ee9a164275817bde8663?at=develop
      https://bitbucket.org/xnatdev/parent/commits/ecb287670f021b05fd642564d38cd915b209016f?at=develop

        Attachments

          Activity

            People

            Assignee:
            moore.c@wustl.edu Charlie Moore
            Reporter:
            moore.c@wustl.edu Charlie Moore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: