Article View: borland.public.jbuilder.java.swing
Article #9805Re: jdbTable runtime problem w/ JInternalFrame
From: Rick Gretter
Date: Mon, 31 Jan 2000 00:00
Date: Mon, 31 Jan 2000 00:00
149 lines
7661 bytes
7661 bytes
Judging from your code, it looks like you used the Desktop Pane and Internal Frame snippets in
JBuilder 3.0. So I built a simple test application using them. My code is almost identical to
yours except that I used ODBC to connect to Local InterBase, while you used Corel's JDBC driver to
Paradox. My application works fine.
So I think the Paradox driver may be the problem. Have you used it successfully in other JBuilder
applications? Could you try connecting to Paradox through another ODBC driver, or connecting to
another data source, such as an InterBase table or a DataStore? I realize that this sort of
experimentation can be a hassle, depending what software you have available to experiment with and
how comfortable you are with it. I will work on getting the Corel driver and trying it out.
However, it's not downloadable from their web site, so this will take some time.
Another difference between your application and mine is the data. Is there anything unusual about
the Paradox table - for instance, datatypes that JBuilder might not know how to handle? Unlikely,
since you see data in design. Still, you could try substituting a simpler table.
Jay Guha wrote:
> 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:
<3895E8C3.7D1402CF@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38952EBB.96F627E3@dfgnet.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,8a903372ae26834c X-Google-Attributes: gid111d45,public From: Rick Gretter <RGretter@inprise.com> Subject: Re: jdbTable runtime problem w/ JInternalFrame Date: 2000/01/31 Message-ID: <3895E8C3.7D1402CF@inprise.com> X-Deja-AN: 580022167 Content-Transfer-Encoding: 7bit References: <38952EBB.96F627E3@dfgnet.com> Organization: Inprise Corporation Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing