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

Fix: local quickload not added as data source

    Details

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

      Description

      Release Testing Mac M1
      Problem not found on 9.1.8. Reproducible on 9.1.10
      Possibly related to IGBF-95

      When adding a local quickload data source, IGB acts like the process worked normally yet the new data source does not appear in the list. At the bottom left of IGB it shows the data source attempting to load but making no progress.

      To reproduce:
      1. Reset preferences by going to File > Preferences > Other Options > Reset Preferences to Defaults
      2. Open IGB
      3. Select, File > Preferences
      4. In the Preferences window: Select the Data Sources tab.
      5. In the Data Sources tab: Click Add...
      6. Set Name: unicorn, Type: Quickload,
      7. Select 'Choose local folder'
      8. Select the unicorn folder on the desktop and click Open.
      9. Click Submit.
      10. See that unicorn does not appear as a data source.
      11. The bottom left of IGB shows "Adding unicorn" but with no progress made.

      Release testing protocol found at Quickload Saver: https://wiki.bioviz.org/confluence/display/ITD/Quickload+Saver

      Log output in comments.

        Attachments

          Issue Links

            Activity

            Hide
            rweidenh Logan Weidenhammer (Inactive) added a comment -

            Log after attempting to add unicorn local quickload created with Quickload Saver:

            11:07:29.173 ERROR c.a.genometry.thread.CThreadWorker - sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
            java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
            at com.affymetrix.igb.prefs.AddDataProvider.checkValidAndSetUrl(AddDataProvider.java:371) ~[na:na]
            at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:323) ~[na:na]
            at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:283) ~[na:na]
            at com.affymetrix.genometry.thread.CThreadWorker.doInBackground(CThreadWorker.java:73) ~[na:na]
            at javax.swing.SwingWorker$1.call(SwingWorker.java:295) [na:1.8.0_332]
            at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_332]
            at javax.swing.SwingWorker.run(SwingWorker.java:334) [na:1.8.0_332]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_332]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_332]
            at java.lang.Thread.run(Thread.java:750) [na:1.8.0_332]

            11:07:29.231 ERROR c.a.igb.prefs.AddDataProvider - java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
            java.util.concurrent.ExecutionException: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
            at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_332]
            at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[na:1.8.0_332]
            at javax.swing.SwingWorker.get(SwingWorker.java:602) ~[na:1.8.0_332]
            at com.affymetrix.igb.prefs.AddDataProvider$5.finished(AddDataProvider.java:344) ~[na:na]
            at com.affymetrix.genometry.thread.CThreadWorker.done(CThreadWorker.java:51) [genometry-9.1.10.jar:na]
            at javax.swing.SwingWorker$5.run(SwingWorker.java:737) [na:1.8.0_332]
            at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) [na:1.8.0_332]
            at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) [na:1.8.0_332]
            at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) [na:1.8.0_332]
            at javax.swing.Timer.fireActionPerformed(Timer.java:313) [na:1.8.0_332]
            at javax.swing.Timer$DoPostEvent.run(Timer.java:245) [na:1.8.0_332]
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) [na:1.8.0_332]
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) [na:1.8.0_332]
            at java.awt.EventQueue.access$500(EventQueue.java:97) [na:1.8.0_332]
            at java.awt.EventQueue$3.run(EventQueue.java:709) [na:1.8.0_332]
            at java.awt.EventQueue$3.run(EventQueue.java:703) [na:1.8.0_332]
            at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_332]
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) [na:1.8.0_332]
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [na:1.8.0_332]
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) [na:1.8.0_332]
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_332]
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_332]
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_332]
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_332]
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_332]

            Caused by: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
            at com.affymetrix.igb.prefs.AddDataProvider.checkValidAndSetUrl(AddDataProvider.java:371) ~[na:na]
            at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:323) ~[na:na]
            at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:283) ~[na:na]
            at com.affymetrix.genometry.thread.CThreadWorker.doInBackground(CThreadWorker.java:73) [genometry-9.1.10.jar:na]
            at javax.swing.SwingWorker$1.call(SwingWorker.java:295) ~[na:1.8.0_332]
            at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_332]
            at javax.swing.SwingWorker.run(SwingWorker.java:334) ~[na:1.8.0_332]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_332]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_332]
            at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_332]

            Show
            rweidenh Logan Weidenhammer (Inactive) added a comment - Log after attempting to add unicorn local quickload created with Quickload Saver: 11:07:29.173 ERROR c.a.genometry.thread.CThreadWorker - sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection at com.affymetrix.igb.prefs.AddDataProvider.checkValidAndSetUrl(AddDataProvider.java:371) ~ [na:na] at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:323) ~ [na:na] at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:283) ~ [na:na] at com.affymetrix.genometry.thread.CThreadWorker.doInBackground(CThreadWorker.java:73) ~ [na:na] at javax.swing.SwingWorker$1.call(SwingWorker.java:295) [na:1.8.0_332] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_332] at javax.swing.SwingWorker.run(SwingWorker.java:334) [na:1.8.0_332] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_332] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_332] at java.lang.Thread.run(Thread.java:750) [na:1.8.0_332] 11:07:29.231 ERROR c.a.igb.prefs.AddDataProvider - java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection java.util.concurrent.ExecutionException: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~ [na:1.8.0_332] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~ [na:1.8.0_332] at javax.swing.SwingWorker.get(SwingWorker.java:602) ~ [na:1.8.0_332] at com.affymetrix.igb.prefs.AddDataProvider$5.finished(AddDataProvider.java:344) ~ [na:na] at com.affymetrix.genometry.thread.CThreadWorker.done(CThreadWorker.java:51) [genometry-9.1.10.jar:na] at javax.swing.SwingWorker$5.run(SwingWorker.java:737) [na:1.8.0_332] at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) [na:1.8.0_332] at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) [na:1.8.0_332] at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) [na:1.8.0_332] at javax.swing.Timer.fireActionPerformed(Timer.java:313) [na:1.8.0_332] at javax.swing.Timer$DoPostEvent.run(Timer.java:245) [na:1.8.0_332] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) [na:1.8.0_332] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) [na:1.8.0_332] at java.awt.EventQueue.access$500(EventQueue.java:97) [na:1.8.0_332] at java.awt.EventQueue$3.run(EventQueue.java:709) [na:1.8.0_332] at java.awt.EventQueue$3.run(EventQueue.java:703) [na:1.8.0_332] at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_332] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) [na:1.8.0_332] at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [na:1.8.0_332] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) [na:1.8.0_332] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_332] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_332] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_332] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_332] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_332] Caused by: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection at com.affymetrix.igb.prefs.AddDataProvider.checkValidAndSetUrl(AddDataProvider.java:371) ~ [na:na] at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:323) ~ [na:na] at com.affymetrix.igb.prefs.AddDataProvider$5.runInBackground(AddDataProvider.java:283) ~ [na:na] at com.affymetrix.genometry.thread.CThreadWorker.doInBackground(CThreadWorker.java:73) [genometry-9.1.10.jar:na] at javax.swing.SwingWorker$1.call(SwingWorker.java:295) ~ [na:1.8.0_332] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~ [na:1.8.0_332] at javax.swing.SwingWorker.run(SwingWorker.java:334) ~ [na:1.8.0_332] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~ [na:1.8.0_332] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~ [na:1.8.0_332] at java.lang.Thread.run(Thread.java:750) ~ [na:1.8.0_332]
            Hide
            nfreese Nowlan Freese added a comment - - edited

            This was a good catch by Logan Weidenhammer

            In IGBF-3103 we added logic to AddDataProvider.java so that IGB could follow URL redirects from http to https for Quickloads. This involved creating a HttpURLConnection. However, we did not consider the flow for this logic if the uri provided is for a local quickload, nor did we test local quickloads (though I did notice that something was amiss in IGBF-3170 I thought it was an issue with the Quickload Saver app). The above error is caused because we are trying to create a HttpURLConnection to a fileURL.

            The easiest fix that appears to work is to check if the uriString starts with http (this also catches https) and if it does not, then assume it is a local file. We use similar logic in QuickloadUtils.java getUri. Note that ftp quickload urls follow the same flow as local quickloads and should work correctly, though I do not have a quickload on an ftp server to test. Also added a toLowerCase as capital letters in the HTTP were causing the logic to break.

            See commit: https://bitbucket.org/nfreese/nowlanfork-igb/commits/1698542e9b10c29e36a7b7add9062fb6a5162e91

            Show
            nfreese Nowlan Freese added a comment - - edited This was a good catch by Logan Weidenhammer In IGBF-3103 we added logic to AddDataProvider.java so that IGB could follow URL redirects from http to https for Quickloads. This involved creating a HttpURLConnection. However, we did not consider the flow for this logic if the uri provided is for a local quickload, nor did we test local quickloads (though I did notice that something was amiss in IGBF-3170 I thought it was an issue with the Quickload Saver app). The above error is caused because we are trying to create a HttpURLConnection to a fileURL. The easiest fix that appears to work is to check if the uriString starts with http (this also catches https) and if it does not, then assume it is a local file. We use similar logic in QuickloadUtils.java getUri. Note that ftp quickload urls follow the same flow as local quickloads and should work correctly, though I do not have a quickload on an ftp server to test. Also added a toLowerCase as capital letters in the HTTP were causing the logic to break. See commit: https://bitbucket.org/nfreese/nowlanfork-igb/commits/1698542e9b10c29e36a7b7add9062fb6a5162e91
            Hide
            nfreese Nowlan Freese added a comment -

            To test:

            1. Follow the steps for testing in IGBF-3103 to make sure that online quickloads are loading correctly.
            2. Follow the reproduce steps above using the attached quickload (need to unzip quickload.zip) to add the local quickload.
            Show
            nfreese Nowlan Freese added a comment - To test: Follow the steps for testing in IGBF-3103 to make sure that online quickloads are loading correctly. Follow the reproduce steps above using the attached quickload (need to unzip quickload.zip) to add the local quickload.
            Hide
            rweidenh Logan Weidenhammer (Inactive) added a comment -

            All testing appears to work as intended. Code has been reviewed. Ready for pull request.

            Show
            rweidenh Logan Weidenhammer (Inactive) added a comment - All testing appears to work as intended. Code has been reviewed. Ready for pull request.
            Show
            nfreese Nowlan Freese added a comment - Pull request: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/914/igbf-3199-fix-local-quickload-not-being
            Hide
            ann.loraine Ann Loraine added a comment -

            Merged. Preparing new installers.

            Show
            ann.loraine Ann Loraine added a comment - Merged. Preparing new installers.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            New installers are created and available in the Downloads section of the team IGB repository here: https://bitbucket.org/lorainelab/integrated-genome-browser/downloads/ and as a new "early release" IGB available on bioviz.org.

            Show
            ann.loraine Ann Loraine added a comment - - edited New installers are created and available in the Downloads section of the team IGB repository here: https://bitbucket.org/lorainelab/integrated-genome-browser/downloads/ and as a new "early release" IGB available on bioviz.org.
            Hide
            rweidenh Logan Weidenhammer (Inactive) added a comment -

            Tested online and local quickloads per instructions. Everything is working normally.
            Pre-release testing will continue on Windows, Linux, and possibly again on Intel chip mac.
            Closing issue.

            Show
            rweidenh Logan Weidenhammer (Inactive) added a comment - Tested online and local quickloads per instructions. Everything is working normally. Pre-release testing will continue on Windows, Linux, and possibly again on Intel chip mac. Closing issue.
            Hide
            nfreese Nowlan Freese added a comment -

            Note that these changes are reverted, but the ticket is closed as any potential fixes for IGBF-3103 may not require the fix presented in this ticket.

            Show
            nfreese Nowlan Freese added a comment - Note that these changes are reverted, but the ticket is closed as any potential fixes for IGBF-3103 may not require the fix presented in this ticket.

              People

              • Assignee:
                nfreese Nowlan Freese
                Reporter:
                rweidenh Logan Weidenhammer (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: