Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Jconnect, JARs and Jbuilder

4 views
Skip to first unread message

Iain sanderson

unread,
Oct 2, 2000, 3:00:00 AM10/2/00
to
I'm having trouble deploying a simple test database app outside the Jbuilder
3.5 IDE. It runs well withing the IDE, but after deploying a .JAR, I can't
run the app without an exception from a java -jar command line. It will run
outside the IDE if I copy the Jbuilder command line parameters, but the .JAR
always fails. Can anybody help?

2nd issue - can anyone tell a novice like me how to shrink the size of these
JAR files - 2MB for a small database app seems very large and slow? Is
Jbuilder conservative in its selection of classes?

The environment is Jbuilder 3.5 running on the JDK1.3,
using a Sybase Jconnect-5_2 JDBC driver on a Sybase ASA 6.03 database.

The sybase driver is working well. I have used jisql ( a test sybase isql)
happily, and the app runs within the JBuilder IDE. Deploying the app using
the Deployment Wizard causes no problems - all the classes are assembled
into the .JAR. I think my classpaths are all correct, including those
required by
Jconnect. I have tried debugging the JDBC driver using the JDBC devclasses,
but I'm too much of a novice to be sure this is working, and in anycase, in
the IDE there are no problems anyway. The app looks up the data in a single
table of the database and displays it in a jdbTable object. If I can make
this work, I can move on to greater things- like getting some of our
hospital data onto a wireless handheld.

The exception stack I get from java runtime is:-

Exception in thread "main" java.lang.StackOverflowError
at java.lang.Exception.<init>(Unknown Source)
at java.lang.RuntimeException.<init>(Unknown Source)
at java.lang.NullPointerException.<init>(Unknown Source)
at
com.sybase.jdbc2.jdbc.ErrorMessage.getMessage(ErrorMessage.java:689)
at
com.sybase.jdbc2.jdbc.ErrorMessage.makeMessage(ErrorMessage.java:664)

at
com.sybase.jdbc2.jdbc.ErrorMessage.cookieReplace(ErrorMessage.java:71
6)
etc ad infinitum.
----------------------------------------------------
Here is the code ( minus passwords I'm afraid):-

package untitled6;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.borland.dx.sql.dataset.*;
import com.borland.dbswing.*;

public class Frame1 extends JFrame {
JPanel contentPane;
BorderLayout borderLayout1 = new BorderLayout();
Database database1 = new Database();
QueryDataSet queryDataSet1 = new QueryDataSet();
JdbTable jdbTable1 = new JdbTable();

// construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
// component initialization
private void jbInit() throws Exception {
queryDataSet1.setQuery(new
com.borland.dx.sql.dataset.QueryDescriptor(database1, "select * from
events", null, true, Load.ALL));
database1.setConnection(new
com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:sybase:Tds:(server):26
38", "Uname", "pswd", false));
com.sybase.jdbc2.jdbc.SybDriver driver = new
com.sybase.jdbc2.Sybdriver();
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
this.setSize(new Dimension(400, 300));
this.setTitle("Frame Title");
jdbTable1.setDataSet(queryDataSet1);
contentPane.add(jdbTable1, BorderLayout.CENTER);
}
---------------------------

Thanks if you can help - I've scoured the Borland and Sybase newsgroups and
websites for 3 days now trying to make this work.

Iain Sanderson. (Novice Java dabbler - but not for long).
sand...@mc.duke.edu

0 new messages