Board index » jbuilder » weird erorr in querydataset

weird erorr in querydataset


2006-09-11 02:37:23 PM
jbuilder13
Hi!
I have two queryDatasets in a master/detail relationship. And I have a
disposeMonitor set to this. Everything works fine if I open the master
dataset first and second time.
But the third time I try I get this:
Failure notifying dependent components of a DataSet reopen.
and stack trace is poinitng on a line where master dataset is refreshed. Why
and how to avoid this behaviour?
Zvonko
 
 

Re:weird erorr in querydataset

Zvonko wrote:
Quote
I have two queryDatasets in a master/detail relationship. And I have a
disposeMonitor set to this. Everything works fine if I open the master
dataset first and second time.
But the third time I try I get this:

Failure notifying dependent components of a DataSet reopen.

and stack trace is poinitng on a line where master dataset is refreshed.
Why and how to avoid this behaviour?
Please post the stack trace so we can take a look.
Also, why are you disposing of the data set as opposed to closing it?
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html
 

Re:weird erorr in querydataset

"Kevin Dean [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
Please post the stack trace so we can take a look.

Also, why are you disposing of the data set as opposed to closing it?

--
OK, to explain. I hav a JdesktopPane with JMenuBar. When a user clicks
something in a JMenu, jInternalFrame is opening with two jdbTables in which
are data returned from two queryDataSets who are in master/detail
relationship.
So, when user clicks the menuItem code is like this:
<code>public void jMenuItem2_actionPerformed(ActionEvent e) {
try {
sifknj = 60;
Dokumenti_Frame fr = new Dokumenti_Frame();
} catch (Exception ex) {
JOptionPane.showMessageDialog(this, "Greška: " +
String.valueOf(ex),
"Greška", 0);
}
}</code>
Then in Dokumenti_Frame the query is generated on the base of sifknj
variable and qeryDataSets are refreshed.
Now when I called
if (queryDataSet1.isOpen)
queryDataSet1.close();
after clicking on jMenuItem, I got the same erorr: Failure notifying
dependent components of a DataSet reopen.
Then I added DBDisposeMonitor and the result is ok the first two times I
click on JMenuItem, but the third time same erorr.
Here is the stack trace:
See com.borland.dx.dataset.DataSetException error code: BASE+61
com.borland.dx.dataset.DataSetException: Failure notifying dependent
components of a DataSet reopen.
at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.open(Unknown Source)
at com.borland.dbswing.JdbTable.bindDataSet(JdbTable.java:2773)
at com.borland.dbswing.JdbTable.setDataSet(JdbTable.java:818)
at prodaja.Dokumenti_Frame.jbInit(Dokumenti_Frame.java:303)
at prodaja.Dokumenti_Frame.<init>(Dokumenti_Frame.java:26)
at prodaja.MainForm.jMenuItem8_actionPerformed(MainForm.java:318)
at
prodaja.MainForm_jMenuItem8_actionAdapter.actionPerformed(MainForm.java:519)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Thanks,
Zvonko
 

{smallsort}

Re:weird erorr in querydataset

Zvonko wrote:
Quote
OK, to explain. I hav a JdesktopPane with JMenuBar. When a user clicks
something in a JMenu, jInternalFrame is opening with two jdbTables in
which are data returned from two queryDataSets who are in master/detail
relationship.
That code suggests to me that you're not removing the listeners properly.
The previous instances of the frames are still there in memory with
listeners on the query data set. Managing listeners whose sources survive
the destruction of the destinations can be quite tricky. Make sure you're
using "remove..Listener" when closing your dependent frame.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html