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.

invalid SybDriverKey for this jConnect Driver

2 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-09-22 14:27:52.0Z
Steve Viens Posted on 1997-09-22 12:27:53.0Z
Message-ID: <34266449.1C77@nh.ultranet.com>
Date: Mon, 22 Sep 1997 08:27:53 -0400
From: Steve Viens <sviens@nh.ultranet.com>
Reply-To: sviens@nh.ultranet.com
Organization: Viens Consulting Inc.
X-Mailer: Mozilla 3.01Gold (Win95; U)
MIME-Version: 1.0
CC: stephen.viens@libertymutual.com
Subject: invalid SybDriverKey for this jConnect Driver
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 30
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:247
Article PK: 252000

I've been writing Java Servlets for several weeks now using jConnect 2.0
running under Netscape FastTrack Server 2.0 as well as Netscape
Enterprise Server 2.0.1. Everything was working fine until the
temporary version of jConnect I was using expired (Sept 18th). At that
time I purchased licenses for two copies of jConnect to be used with
Sybase SQL Server running on an IBM RS/6000 (AIX). I didn't want to
wait for the software to arrive to continue my development (it hasn't
yet) so I downloaded a new copy of jConnect 2.2 last Thursday 9/18.
That's when everything stopped working. Whenever I envoke one of these
Servlets I recieve the message...

"invalid SybDriverKey for this jConnect Driver"

Is anyone using jConnect in a Java Servlet? Has anyone encountered this
poblem? Is there a workaround? The servlets continue to work fine
when I envoke them from suns JSDK http program "srun.exe" and the JDBC
calls I'm making work fine when embedded in a Java Application. Help,
this project is due by the end of this week.

PS: I'm developing with Visual Cafe (which uses JDK 1.0.2)

Steve Viens
Liberty Mutual Group
stephen.viens@libertymutual.com


Lance Andersen Posted on 1997-09-22 14:27:52.0Z
Message-ID: <34268068.58AD@sybase.com>
Date: Mon, 22 Sep 1997 10:27:52 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
To: sviens@nh.ultranet.com
Subject: Re: invalid SybDriverKey for this jConnect Driver
References: <34266449.1C77@nh.ultranet.com>
Content-Type: multipart/mixed; boundary="------------510F27D64F5E"
Newsgroups: sybase.public.jdbcconnect
Lines: 193
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:246
Article PK: 251998

Steve,

If you could do the following for me.

Version of aix

java -version


Change your classpath to

$JDBC_HOME/devclasses:$JAVA_HOME/lib/classes.zip:.


As you are running jdk102, I have attached a jdk102 version of
Validate.java.


Could you please compile and execute this via:

java -verbose Validate102


Also, is it possible to see whether you have the same problem with
jdk1.1

Please post the output to the newsgroup.

Steve Viens wrote:
>
> I've been writing Java Servlets for several weeks now using jConnect 2.0
> running under Netscape FastTrack Server 2.0 as well as Netscape
> Enterprise Server 2.0.1. Everything was working fine until the
> temporary version of jConnect I was using expired (Sept 18th). At that
> time I purchased licenses for two copies of jConnect to be used with
> Sybase SQL Server running on an IBM RS/6000 (AIX). I didn't want to
> wait for the software to arrive to continue my development (it hasn't
> yet) so I downloaded a new copy of jConnect 2.2 last Thursday 9/18.
> That's when everything stopped working. Whenever I envoke one of these
> Servlets I recieve the message...
>
> "invalid SybDriverKey for this jConnect Driver"
>
> Is anyone using jConnect in a Java Servlet? Has anyone encountered this
> poblem? Is there a workaround? The servlets continue to work fine
> when I envoke them from suns JSDK http program "srun.exe" and the JDBC
> calls I'm making work fine when embedded in a Java Application. Help,
> this project is due by the end of this week.
>
> PS: I'm developing with Visual Cafe (which uses JDK 1.0.2)
>
> Steve Viens
> Liberty Mutual Group
> stephen.viens@libertymutual.com

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Technical Support Phone:(617) 564-6336
77 South Bedford Street Fax: (617) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================

// Extract version info from the driver, try to connect to the sample
// pubs2 database outside the Sybase corporate firewall.
import java.io.*;
import jdbc.sql.*;
import jdbc.sybase.utils.Debug;
import java.util.*;

public class Validate102
{
public static void main(String args[])
{
String url = "jdbc:sybase:Tds:alder:6689";
String proxy = "localhost:8000";
boolean tryingProxy = false;
try
{
Class.forName("jdbc.sybase.jdbc.SybDriver");
Driver driver = DriverManager.getDriver(url);
int major = driver.getMajorVersion();
int minor = driver.getMinorVersion();
System.out.println("Using JDBC driver version " +
major + "." + minor);
Properties props = new Properties();
props.put("user", "sa");
props.put("password", "");
DriverPropertyInfo dpi[] = driver.getPropertyInfo(url, props);
// get the version string
for (int i = 0; i < dpi.length; i++)
{
if (dpi[i].name.equals("VERSIONSTRING"))
{
System.out.println(dpi[i].value);
break;
}
}
System.out.println("Your CLASSPATH, Java environment, and " +
"jdbcConnect drivers are properly installed\n\ttrying to " +
"connect to the Sybase sample dataserver --\n\t...this will fail " +
"if your machine is not connected to the internet.");
// Timeouts cause Win95 to hang - some problem with the
// jConnect driver's use of threads to implement timouts...
// DriverManager.setLoginTimeout(10);

// attempt to connect to the sample database
Connection con = DriverManager.getConnection(url, props);
System.out.println("Connected successfully");
con.close();
System.out.println("Now connecting through your HTTP/JDBC Gateway");
tryingProxy = true;
props.put("proxy", proxy);
con = DriverManager.getConnection(url, props);
System.out.println("Connected successfully");
con.close();
}
catch (SQLException sqe)
{
String sqlstate = sqe.getSQLState();
String message = sqe.toString();
System.out.println("Unexpected exception: " + sqlstate);
if (sqlstate.equals("JZ0I4"))
{
if (message.indexOf("502") > 0)
{
System.out.println("\nThis error usually indicates that " +
"your HTTP gateway was unable to reach the database " +
"that you specified.\n\n One source of this problem may " +
"be that you are running the httpd/gateway under a " +
"JDK1.0.2 level VM. 1.0.2 has a bug where if you try " +
"to connect to an IP Address which your operation system " +
"does not have a 'name' for (gethostbyname fails?) " +
"then it cannot open a socket to it. This problem is " +
"fixed in JDK1.1 - if you kill your httpd gateway and " +
"restart it under JDK1.1 this problem may be resolved.");
}
else if (message.indexOf("Connection failed to") > 0)
{
if (tryingProxy)
{
System.out.println("\nThis error usually indicates that " +
"your HTTP gateway is NOT running. " +
"Check to see that " + proxy + " is responding.");
}
else
{
System.out.println("\nThis error often indicates that " +
"the database you are trying to connect to is not up. " +
"Try to verify (use a non-jdbc tool) that " + url +
" is running.");
}
}
}
sqe.printStackTrace();
System.exit(1);
}
catch (Throwable e)
{
System.out.println("Unexpected exception : " + e.toString());
if (e instanceof ClassNotFoundException)
{
System.out.println("\nThis error usually indicates that " +
"your Java CLASSPATH environment has not been " +
"set properly.");
}
if (e instanceof NoClassDefFoundError)
{
System.out.println("\nThis error may indicate there " +
"is a version incompatibility among the classes " +
"listed in your CLASSPATH.");
}
e.printStackTrace();
System.exit(1);
}
System.exit(0);
}
}