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.

Cannot connect to database

6 posts in JConnect version 3.0 Last posting was on 1999-08-25 11:54:55.0Z
Graeme Manning Posted on 1999-08-17 22:35:09.0Z
Message-ID: <37B9E39D.E5D8986B@email.wrcs.fedex.com>
Date: Tue, 17 Aug 1999 16:35:09 -0600
From: Graeme Manning <gm18035c@email.wrcs.fedex.com>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Cannot connect to database
Content-Type: multipart/mixed; boundary="------------316891F650FA10553566F8BC"
Newsgroups: sybase.public.jconnect30
Lines: 38
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:243
Article PK: 255688

I am getting the following exception when running my applet in a
browser. TDS.class is included in the jar file. Any suggestions?


Netscape Communications Corporation -- Java 1.1.5
Type '?' for options.
Symantec Java! ByteCode Compiler Version 210.065
Copyright (C) 1996-97 Symantec Corporation
# Applet exception: java.lang.NullPointerException
java.lang.NullPointerException
at com.sybase.tds.Tds.getProtocolContext(Compiled Code)
at com.sybase.tds.Tds.login(Compiled Code)
at com.sybase.jdbc.SybConnection.<init>(Compiled Code)
at com.sybase.jdbc.SybDriver.connect(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
* at PreprintDB.SybaseConnection.getDBConnection(Compiled Code)
at PreprintDB.SybaseConnection.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)

Graeme


Download VCard gm18035c.vcf


Graeme Manning Posted on 1999-08-18 17:04:12.0Z
Message-ID: <37BAE78C.F9BA86D5@email.wrcs.fedex.com>
Date: Wed, 18 Aug 1999 11:04:12 -0600
From: Graeme Manning <gm18035c@email.wrcs.fedex.com>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Cannot connect to database
References: <37B9E39D.E5D8986B@email.wrcs.fedex.com>
Content-Type: multipart/mixed; boundary="------------7A7AF4BDF4FC630EF4B8BD69"
Newsgroups: sybase.public.jconnect30
Lines: 48
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:241
Article PK: 255687

I have fixed the original problem, some classes were absent from the jar
file. However, I now have the following problem :-

Graeme Manning wrote:

> Netscape Communications Corporation -- Java 1.1.5
>
> Type '?' for options.
>
> Symantec Java! ByteCode Compiler Version 210.065
> Copyright (C) 1996-97 Symantec Corporation
> java.util.MissingResourceException: can't find resource for
> com.sybase.jdbc.resource.Messages_en_US
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at java.lang.RuntimeException.<init>(Compiled Code)
> at java.util.MissingResourceException.<init>(Compiled Code)
> at java.util.ResourceBundle.getBundle(Compiled Code)
> * at java.util.ResourceBundle.getBundle(Compiled Code)
> at com.sybase.jdbc.ErrorMessage.<clinit>(ErrorMessage.java)
> at java.lang.ClassLoader.resolveClass(Compiled Code)
> at java.lang.ClassLoader.loadClassInternal(Compiled Code)
> at java.sql.DriverManager.<clinit>(DriverManager.java:401)

I have created a class named Messages_en_US and it is in the jar file. I
also get the error:
Exception: java.sql.exception:JZ0D0: internal error, missing message
for: JZ0D0 exception: java.lang.NullPointerException

Any help or suggestions?

Graeme


Download VCard gm18035c.vcf


Graeme Manning Posted on 1999-08-18 19:03:44.0Z
Message-ID: <37BB0390.31007302@email.wrcs.fedex.com>
Date: Wed, 18 Aug 1999 13:03:44 -0600
From: Graeme Manning <gm18035c@email.wrcs.fedex.com>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Cannot connect to database
References: <37B9E39D.E5D8986B@email.wrcs.fedex.com>
Content-Type: multipart/mixed; boundary="------------E7E60F1965FCC241E74994E5"
Newsgroups: sybase.public.jconnect30
Lines: 45
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:240
Article PK: 255758

Let's try this again!
I have corrected the JZD050 problem, teh class Message_en_US. class
was not in the jar file after all! Now I have the original problem! What
protocol context am I missing?

Graeme

Graeme Manning wrote:

> I am getting the following exception when running my applet in a
> browser. TDS.class is included in the jar file. Any suggestions?
>
> Netscape Communications Corporation -- Java 1.1.5
> Type '?' for options.
> Symantec Java! ByteCode Compiler Version 210.065
> Copyright (C) 1996-97 Symantec Corporation
> # Applet exception: java.lang.NullPointerException
> java.lang.NullPointerException
> at com.sybase.tds.Tds.getProtocolContext(Compiled Code)
> at com.sybase.tds.Tds.login(Compiled Code)
> at com.sybase.jdbc.SybConnection.<init>(Compiled Code)
> at com.sybase.jdbc.SybDriver.connect(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> * at PreprintDB.SybaseConnection.getDBConnection(Compiled Code)
> at PreprintDB.SybaseConnection.run(Compiled Code)
> at java.lang.Thread.run(Compiled Code)
>
> Graeme


Download VCard gm18035c.vcf


Graeme Manning Posted on 1999-08-17 22:52:16.0Z
Message-ID: <37B9E7A0.200202BF@email.wrcs.fedex.com>
Date: Tue, 17 Aug 1999 16:52:16 -0600
From: Graeme Manning <gm18035c@email.wrcs.fedex.com>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Cannot connect to database
References: <37B9E39D.E5D8986B@email.wrcs.fedex.com>
Content-Type: multipart/mixed; boundary="------------556B3ADD10380D557CF6988D"
Newsgroups: sybase.public.jconnect30
Lines: 42
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:242
Article PK: 255761

Ignore the email id on the posting, use hiScouser@yahoo.com instead.

Graeme Manning wrote:

> I am getting the following exception when running my applet in a
> browser. TDS.class is included in the jar file. Any suggestions?
>
> Netscape Communications Corporation -- Java 1.1.5
> Type '?' for options.
> Symantec Java! ByteCode Compiler Version 210.065
> Copyright (C) 1996-97 Symantec Corporation
> # Applet exception: java.lang.NullPointerException
> java.lang.NullPointerException
> at com.sybase.tds.Tds.getProtocolContext(Compiled Code)
> at com.sybase.tds.Tds.login(Compiled Code)
> at com.sybase.jdbc.SybConnection.<init>(Compiled Code)
> at com.sybase.jdbc.SybDriver.connect(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> * at PreprintDB.SybaseConnection.getDBConnection(Compiled Code)
> at PreprintDB.SybaseConnection.run(Compiled Code)
> at java.lang.Thread.run(Compiled Code)
>
> Graeme


Download VCard gm18035c.vcf


Graeme Manning Posted on 1999-08-18 20:28:47.0Z
Message-ID: <37BB177F.807AB1DD@email.wrcs.fedex.com>
Date: Wed, 18 Aug 1999 14:28:47 -0600
From: Graeme Manning <gm18035c@email.wrcs.fedex.com>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Cannot connect to database
References: <37B9E39D.E5D8986B@email.wrcs.fedex.com>
Content-Type: multipart/mixed; boundary="------------CDBDA6E02644D2FEA0F66EA5"
Newsgroups: sybase.public.jconnect30
Lines: 34
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:239
Article PK: 256615

More info!

I create a jar file from within VisualCafe but this file excludes
Messages_en_Us and SybDriverKey classes. I extract all the files into a
separate directory and add all the classes from sub-dir's of
com/sybase/, including a version of Messages_en_Us that I created. I
then re-jar the file, first removing the original manifest created when
extracting the files, to include all original files and deploy. The
applet loads and initialises but I get the error in my first posting.

I know that VisualCafe and jar.exe are supported by other vendors
but I need to identify which class or classes, if any, are missing so
that I can incluse them in teh final build!

Graeme


Download VCard gm18035c.vcf


Lance & Tonya Andersen Posted on 1999-08-25 11:54:55.0Z
Message-ID: <37C3D98F.FC92660A@tiac.net>
Date: Wed, 25 Aug 1999 07:54:55 -0400
From: Lance & Tonya Andersen <lta@tiac.net>
Reply-To: lta@tiac.net
X-Mailer: Mozilla 4.5 [en] (Win95; U)
X-Accept-Language: en-US
MIME-Version: 1.0
Subject: Re: Cannot connect to database
References: <37B9E39D.E5D8986B@email.wrcs.fedex.com> <37BB177F.807AB1DD@email.wrcs.fedex.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 25
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:236
Article PK: 254576

I cannot speak for VisualCafe, but I have built my own JAR file many
times which contains
jConnect and it works without error.

I would suggest creating your JAR outside of VC.

Lance

Graeme Manning wrote:
>
> More info!
>
> I create a jar file from within VisualCafe but this file excludes
> Messages_en_Us and SybDriverKey classes. I extract all the files into a
> separate directory and add all the classes from sub-dir's of
> com/sybase/, including a version of Messages_en_Us that I created. I
> then re-jar the file, first removing the original manifest created when
> extracting the files, to include all original files and deploy. The
> applet loads and initialises but I get the error in my first posting.
>
> I know that VisualCafe and jar.exe are supported by other vendors
> but I need to identify which class or classes, if any, are missing so
> that I can incluse them in teh final build!
>
> Graeme