Article View: borland.public.jbuilder.java.swing
Article #9819Re: jdbTable runtime problem w/ JInternalFrame
From: rwilkman
Date: Wed, 02 Feb 2000 00:00
Date: Wed, 02 Feb 2000 00:00
192 lines
9470 bytes
9470 bytes
Jay:
Try http://java.sun.com/products/jdbc/
There's a "list of drivers" link there...
Jay Guha wrote:
>
> HI Rick,
>
> Thanks for the email.
> Have u had any luck with the JDBC drivers that I sent you ?.
> I need to know if I can count on the Paradox JDBC driver in my dev effort going forward
> becoz I don't really want to lose a lot of time and sleep over external components - as it is I have
> enough bugs
> in my own code.
>
> Furthermore, does Borland / Sun have a certification program or a certified list of JDBC drivers and
> the correponding class # ? This would help the dev community in their technology choice. If the dev
> picks JBuilder,
> it would be good to know which drivers Borland approves of.
>
> Thanks
>
> Cheers
>
> JAy Guha....
>
> Rick Gretter wrote:
>
> > 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)
--
=====
Rich Wilkman
Senior Quality Assurance Engineer
JBuilder Team
If something in this post looks like an opinion, walks like an
opinion and quacks like an opinion, it's mine and not that of
my employer.
If you are reading this from a newsgroup post, don't send mail.
=====
Technical Details
Message-ID:
<3898698C.7B06B221@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38952EBB.96F627E3@dfgnet.com> <3895E8C3.7D1402CF@inprise.com> <38982CEB.78BE8CC9@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: rwilkman <rwilkman@inprise.com> Subject: Re: jdbTable runtime problem w/ JInternalFrame Date: 2000/02/02 Message-ID: <3898698C.7B06B221@inprise.com> X-Deja-AN: 580874358 Content-Transfer-Encoding: 7bit References: <38952EBB.96F627E3@dfgnet.com> <3895E8C3.7D1402CF@inprise.com> <38982CEB.78BE8CC9@dfgnet.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing