Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Sample Applet

3 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-04-28 18:25:55.0Z
Jim Lynch Posted on 1997-04-25 19:19:41.0Z
Message-ID: <336103CD.FF6@zazu.mcit.com>
Date: Fri, 25 Apr 1997 13:19:41 -0600
From: Jim Lynch <jlynch@zazu.mcit.com>
Organization: MCI Communications
X-Mailer: Mozilla 3.0 (X11; I; AIX 1)
MIME-Version: 1.0
Subject: Sample Applet
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 39
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:926
Article PK: 252678

I compiled the sample applet, Isql.java, and when trying to run it I got
the following error:

java.lang.NullPointerException
at java.net.InetAddress.getAllByName(InetAddress.java:250)
at java.net.InetAddress.getByName(InetAddress.java:209)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:87)
at java.net.Socket.<init>(Socket.java:87)
at java.net.Socket.<init>(Socket.java:62)
at jdbc.sybase.timedio.Dbio.connect(Dbio.java:67)
at jdbc.sybase.tds.Tds.login(:403)
at jdbc.sybase.jdbc.SybConnection.<init>(SybConnection.java:133)
at jdbc.sybase.jdbc.SybDriver.connect(SybDriver.java:160)
at jdbc.sql.DriverManager.getConnection(DriverManager.java:90)
at Isql.doQuery(Isql.java:356)
at Isql.action(Isql.java:183)
at java.awt.Component.handleEvent(Component.java:916)
at java.awt.Component.postEvent(Component.java:844)
at java.awt.Component.postEvent(Component.java:861)
at java.awt.Component.postEvent(Component.java:861)
at sun.awt.motif.MButtonPeer.action(MButtonPeer.java:39)
at java.lang.Thread.run(Thread.java)


Here's some env that might help out:

$ echo $JAVA_HOME
/usr/local/Java
$
$ echo $JDBC_HOME
/home2/jlynch/jdbc_test/jConnect
$
$ echo $CLASSPATH
/home2/jlynch/jdbc_test/jConnect/classes:/usr/local/Java/classes:/home2/jlynch/classes:/usr/local/Java/lib:.

Ideas/suggestions??

Jim
jlynch@zazu.mcit.com


Jim Lynch Posted on 1997-04-28 16:29:15.0Z
Message-ID: <3364D05B.794B@zazu.mcit.com>
Date: Mon, 28 Apr 1997 10:29:15 -0600
From: Jim Lynch <jlynch@zazu.mcit.com>
Organization: MCI Communications
X-Mailer: Mozilla 3.0 (X11; I; AIX 1)
MIME-Version: 1.0
Subject: Re: Sample Applet
References: <336103CD.FF6@zazu.mcit.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 49
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:920
Article PK: 252674

I got this to work for the most part. I got the applet working if I run
it on the same host machine as the server is running on. I get the
error message below when I'm running the applet that is trying to
connect to a server that is on a different host.

Ideas/suggestions??

Jim
jlynch@zazu.mcit.com

Jim Lynch wrote:
>
> I compiled the sample applet, Isql.java, and when trying to run it I got
> the following error:
>
> java.lang.NullPointerException
> at java.net.InetAddress.getAllByName(InetAddress.java:250)
> at java.net.InetAddress.getByName(InetAddress.java:209)
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:87)
> at java.net.Socket.<init>(Socket.java:87)
> at java.net.Socket.<init>(Socket.java:62)
> at jdbc.sybase.timedio.Dbio.connect(Dbio.java:67)
> at jdbc.sybase.tds.Tds.login(:403)
> at jdbc.sybase.jdbc.SybConnection.<init>(SybConnection.java:133)
> at jdbc.sybase.jdbc.SybDriver.connect(SybDriver.java:160)
> at jdbc.sql.DriverManager.getConnection(DriverManager.java:90)
> at Isql.doQuery(Isql.java:356)
> at Isql.action(Isql.java:183)
> at java.awt.Component.handleEvent(Component.java:916)
> at java.awt.Component.postEvent(Component.java:844)
> at java.awt.Component.postEvent(Component.java:861)
> at java.awt.Component.postEvent(Component.java:861)
> at sun.awt.motif.MButtonPeer.action(MButtonPeer.java:39)
> at java.lang.Thread.run(Thread.java)
>
> Here's some env that might help out:
>
> $ echo $JAVA_HOME
> /usr/local/Java
> $
> $ echo $JDBC_HOME
> /home2/jlynch/jdbc_test/jConnect
> $
> $ echo $CLASSPATH
> /home2/jlynch/jdbc_test/jConnect/classes:/usr/local/Java/classes:/home2/jlynch/classes:/usr/local/Java/lib:.
>
> Ideas/suggestions??
>
> Jim
> jlynch@zazu.mcit.com


David Clegg Posted on 1997-04-28 18:25:55.0Z
Message-ID: <3364EBB3.62543125@sybase.com>
Date: Mon, 28 Apr 1997 11:25:55 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: Jim Lynch <jlynch@zazu.mcit.com>
Subject: Re: Sample Applet
References: <336103CD.FF6@zazu.mcit.com> <3364D05B.794B@zazu.mcit.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 69
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:905
Article PK: 252658

You SHOULD be getting a java.lang.SecurityException for connecting
to a different host from the one which the applet was downloaded.

If you are trying to do this from a JDK1.0.2 based browser, you
need to use the HTTPD/JDBC Gateway which comes with jConnect.

The exception below may be a side-effect of a JDK1.0.2 bug where
if you specify a IP address by number (12.34.56.78) rather than
by name, the VM still trys to look up the name of the host you
are connecting to -- and if it isn't in your YP-maps or whatever
you are using (getHostByName() would fail), then the connection
fails.
You can fix that bug by upgrading the VM, or adding the hostname
to your system. (add to /etc/hosts for many Unix systems).

dave

> I got this to work for the most part. I got the applet working if I run
> it on the same host machine as the server is running on. I get the
> error message below when I'm running the applet that is trying to
> connect to a server that is on a different host.
>
> Ideas/suggestions??
>
> Jim
> jlynch@zazu.mcit.com
>
> Jim Lynch wrote:
> >
> > I compiled the sample applet, Isql.java, and when trying to run it I got
> > the following error:
> >
> > java.lang.NullPointerException
> > at java.net.InetAddress.getAllByName(InetAddress.java:250)
> > at java.net.InetAddress.getByName(InetAddress.java:209)
> > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:87)
> > at java.net.Socket.<init>(Socket.java:87)
> > at java.net.Socket.<init>(Socket.java:62)
> > at jdbc.sybase.timedio.Dbio.connect(Dbio.java:67)
> > at jdbc.sybase.tds.Tds.login(:403)
> > at jdbc.sybase.jdbc.SybConnection.<init>(SybConnection.java:133)
> > at jdbc.sybase.jdbc.SybDriver.connect(SybDriver.java:160)
> > at jdbc.sql.DriverManager.getConnection(DriverManager.java:90)
> > at Isql.doQuery(Isql.java:356)
> > at Isql.action(Isql.java:183)
> > at java.awt.Component.handleEvent(Component.java:916)
> > at java.awt.Component.postEvent(Component.java:844)
> > at java.awt.Component.postEvent(Component.java:861)
> > at java.awt.Component.postEvent(Component.java:861)
> > at sun.awt.motif.MButtonPeer.action(MButtonPeer.java:39)
> > at java.lang.Thread.run(Thread.java)
> >
> > Here's some env that might help out:
> >
> > $ echo $JAVA_HOME
> > /usr/local/Java
> > $
> > $ echo $JDBC_HOME
> > /home2/jlynch/jdbc_test/jConnect
> > $
> > $ echo $CLASSPATH
> > /home2/jlynch/jdbc_test/jConnect/classes:/usr/local/Java/classes:/home2/jlynch/classes:/usr/local/Java/lib:.
> >
> > Ideas/suggestions??
> >
> > Jim
> > jlynch@zazu.mcit.com