🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.database
4 messages
4 total messages Started by Zvonko Mon, 11 Sep 2006 06:37
weird erorr in querydataset
#344
Author: Zvonko
Date: Mon, 11 Sep 2006 06:37
14 lines
1272 bytes
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
#345
Author: Kevin Dean [TeamB]
Date: Mon, 11 Sep 2006 13:48
28 lines
1900 bytes
Zvonko wrote:

>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.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Re: weird erorr in querydataset
#346
Author: Zvonko
Date: Tue, 12 Sep 2006 05:56
92 lines
5220 bytes
"Kevin Dean [TeamB]" <NkOdSePaAnM@datadevelopment.com> wrote in message 
news:xn0er3b4p14e80000-kdean@www.teamb.com...
> 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 
Re: weird erorr in querydataset
#347
Author: Kevin Dean [TeamB]
Date: Fri, 15 Sep 2006 18:56
25 lines
2100 bytes
Zvonko wrote:

>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.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads