rawSQL Plugin issue.

Hi All,

I am using rawSQL plugin in my application. When i am executing a query from the rawSQL plugin and after that flushing client cache. It is flushing the cache in developer but not flushing cache into Client.

Servoy 4.0.1
Backend - MySQL
Java version - “1.6.0_10”
Windows XP

Thanks

what do you mean with developer and client?

do you call the flushAllClientsCache(String serverName, String tableName) of the rawSQL plugin?

Hi Johan,

jcompagner:
do you call the flushAllClientsCache(String serverName, String tableName) of the rawSQL plugin?

Yes, i am calling the same method for flushing clients caches. Previously i was not encounter with this in Servoy developer, here it is the same problem.

flushAllClientsCache method, sometimes working and sometime not. I don’t know it is dug or not. Can you please help me to make it work.

Thanks

But calling that flush in the developer client then there are no other clients (except maybe the webclient)

That flush shoudl work fine if this property: servoy.rawSQL.allowClientCacheFlushes is true in your settings

Else if you just close the solution in the developer client then it gets the right data just fine?

Hi Johan,

Sorry, for late reply i was testing the application.

jcompagner:
That flush shoudl work fine if this property: servoy.rawSQL.allowClientCacheFlushes is true in your settings

I made this setting true, After that effect is same. Some times it is working fine but some times not.

Let me explane my application senario.

I am Using DBTreeBean. Which is dynamicaly populating every time. Each time tree has minimum 50 nodes.Each time i am deleting all the records from the node table and recreating record in table. Previous i was using Servoy find search method and deleting the nodes. that method is taking long time to delete records from node. It is taking long time because whenever record is deleting from node table. DBTreeBean is calling callback method of node selection. Each time it is hitting that method so i was finding to optimize the wait time so i am testing the rawSQL plug-in to delete nodes from node table and flush the client cache. Now everthing is good after this plug-in, but problem is when ever i am constructing different tree at second time tree is showing pervious tree’s node or sometime after three or four times when tree has changed.

I thought this may be tree refeshment issue so I had putted one button on tree view form and attached refesh tree method. After executing that method on changes found in tree view.

I have also checked database value. Database has desired value.

may be i am more clear about my problem.

Thanks

Hi Johan,

I am getting error while Old tree data displaying with new Tree data.

Here is the error log

AWT-EventQueue-0 ERROR com.servoy.j2db.util.Debug Error quering for new pks in relatedfoundset
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesChanged(Unknown Source)
at javax.swing.tree.DefaultTreeModel.fireTreeNodesChanged(Unknown Source)
at javax.swing.tree.DefaultTreeModel.nodesChanged(Unknown Source)
at javax.swing.tree.DefaultTreeModel.nodeChanged(Unknown Source)
at com.servoy.extensions.beans.dbtreeview.SwingDBTreeView$UserNodeTreeCellRenderer.getTreeCellRendererComponent(SwingDBTreeView.java:749)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(Unknown Source)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(Unknown Source)
at javax.swing.JTree.fireTreeExpanded(Unknown Source)
at javax.swing.JTree.setExpandedState(Unknown Source)
at javax.swing.JTree.expandPath(Unknown Source)
at com.servoy.extensions.beans.dbtreeview.SwingDBTreeView.js_refresh(SwingDBTreeView.java:578)
at com.servoy.extensions.beans.dbtreeview.SwingDBTreeView.tableChanged(SwingDBTreeView.java:984)
at com.servoy.j2db.dataprocessing.w.fireTableModelEvent(Unknown Source)
at com.servoy.j2db.dataprocessing.w$2.run(Unknown Source)
at com.servoy.j2db.dataprocessing.w.a(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.do(Unknown Source)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.e(Unknown Source)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.getRecord(Unknown Source)
at com.servoy.extensions.beans.dbtreeview.FoundSetTreeModel$UserNode.getRecord(FoundSetTreeModel.java:447)
at com.servoy.extensions.beans.dbtreeview.BindingInfo.getText(BindingInfo.java:87)
at com.servoy.extensions.beans.dbtreeview.BindingInfo.getText(BindingInfo.java:75)
at com.servoy.extensions.beans.dbtreeview.FoundSetTreeModel$UserNode.toString(FoundSetTreeModel.java:562)
at javax.swing.JTree.convertValueToText(Unknown Source)
at javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent(Unknown Source)
at com.servoy.extensions.beans.dbtreeview.SwingDBTreeView$UserNodeTreeCellRenderer.getTreeCellRendererComponent(SwingDBTreeView.java:698)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(Unknown Source)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.updateNodeSizes(Unknown Source)
at javax.swing.tree.VariableHeightLayoutCache.getBounds(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesChanged(Unknown Source)
at javax.swing.tree.DefaultTreeModel.fireTreeNodesChanged(Unknown Source)
at javax.swing.tree.DefaultTreeModel.nodesChanged(Unknown Source)
at javax.swing.tree.DefaultTreeModel.nodeChanged(Unknown Source)
at com.servoy.extensions.beans.dbtreeview.SwingDBTreeView.tableChanged(SwingDBTreeView.java:997)
at com.servoy.j2db.dataprocessing.w.fireTableModelEvent(Unknown Source)
at com.servoy.j2db.dataprocessing.w$2.run(Unknown Source)
at com.servoy.j2db.dataprocessing.w.a(Unknown Source)
at com.servoy.j2db.dataprocessing.EditRecordList.fireEvents(Unknown Source)
at com.servoy.j2db.dataprocessing.EditRecordList.a(Unknown Source)
at com.servoy.j2db.dataprocessing.EditRecordList.stopEditing(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.a(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.a(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.newRecord(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.setFindMode(Unknown Source)
at com.servoy.j2db.FormController.setMode(Unknown Source)
at com.servoy.j2db.FormController.do(Unknown Source)
at com.servoy.j2db.FormController.do(Unknown Source)
at com.servoy.j2db.FormController$JSForm.js_find(Unknown Source)
at sun.reflect.GeneratedMethodAccessor860.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:341)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3122)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
at com.servoy.j2db.scripting.RemoteDebugScriptEngine.executeFunction(Unknown Source)
at com.servoy.j2db.FormController.a(Unknown Source)
at com.servoy.j2db.FormController.executeFunction(Unknown Source)
at com.servoy.j2db.FormController$a.executeFunction(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel.if(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel.a(Unknown Source)
at com.servoy.j2db.dataui.AbstractScriptLabel$5.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 com.servoy.j2db.util.editlist.c$a.do(Unknown Source)
at com.servoy.j2db.util.editlist.c$a.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at com.servoy.j2db.t.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.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)

Do you have any idea about this error?

Thanks