Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3915

Fix the NoClassDefFoundError and BadRequest errors found while testing UCSC

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 10.1.0
    • Labels:
      None

      Description

      When running UCSCRestSymloaderTest, getting the below error in the log, this isn't an error that fails the test case, but need to be fixed to make the log cleaner:

      java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
      at org.lorainelab.igb.synonymlookup.services.impl.SynonymLookup.loadSynonyms(SynonymLookup.java:73)
      at org.lorainelab.igb.synonymlookup.services.impl.ChromosomeSynonymLookupImpl.<init>(ChromosomeSynonymLookupImpl.java:28)

      and when trying to load a chromosome that's not present for a dataset, UCSC is now throwing a Bad request error, so we have to handle this in the code:

      Sep 20, 2024 2:49:43 PM com.affymetrix.genometry.quickload.QuickLoadSymLoader logException
      SEVERE: Unexpected response status: 400
      org.apache.http.client.ClientProtocolException: Unexpected response status: 400
      at org.lorainelab.igb.ucsc.rest.api.service.utils.ApiResponseHandler.handleResponse(ApiResponseHandler.java:33)

        Attachments

          Activity

          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited

          Resolved both issues. Fixed the NoClassDefFoundError in the UCSCRestSymloaderTest by adding the required dependencies for the test scope and fixed the Bad request error by updating the code to handle the 400 status response by logging it as a warning message instead of throwing an error. Updated code is present at: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3915. Warning message is taken from the response of UCSC API, below is the warning message that gets logged for the scenario where user tries to load a chromosome that's not present for that dataset:

          16:53:20.942 WARN o.l.i.u.r.a.s.u.ApiResponseHandler - Received 400 Bad Request: "can not find specified chrom=chrM in bigBed file URL '/gbdb/hs1/encode/peaks/22Rv1.CTCF.chm13v2.0.bb', track=T2T_Encode_Peaks_22Rv1.CTCF genome=hs1 for endpoint '/getData/track' given hubUrl='/gbdb/hs1/hubs/public/hub.txt'"

          Please review and let me know if there are any issues.

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited Resolved both issues. Fixed the NoClassDefFoundError in the UCSCRestSymloaderTest by adding the required dependencies for the test scope and fixed the Bad request error by updating the code to handle the 400 status response by logging it as a warning message instead of throwing an error. Updated code is present at: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3915 . Warning message is taken from the response of UCSC API, below is the warning message that gets logged for the scenario where user tries to load a chromosome that's not present for that dataset: 16:53:20.942 WARN o.l.i.u.r.a.s.u.ApiResponseHandler - Received 400 Bad Request: "can not find specified chrom=chrM in bigBed file URL '/gbdb/hs1/encode/peaks/22Rv1.CTCF.chm13v2.0.bb', track=T2T_Encode_Peaks_22Rv1.CTCF genome=hs1 for endpoint '/getData/track' given hubUrl='/gbdb/hs1/hubs/public/hub.txt'" Please review and let me know if there are any issues.
          Hide
          nfreese Nowlan Freese added a comment - - edited

          Code changes look good, and I am no longer seeing the error when building IGB with tests.

          Ready for pull request.

          Show
          nfreese Nowlan Freese added a comment - - edited Code changes look good, and I am no longer seeing the error when building IGB with tests. Ready for pull request.
          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - Raised the pull request: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/1039
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          PR is merged. New installers are built and deployed to bioviz.org early access section.
          Ready for testing.

          Show
          ann.loraine Ann Loraine added a comment - - edited PR is merged. New installers are built and deployed to bioviz.org early access section. Ready for testing.
          Hide
          nfreese Nowlan Freese added a comment -

          Tested on main branch installer on Mac and main branch through terminal on Mac.

          I am no longer seeing the 400 error when loading the T2T annotations for chrM and I am not seeing the error when building IGB with tests.

          Closing ticket.

          Show
          nfreese Nowlan Freese added a comment - Tested on main branch installer on Mac and main branch through terminal on Mac. I am no longer seeing the 400 error when loading the T2T annotations for chrM and I am not seeing the error when building IGB with tests. Closing ticket.

            People

            • Assignee:
              jsirigin Jaya Sravani Sirigineedi
              Reporter:
              jsirigin Jaya Sravani Sirigineedi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: