Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-10196

Alfresco JS debugger "breaks" when tracing onUpdateProperties policy

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Unprioritized
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.4 Enterprise
    • Fix Version/s: 4.0 Enterprise
    • Component/s: ZZ_Archive
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      Windows XP, Tomcat, MySQL
    • Resolution Time Custom Field:
      1 hour, 21 minutes, 1 second

      Description

      Today I was working on a JS implementation of the onUpdateProperties policy (behavior) and ran into some problems. After stepping through the code, the debugger would no longer let me evaluate variables. Stepping still worked but there was no variable introspection. I noticed a stack trace in my Alfresco repo tomcat:

      Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.alfresco.service.namespace.QName cannot be cast to java.lang.String
      at org.mozilla.javascript.tools.debugger.VariableModel$1.compare(SwingGui.java:2626)
      at java.util.Arrays.mergeSort(Arrays.java:1270)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.sort(Arrays.java:1210)
      at org.mozilla.javascript.tools.debugger.VariableModel.children(SwingGui.java:2619)
      at org.mozilla.javascript.tools.debugger.VariableModel.isLeaf(SwingGui.java:2506)
      at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2717)
      at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
      at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
      at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1478)
      at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1270)
      at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:725)
      at javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:91)
      at javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:398)
      at javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3330)
      at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
      at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
      at java.awt.Component.firePropertyChange(Component.java:8083)
      at javax.swing.JTree.setModel(JTree.java:863)
      at javax.swing.JTree.<init>(JTree.java:650)
      at org.mozilla.javascript.tools.debugger.downloaded.JTreeTable$TreeTableCellRenderer.<init>(JTreeTable.java:132)
      at org.mozilla.javascript.tools.debugger.MyTreeTable.resetTree(SwingGui.java:2717)
      at org.mozilla.javascript.tools.debugger.ContextWindow.actionPerformed(SwingGui.java:3147)
      at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
      at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)
      at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
      at org.mozilla.javascript.tools.debugger.SwingGui.enterInterruptImpl(SwingGui.java:619)
      at org.mozilla.javascript.tools.debugger.RunProxy.run(SwingGui.java:3539)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      I have not had a chance to narrow down the problem further.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                mmccarthy Michael McCarthy
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Structure Helper Panel