🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9799

jdbTable runtime problem w/ JInternalFrame

#9799
From: Jay Guha
Date: Mon, 31 Jan 2000 00:00
133 lines
6199 bytes
Hi,

I am using a jdbTable obj inside a JInternalFrame class (this is a MDI
app). In the designer, the table & its contents show up very nicely w/
the use of a QueryDataSet obj & jdbTable (under a jScrollPane). The
TableHeader also shows up fine. Also the jdbNavigator works AOK. Also
the JDBC driver I am using also works - the data shows up.

THe problem happens when I run the compiled app - it keeps giving me
NullPointer exceptions and not in my code.

Please help - I really need this to work to figure out . This is really
a fundamental requirement so I have to get this to work.

I've attached the the code & error mesg below.

Thanks

Cheers
Jay Guha...

------------------------------------------------

public class Login extends JInternalFrame {
  BorderLayout borderLayout1 = new BorderLayout();
  Database p_login = new Database();
  QueryDataSet queryDataSet_p_login = new QueryDataSet();
  JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar();
  TableScrollPane tableScrollPane1 = new TableScrollPane();
  JdbTable jdbTable1 = new JdbTable();

  public Login() {
    try {
      jbInit();
      pack();
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }

  public void jbInit() throws Exception {
    queryDataSet_p_login.setQuery(new
com.borland.dx.sql.dataset.QueryDescriptor(p_login, "select * from
p_login", null, true, Load.ALL));
    p_login.setConnection(new
com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:bdea://localhost/jpaxsys;SM=SessionMgr",
"", "", false, "com.corel.pdx.driver.PdxJDBCDriver"));
    this.setClosable(true);
    this.setIconifiable(true);
    this.setMaximizable(true);
    this.setResizable(true);
    this.getContentPane().setLayout(borderLayout1);
    jdbTable1.setDataSet(queryDataSet_p_login);
    this.getContentPane().add(jdbNavToolBar1, BorderLayout.NORTH);
    this.getContentPane().add(tableScrollPane1, BorderLayout.CENTER);
    tableScrollPane1.getViewport().add(jdbTable1, null);
  }

}


--------------------------------------------------


AppAccelerator(tm) 1.2.010 for Java (JDK 1.2), x86 version.
Copyright (c) 1997-1999 Inprise Corporation. All Rights Reserved.
Exception occurred during event dispatching:
java.lang.ExceptionInInitializerError: java.lang.NullPointerException
        at
com.borland.dbswing.DBTextDataBinder$UndoAction.<init>(DBTextData
        at
com.borland.dbswing.DBTextDataBinder.<clinit>(DBTextDataBinder.ja
        at
com.borland.dbswing.JdbTextArea.commonInit(JdbTextArea.java:158)
        at com.borland.dbswing.JdbTextArea.<init>(JdbTextArea.java:143)
        at com.borland.dbswing.JdbTextArea.<init>(JdbTextArea.java:108)
        at
com.borland.dbswing.DBExceptionDialog$1.<init>(DBExceptionDialog.
        at
com.borland.dbswing.DBExceptionDialog.<init>(DBExceptionDialog.ja
        at
com.borland.dbswing.DBExceptionDialog.<init>(DBExceptionDialog.ja
        at
com.borland.dbswing.DBExceptionHandler.handleException(DBExceptio
        at
com.borland.dbswing.DBExceptionHandler.handleException(DBExceptio
        at com.borland.dbswing.JdbTable.openDataSet(Compiled Code)
        at com.borland.dbswing.JdbTable.addNotify(JdbTable.java:1648)
        at java.awt.Container.addNotify(Compiled Code)
        at javax.swing.JComponent.addNotify(Compiled Code)
        at java.awt.Container.addNotify(Compiled Code)
        at javax.swing.JComponent.addNotify(Compiled Code)
        at java.awt.Container.addNotify(Compiled Code)
        at javax.swing.JComponent.addNotify(Compiled Code)
        at java.awt.Container.addNotify(Compiled Code)
        at javax.swing.JComponent.addNotify(Compiled Code)
        at java.awt.Container.addNotify(Compiled Code)
        at javax.swing.JComponent.addNotify(Compiled Code)
        at javax.swing.JRootPane.addNotify(Compiled Code)
        at java.awt.Container.addNotify(Compiled Code)
        at javax.swing.JComponent.addNotify(Compiled Code)
        at java.awt.Container.addImpl(Compiled Code)
        at javax.swing.JLayeredPane.addImpl(Compiled Code)
        at java.awt.Container.add(Compiled Code)
        at paxsys.Desktop.Login_actionPerformed(Desktop.java:492)
        at paxsys.Desktop$4.actionPerformed(Desktop.java:308)
        at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.jav
        at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Ab
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonM
        at javax.swing.DefaultButtonModel.setPressed(Compiled Code)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:226)
        at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRel
        at java.awt.Component.processMouseEvent(Compiled Code)
        at java.awt.Component.processEvent(Compiled Code)
        at java.awt.Container.processEvent(Compiled Code)
        at java.awt.Component.dispatchEventImpl(Compiled Code)
        at java.awt.Container.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled
Code)
        at java.awt.LightweightDispatcher.processMouseEvent(Compiled
Code)
        at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
        at java.awt.Container.dispatchEventImpl(Compiled Code)
        at java.awt.Window.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:258)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:68)
Technical Details
Message-ID: <38952EBB.96F627E3@dfgnet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,8a903372ae26834c,start
X-Google-Attributes: gid111d45,public
From: Jay Guha <jguha@dfgnet.com>
Subject: jdbTable runtime problem w/ JInternalFrame
Date: 2000/01/31
Message-ID: <38952EBB.96F627E3@dfgnet.com>
X-Deja-AN: 579785685
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing