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

Fix the org.xml.sax.SAXParseException occurrence in IGB

    Details

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

      Description

      When we run the IGB following exception is getting thrown: (the exception is occurring in the survey plugin of IGB)

      [Fatal Error] :1:50: White spaces are required between publicId and systemId.
      com.affymetrix.igb.survey.Activator - Exception in Activator.registerService() -> White spaces are required between publicId and systemId.
      org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 50; White spaces are required between publicId and systemId.
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
      at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
      at com.affymetrix.igb.survey.SurveyParser.parse(SurveyParser.java:40)
      at com.affymetrix.igb.survey.Activator.getServices(Activator.java:59)
      at com.affymetrix.igb.survey.Activator.getServices(Activator.java:40)
      at org.lorainelab.igb.services.XServiceRegistrar.getServices(XServiceRegistrar.java:26)
      at org.lorainelab.igb.services.SimpleServiceRegistrar.registerService(SimpleServiceRegistrar.java:19)
      at org.lorainelab.igb.services.XServiceRegistrar.access$001(XServiceRegistrar.java:13)
      at org.lorainelab.igb.services.XServiceRegistrar$1.addingService(XServiceRegistrar.java:47)
      at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
      at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
      at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4560)
      at org.apache.felix.framework.Felix.registerService(Felix.java:3542)
      at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
      at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:355)
      at com.affymetrix.igb.Activator$1.initializeWindowService(Activator.java:143)
      at com.affymetrix.igb.Activator$1.addingService(Activator.java:134)
      at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
      at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
      at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4560)
      at org.apache.felix.framework.Felix.registerService(Felix.java:3542)
      at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:1003)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:992)
      at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:134)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:1044)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:841)
      at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:931)
      at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:895)
      at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1480)
      at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1401)
      at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1210)
      at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1148)
      at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1432)
      at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:987)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
      at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
      at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4560)
      at org.apache.felix.framework.Felix.registerService(Felix.java:3542)
      at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:1003)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:992)
      at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:134)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:1044)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:841)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:419)
      at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:376)
      at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:172)
      at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:120)
      at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:258)
      at org.apache.felix.scr.impl.Activator.access$000(Activator.java:45)
      at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:185)
      at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
      at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:479)
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:414)
      at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
      at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
      at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:913)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
      at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:516)
      at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4544)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:2166)
      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
      at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)
      at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)
      at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)
      at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)
      at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)

        Attachments

          Activity

          prutha Prutha Kulkarni (Inactive) created issue -
          prutha Prutha Kulkarni (Inactive) made changes -
          Field Original Value New Value
          Epic Link IGBF-1765 [ 17855 ]
          prutha Prutha Kulkarni (Inactive) made changes -
          Rank Ranked higher
          pbadzuh Philip Badzuh (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          pbadzuh Philip Badzuh (Inactive) made changes -
          Assignee Philip Badzuh [ pbadzuh ]
          pbadzuh Philip Badzuh (Inactive) made changes -
          Story Points 1 2
          Hide
          pbadzuh Philip Badzuh (Inactive) added a comment -

          Some notes on my deep dive into this issue:

          • The fatal error is being thrown in line 1071 of com.sun.org.apache.xerces.internal.impl.XMLScanner:
            XMLScanner.java
            if (!fEntityScanner.skipSpaces() && !optionalSystemId) {
                reportFatalError("SpaceRequiredBetweenPublicAndSystem", null);
            }
            
          • I think the error has to do with the parser failing to validate the nonexistent doctype declaration.
          • I tried to configure the DTD in surveys.xml, as shown below, but the error persisted:
            surveys.xml
            <!DOCTYPE surveys [
                <!ELEMENT surveys (survey)>
                <!ELEMENT survey (name,description,link,startdate,enddate)>
                <!ELEMENT name (#PCDATA)>
                <!ELEMENT description (#PCDATA)>
                <!ELEMENT link (#PCDATA)>
                <!ELEMENT startdate (#PCDATA)>
                <!ELEMENT enddate (#PCDATA)>
            ]>
            
          • In trying to configure the DocumentBuilderFactory in SurveyParser to be less stringent with regards to xml formatting validation at [~aloraine]'s suggestion, I tried several options from the list here, in addition to those used in AnnotsParser, but I couldn't get any configuration to work.
          • I tried to make the implementation of SurveyParser mimic that of UpdateParser, however, the issue still persisted.

          This isn't exactly a solution, but I'm not entirely sure what the exact problem is and have a feeling that the fatal error message may be misleading. From my further research online, it appears to be a generic error. Please let me know what you think.

          Show
          pbadzuh Philip Badzuh (Inactive) added a comment - Some notes on my deep dive into this issue: The fatal error is being thrown in line 1071 of com.sun.org.apache.xerces.internal.impl.XMLScanner: XMLScanner.java if (!fEntityScanner.skipSpaces() && !optionalSystemId) { reportFatalError( "SpaceRequiredBetweenPublicAndSystem" , null ); } I think the error has to do with the parser failing to validate the nonexistent doctype declaration. I tried to configure the DTD in surveys.xml, as shown below, but the error persisted: surveys.xml <!DOCTYPE surveys [ <!ELEMENT surveys (survey)> <!ELEMENT survey (name,description,link,startdate,enddate)> <!ELEMENT name (#PCDATA)> <!ELEMENT description (#PCDATA)> <!ELEMENT link (#PCDATA)> <!ELEMENT startdate (#PCDATA)> <!ELEMENT enddate (#PCDATA)> ]> In trying to configure the DocumentBuilderFactory in SurveyParser to be less stringent with regards to xml formatting validation at [~aloraine] 's suggestion, I tried several options from the list here , in addition to those used in AnnotsParser, but I couldn't get any configuration to work. I tried to make the implementation of SurveyParser mimic that of UpdateParser, however, the issue still persisted. I have reverted to what seems to be the previously used deserialization method, which was commented out above the one that is currently causing this error. Although the Fatal Error is still printed, now no exception is thrown. https://bitbucket.org/pbadzuh/igb_pbdev/branch/IGBF-2475#diff This isn't exactly a solution, but I'm not entirely sure what the exact problem is and have a feeling that the fatal error message may be misleading. From my further research online, it appears to be a generic error. Please let me know what you think.
          pbadzuh Philip Badzuh (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          pbadzuh Philip Badzuh (Inactive) made changes -
          Assignee Philip Badzuh [ pbadzuh ]
          ann.loraine Ann Loraine made changes -
          Comment [ Maybe also look at this file? (It creates a "non-validating" parser.)

          * core/quickload/src/main/java/org/lorainelab/igb/quickload/util/AnnotsParser.java ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Note: I deleted my previous comment as I had not thoroughly read the previous comments before writing it.

          Show
          ann.loraine Ann Loraine added a comment - Note: I deleted my previous comment as I had not thoroughly read the previous comments before writing it.
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Let's get another developer to also take a look, building on what Philip Badzuh has learned and reported above. They might notice something that cracks the case.

          Show
          ann.loraine Ann Loraine added a comment - Let's get another developer to also take a look, building on what Philip Badzuh has learned and reported above. They might notice something that cracks the case.
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] To-Do [ 10305 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ]
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Rank Ranked lower
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          prutha Prutha Kulkarni (Inactive) made changes -
          Assignee Prutha Kulkarni [ prutha ]
          prutha Prutha Kulkarni (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          Hide
          prutha Prutha Kulkarni (Inactive) added a comment - - edited

          Findings:

          • There was a problem with survey.xml url using which we were trying to get the response xml.
          • The url was "http://bioviz.org/igb/releases/surveys.xml". Since we have shifted the bioviz website to https because of the rewrite rule when I was trying to access the url, it was getting redirected to https url automatically in the browser.
          • Whereas when we were trying get the response from "http" link which was present in the "survey.properties" file, the response inside the "inputstream" variable was:
          Response which was getting parsed instead of the actual survey file
          <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
          <html><head>
          <title>302 Found</title>
          </head><body>
          <h1>Found</h1>
          <p>The document has moved <a href="https://www.bioviz.org/igb/releases/surveys.xml">here</a>.</p>
          </body></html>
          
          • After checking the code, I thought let's just check what part of the response xml is causing the exception. To do so, I converted the "inputstream" variable (which is getting parsed) content to string format and I found out that we are getting a response which is stated above.
          • Since the response is not a well formed xml and the response actually says that the resource document has been moved to "https://www.bioviz.org/igb/releases/surveys.xml", the exception was getting thrown.
          • After changing the "survey.properties" file url to https, the exception disappeared.
            I confirmed this on Chirag Chandrahas Shetty's system as well.

          [~aloraine], shall I go ahead and submit it for review with the fix or we should create a new ticket for fixing the issue?
          Please let me know.

          Show
          prutha Prutha Kulkarni (Inactive) added a comment - - edited Findings: There was a problem with survey.xml url using which we were trying to get the response xml. The url was "http://bioviz.org/igb/releases/surveys.xml". Since we have shifted the bioviz website to https because of the rewrite rule when I was trying to access the url, it was getting redirected to https url automatically in the browser. Whereas when we were trying get the response from "http" link which was present in the "survey.properties" file, the response inside the "inputstream" variable was: Response which was getting parsed instead of the actual survey file <!DOCTYPE HTML PUBLIC "- //IETF//DTD HTML 2.0//EN" > <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href= "https: //www.bioviz.org/igb/releases/surveys.xml" >here</a>.</p> </body></html> After checking the code, I thought let's just check what part of the response xml is causing the exception. To do so, I converted the "inputstream" variable (which is getting parsed) content to string format and I found out that we are getting a response which is stated above. Since the response is not a well formed xml and the response actually says that the resource document has been moved to "https://www.bioviz.org/igb/releases/surveys.xml", the exception was getting thrown. After changing the "survey.properties" file url to https, the exception disappeared. I confirmed this on Chirag Chandrahas Shetty 's system as well. [~aloraine] , shall I go ahead and submit it for review with the fix or we should create a new ticket for fixing the issue? Please let me know.
          prutha Prutha Kulkarni (Inactive) made changes -
          Story Points 2 3.5
          prutha Prutha Kulkarni (Inactive) made changes -
          Summary Investigate on the org.xml.sax.SAXParseException occurrence on running IGB Fix the org.xml.sax.SAXParseException occurrence in IGB
          Hide
          prutha Prutha Kulkarni (Inactive) added a comment -

          changes are present at:
          https://bitbucket.org/pkulka10/igb_prutha/commits/b66eb9f8da6ed499a483ad34662487df7c2a688d

          For testing:
          1) Go to the "Downloads" section of my IGB fork.
          2) Download IGBF-2475 branch installer from there.
          3) Install it on the system and run IGB.
          4) Check the console for the Exception.

          Show
          prutha Prutha Kulkarni (Inactive) added a comment - changes are present at: https://bitbucket.org/pkulka10/igb_prutha/commits/b66eb9f8da6ed499a483ad34662487df7c2a688d For testing: 1) Go to the "Downloads" section of my IGB fork. 2) Download IGBF-2475 branch installer from there. 3) Install it on the system and run IGB. 4) Check the console for the Exception.
          prutha Prutha Kulkarni (Inactive) made changes -
          Assignee Prutha Kulkarni [ prutha ]
          prutha Prutha Kulkarni (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          ann.loraine Ann Loraine made changes -
          Sprint Summer 4: 14 Jul - 28 Jul [ 99 ] Summer 4: 14 Jul - 28 Jul, Summer 5: 29 Jul - 12 Aug [ 99, 100 ]
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] Needs 1st Level Review [ 10005 ]
          rweidenh Logan Weidenhammer (Inactive) made changes -
          Assignee Rachel Weidenhammer [ rweidenh ]
          rweidenh Logan Weidenhammer (Inactive) made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          Hide
          rweidenh Logan Weidenhammer (Inactive) added a comment -

          Tested as instructed.
          To run IGB through the console I used Git Bash and ran "$ java -Xmx1g -jar igb_exe.jar" at the location IGB was installed on my machine.

          The output did contain the fatal error:
          [ Fatal Error ] :1:50: White spaces are required between publicId and systemId.

          And it did not contain the exception
          org.xml.sax.SAXParseException

          Prutha Kulkarni, is this a satisfactory result as far as the functional review goes?

          Show
          rweidenh Logan Weidenhammer (Inactive) added a comment - Tested as instructed. To run IGB through the console I used Git Bash and ran "$ java -Xmx1g -jar igb_exe.jar" at the location IGB was installed on my machine. The output did contain the fatal error: [ Fatal Error ] :1:50: White spaces are required between publicId and systemId. And it did not contain the exception org.xml.sax.SAXParseException Prutha Kulkarni , is this a satisfactory result as far as the functional review goes?
          Hide
          prutha Prutha Kulkarni (Inactive) added a comment -

          Logan Weidenhammer, the fatal error is because of other module i.e. "update" module to be specific. The SAXParseException for survey module has been resolved and you are seeing the fatal error because it isn't fixed for update module. A different ticket has been raised for that as well.
          The fix has been provided so you can go ahead and move the ticket forward to "submit a PR".

          Show
          prutha Prutha Kulkarni (Inactive) added a comment - Logan Weidenhammer , the fatal error is because of other module i.e. "update" module to be specific. The SAXParseException for survey module has been resolved and you are seeing the fatal error because it isn't fixed for update module. A different ticket has been raised for that as well. The fix has been provided so you can go ahead and move the ticket forward to "submit a PR".
          rweidenh Logan Weidenhammer (Inactive) made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          rweidenh Logan Weidenhammer (Inactive) made changes -
          Assignee Rachel Weidenhammer [ rweidenh ] Prutha Kulkarni [ prutha ]
          Show
          prutha Prutha Kulkarni (Inactive) added a comment - PR has been submitted: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/817/igbf-2475-fix-saxparserexception-in-igb/diff cc: [~aloraine]
          prutha Prutha Kulkarni (Inactive) made changes -
          Assignee Prutha Kulkarni [ prutha ]
          prutha Prutha Kulkarni (Inactive) made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Merged and master branch installers are built. Moving to ready for testing.

          Show
          ann.loraine Ann Loraine added a comment - Merged and master branch installers are built. Moving to ready for testing.
          ann.loraine Ann Loraine made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          ann.loraine Ann Loraine made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          Hide
          shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

          Tested this ticket. The SAXParseException did not occur after running IGB. Moving to closed.

          Show
          shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Tested this ticket. The SAXParseException did not occur after running IGB. Moving to closed.
          shamika Shamika Gajanan Kulkarni (Inactive) made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          shamika Shamika Gajanan Kulkarni (Inactive) made changes -
          Assignee Shamika Gajanan Kulkarni [ shamika ]
          shamika Shamika Gajanan Kulkarni (Inactive) made changes -
          Resolution Done [ 10000 ]
          Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
          shamika Shamika Gajanan Kulkarni (Inactive) made changes -
          Assignee Shamika Gajanan Kulkarni [ shamika ] Prutha Kulkarni [ prutha ]

            People

            • Assignee:
              prutha Prutha Kulkarni (Inactive)
              Reporter:
              prutha Prutha Kulkarni (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: