Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-dev] [protege-discussion] Problem with events and database backing

Timothy Redmond tredmond at stanford.edu
Mon Feb 17 11:08:56 PST 2014


So the thread that is causing the deadlock is the main thread.  I have 
included the entire thread dump below.  You can see that the first lock 
that it takes is the knowledge base lock:

             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.DefaultCls.createDirectInstance(DefaultCls.java:49)
             at org.soacommunity.platform.a2x.ontology.A2XOntologyFactory.createEntity(A2XOntologyFactory.java:445)


The problem is that the knowledge base lock is taken before the UI lock 
which is the wrong order.

Taking and holding the swing ui lock anywhere before that point will fix 
the problem.  So I am not sure what code you have control over, but if 
invoke the swing utilities right before you call the soacommunity code, 
e.g., somewhere below this point:

             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.DefaultCls.createDirectInstance(DefaultCls.java:49)
             at org.soacommunity.platform.a2x.ontology.A2XOntologyFactory.createEntity(A2XOntologyFactory.java:445)


then the problem will go away.  If you can't modify this stack trace 
then your only option is to turn off the generation or dispatching of 
events.  I think that there is a way to turn off the dispatching of 
events and then have all the events that were generated get dispatched 
later, so this may be a possibility also.


-Timothy

     "main":
             at java.awt.Component.setFont(Component.java:1798)
             - waiting to lock <0x27f7d4d0> (a java.awt.Component$AWTTreeLock)
             at java.awt.Container.setFont(Container.java:1554)
             at javax.swing.JComponent.setFont(JComponent.java:2723)
             at edu.stanford.smi.protege.util.DefaultRenderer.setup(DefaultRenderer.java:451)
             at edu.stanford.smi.protege.util.DefaultRenderer.getTreeCellRendererComponent(DefaultRenderer.java:230)
             at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2712)
             at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
             at javax.swing.tree.FixedHeightLayoutCache.getBounds(FixedHeightLayoutCache.java:535)
             at javax.swing.tree.FixedHeightLayoutCache.getBounds(FixedHeightLayoutCache.java:181)
             at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:510)
             at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:503)
             at javax.swing.JTree.getPathBounds(JTree.java:2063)
             at javax.swing.JTree.getRowBounds(JTree.java:2076)
             at edu.stanford.smi.protege.util.DefaultRenderer.getPreferredSize(DefaultRenderer.java:138)
             at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2721)
             at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
             at javax.swing.tree.FixedHeightLayoutCache.getBounds(FixedHeightLayoutCache.java:535)
             at javax.swing.tree.FixedHeightLayoutCache.getBounds(FixedHeightLayoutCache.java:181)
             at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:510)
             at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:503)
             at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesChanged(BasicTreeUI.java:3765)
             at javax.swing.tree.DefaultTreeModel.fireTreeNodesChanged(DefaultTreeModel.java:468)
             at javax.swing.tree.DefaultTreeModel.nodesChanged(DefaultTreeModel.java:330)
             at javax.swing.tree.DefaultTreeModel.nodeChanged(DefaultTreeModel.java:261)
             at edu.stanford.smi.protege.util.LazyTreeRoot.notifyNodeChanged(LazyTreeRoot.java:84)
             at edu.stanford.smi.protege.util.LazyTreeNode.notifyNodeChanged(LazyTreeNode.java:368)
             at edu.stanford.smi.protege.util.LazyTreeNode.notifyNodeChanged(LazyTreeNode.java:368)
             at edu.stanford.smi.protege.util.LazyTreeNode.notifyNodeChanged(LazyTreeNode.java:368)
             at edu.stanford.smi.protege.ui.ParentChildNode.notifyNodeChanged(ParentChildNode.java:130)
             at edu.stanford.smi.protege.ui.ParentChildNode$1.directInstanceAdded(ParentChildNode.java:42)
             at edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.dispatchClsEvent(EventDispatchFrameStore.java:425)
             at edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.dispatchEvent(EventDispatchFrameStore.java:296)
             at edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.dispatchEvents(EventDispatchFrameStore.java:269)
             at edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.dispatchEvents(EventDispatchFrameStore.java:241)
             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.dispatchEvents(EventDispatchFrameStore.java:232)
             at edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.createSimpleInstance(EventDispatchFrameStore.java:814)
             at edu.stanford.smi.protege.model.framestore.undo.CreateSimpleInstanceCommand.doIt(CreateSimpleInstanceCommand.java:22)
             at edu.stanford.smi.protege.model.framestore.undo.UndoFrameStore.simpleCommandExecute(UndoFrameStore.java:90)
             at edu.stanford.smi.protege.model.framestore.undo.UndoFrameStore.execute(UndoFrameStore.java:84)
             at edu.stanford.smi.protege.model.framestore.undo.UndoFrameStore.createSimpleInstance(UndoFrameStore.java:171)
             at edu.stanford.smi.protege.model.framestore.ArgumentCheckingFrameStore.createSimpleInstance(ArgumentCheckingFrameStore.java:137)
             at edu.stanford.smi.protege.model.framestore.ChangeMonitorFrameStore.createSimpleInstance(ChangeMonitorFrameStore.java:46)
             at edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.createSimpleInstance(FrameStoreAdapter.java:306)
             at edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.createSimpleInstance(FrameStoreAdapter.java:306)
             at edu.stanford.smi.protege.model.framestore.ImmutableNamesFrameStore.createSimpleInstance(ImmutableNamesFrameStore.java:89)
             at edu.stanford.smi.protege.model.DefaultKnowledgeBase.createSimpleInstance(DefaultKnowledgeBase.java:230)
             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.DefaultKnowledgeBase.createInstance(DefaultKnowledgeBase.java:430)
             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.DefaultKnowledgeBase.createInstance(DefaultKnowledgeBase.java:412)
             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.DefaultKnowledgeBase.createInstance(DefaultKnowledgeBase.java:407)
             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.DefaultKnowledgeBase.createInstance(DefaultKnowledgeBase.java:399)
             - locked <0x286513c8> (a edu.stanford.smi.protege.model.DefaultKnowledgeBase)
             at edu.stanford.smi.protege.model.DefaultCls.createDirectInstance(DefaultCls.java:49)
             at org.soacommunity.platform.a2x.ontology.A2XOntologyFactory.createEntity(A2XOntologyFactory.java:445)
             at TestConcurrentBundles.testBundleEvents(TestConcurrentBundles.java:90)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
             at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
             at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
             at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
             at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
             at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
             at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
             at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
             at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
             at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
             at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
             at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
             at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
             at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
             at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



More information about the protege-dev mailing list