Uploaded image for project: 'Apache Taverna'
  1. Apache Taverna
  2. TAVERNA-81

Invalid Xpath expression breaks XPath Service GUI

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: To Do
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      If I configure the XPath service and type manually an invalid Xpath, for instance:

      /a/**/x

      (See attached workflow)

      then the GUI will let me Apply this configuration, let me save the workflow, but I can now not go back and change the configuration. Right clicking on XPath_Service -> Configure XPath (or Details -> Configure) does no longer open the XPath configuration dialogue, instead I get a (silent) stack trace:

      ERROR 2012-05-08 13:57:24,675 (net.sf.taverna.t2.workbench.ui.impl.Workbench:115) - Uncaught exception in Thread[AWT-EventQueue-0,6,main]
      java.lang.ClassCastException: java.lang.Double cannot be cast to org.dom4j.Node
      	at net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanel.runXPath(XPathActivityConfigurationPanel.java:1124)
      	at net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanelProvider.refreshConfiguration(XPathActivityConfigurationPanelProvider.java:163)
      	at net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanelProvider.initGui(XPathActivityConfigurationPanelProvider.java:63)
      	at net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigurationPanelProvider.<init>(XPathActivityConfigurationPanelProvider.java:30)
      	at net.sf.taverna.t2.activities.xpath.ui.config.XPathActivityConfigureAction.actionPerformed(XPathActivityConfigureAction.java:34)
      	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      	at javax.swing.AbstractButton.doClick(Unknown Source)
      	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
      	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
      	at java.awt.Component.processMouseEvent(Unknown Source)
      	at javax.swing.JComponent.processMouseEvent(Unknown Source)
      	at java.awt.Component.processEvent(Unknown Source)
      	at java.awt.Container.processEvent(Unknown Source)
      	at java.awt.Component.dispatchEventImpl(Unknown Source)
      	at java.awt.Container.dispatchEventImpl(Unknown Source)
      	at java.awt.Component.dispatchEvent(Unknown Source)
      	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      	at java.awt.Container.dispatchEventImpl(Unknown Source)
      	at java.awt.Window.dispatchEventImpl(Unknown Source)
      	at java.awt.Component.dispatchEvent(Unknown Source)
      	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      	at java.awt.EventQueue.access$000(Unknown Source)
      	at java.awt.EventQueue$3.run(Unknown Source)
      	at java.awt.EventQueue$3.run(Unknown Source)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      	at java.awt.EventQueue$4.run(Unknown Source)
      	at java.awt.EventQueue$4.run(Unknown Source)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
      	at java.awt.EventQueue.dispatchEvent(Unknown Source)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      	at java.awt.EventDispatchThread.run(Unknown Source)
      

      Solution:

      The Dialogue should still open with an invalid xpath, so that it can be corrected.

      The dialogue should not allow Apply/OK (only Cancel) if the XPath is not valid.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              stain Stian Soiland-Reyes

              Dates

              • Created:
                Updated:

                Issue deployment