Net-Lib protocol driver call to read data failed.

Actually, I looked through those messages and didn't find the answer. Here's
description of my problem.
I'm using some home made C-library to work with Sybase DB.  This library
uses Open client lib. My code is written in Java and uses JNI calls to the
C-library. In this home made library I have function to do connect to Sybase
DB.
Here's source code.

JRN_RC JrnInitAPI(litstring username, litstring password)
{
   CS_RETCODE rc;
   int status = -999;
   long SQLCODE = -999;
   SQLCA sqlCA;

   if (username == NULL || password == NULL || *username == 0)
      return JRN_NORIGHTS;

   /* allocate all the crap we need to get Sybase going */
   if (cs_ctx_alloc(OUR_VERSION, &ctxt) != CS_SUCCEED)
   {
      return JRN_DUNNO;
   }

   if (ct_init(ctxt, OUR_VERSION) != CS_SUCCEED)
   {
      cs_ctx_drop(ctxt);
      return JRN_DUNNO;
   }

   if (ct_con_alloc(ctxt, &plda) != CS_SUCCEED)
   {
      cs_ctx_drop(ctxt);
      return JRN_DUNNO;
   }

   else if (ct_diag(plda, CS_INIT, CS_UNUSED, CS_UNUSED, NULL) !=
CS_SUCCEED)
   {
      cs_ctx_drop(ctxt);
      ct_con_drop(db_my_lda());
      return JRN_DUNNO;
   }

   if (ct_con_props(db_my_lda(), CS_SET, CS_USERNAME, (void*)username,
CS_NULLTERM, NULL) != CS_SUCCEED ||
       ct_con_props(db_my_lda(), CS_SET, CS_PASSWORD, (void*)password,
CS_NULLTERM, NULL) != CS_SUCCEED)
   {
      cs_ctx_drop(ctxt);
      ct_con_drop(db_my_lda());
      return JRN_DUNNO;
   }

   if ((rc = ct_connect(db_my_lda(), NULL, 0)) != CS_SUCCEED)
   {
#ifdef _DEBUG
      sprintf(temp, "\n================== ct_connect retcode  %d
================", rc);
      writeDebugInfoToFile(temp);

      status = -999;
      rc = ct_diag (plda, CS_STATUS, CS_ALLMSG_TYPE, CS_UNUSED, &status);
      sprintf(temp, "\n================== ct_diag rc status %d %d
================", rc, status);
      writeDebugInfoToFile(temp);

      rc = ct_diag (plda, CS_GET, SQLCODE_TYPE, 1, &SQLCODE);
      sprintf(temp, "\n================== ct_diag 2 rc  SQLCODE %d %ld
================", rc, SQLCODE);
      writeDebugInfoToFile(temp);

      rc = ct_diag (plda, CS_GET, SQLCA_TYPE, 1, &sqlCA);
      sprintf(temp, "\n================== ct_diag 2 rc  SQLCA %d %s
================", rc, sqlCA.sqlerrm.sqlerrmc);
      writeDebugInfoToFile(temp);

#endif

      ct_con_drop(db_my_lda());
      cs_ctx_drop(ctxt);
#ifdef _DEBUG
      sprintf(temp, "\n================== ct_connect retcode  %d
================", rc);
      writeDebugInfoToFile(temp);
#endif
      return JRN_NORIGHTS;
   }
}

Nothing special, right? When I call this function from my Java code I got
"Net-Lib protocol driver call to read data failed" (see ct_connect()
function). That's not all. The error disappears if I move the call in my
Java code to some different place. For ex., in the very beggining of my main
class. Any ideas? I spent 2 days investigating this problem.


"Anthony Mandic" <sp_am_block@start.com.au> wrote in message
news:3CD35177.F696415C@start.com.au...
> Dmitry wrote:
> >
> > If somebody has any idea what this error means. I'm just calling
> > ct_connect() and get this error.
>
> Search back in this newsgroup to the start of November last
> year and you'll find a post with the same subject with some
> follow ups. See if that helps. If not, post back with more
> information.
>
> -am � 2002




0
Dmitry
5/6/2002 4:23:30 PM
sybase.ase.unix 866 articles. 0 followers. Follow

1 Replies
751 Views

Similar Articles

[PageSpeed] 4

Dmitry wrote:
> 
> Actually, I looked through those messages and didn't find the answer. Here's
> description of my problem.

	Not even the reply from Shashikant Bhandari?

> I'm using some home made C-library to work with Sybase DB.  This library
> uses Open client lib. My code is written in Java and uses JNI calls to the
> C-library. In this home made library I have function to do connect to Sybase
> DB.
> Here's source code.
....
> Nothing special, right? When I call this function from my Java code I got
> "Net-Lib protocol driver call to read data failed" (see ct_connect()
> function). That's not all. The error disappears if I move the call in my
> Java code to some different place. For ex., in the very beggining of my main
> class. Any ideas? I spent 2 days investigating this problem.

	I suggested posting to the Open Client newsgroup. Usually moving
	code around and having different results indicates some sort of
	stack corruption. If you have a debugger you could try investigating
	with that.

-am	� 2002
0
Anthony
5/7/2002 11:18:25 AM
Reply:

Similar Artilces:

Net-Lib protocol driver call to read data failed
If somebody has any idea what this error means. I'm just calling ct_connect() and get this error. Dmitry wrote: > > If somebody has any idea what this error means. I'm just calling > ct_connect() and get this error. Search back in this newsgroup to the start of November last year and you'll find a post with the same subject with some follow ups. See if that helps. If not, post back with more information. -am � 2002 ...

Net-Lib protocol driver call to read data failed
From time to time we are getting the following message in the server log. Why would that be? TIA. -------------------------------------------------------------- Apr 14 17:01:41 2000: SRVLIB Message: 16240/10/0: Net-Library routine net_read() failed in srv_rawread Network error: status = 32 - Net-Lib protocol driver call to read data failed ...

Re: Net-Lib protocol driver call to read data failed
Actually, I looked through those messages and didn't find the answer. Here's description of my problem. I'm using some home made C-library to work with Sybase DB. This library uses Open client lib. My code is written in Java and uses JNI calls to the C-library. In this home made library I have function to do connect to Sybase DB. Here's source code. JRN_RC JrnInitAPI(litstring username, litstring password) { CS_RETCODE rc; int status = -999; long SQLCODE = -999; SQLCA sqlCA; if (username == NULL || password == NULL || *username == 0) retu...

Net-Lib protocol driver call to read data failed #2
We are in the process of upgrading from ASE 12.0 to 12.5 on Solaris. The client connects and makes connections to 12.5 but after sometime we see this Error Message: State: 08S01 ; Msg: ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to read data failed Operating System Error #Socket recv failed - errno 2 Sql State ZZZZZ84083974 Any idea why this error can happen? Thanks. Hi, Something does not sound correct here. "errno 2" at OS level means ENOENT, no such file or directory. However "recv" or &q...

ct_send(): network packet layer: internal net library error: Net-Lib protocol driver call to write data failed
The below message log is a series of events happened in a Sybase client. More detail is given below. Please provide your suggestions if you have encountered this before The OS is Red Hat Enterprise Linux AS release 3 (Taroon Update 5) and Sybase 12.5.1. we also applied latest patches from sybase 09262005 212550 ErrorMsg: (TID3155296384) <Calling eaDatabase client callback function eaSybCtCb> 09262005 212550 ErrorMsg: (TID3155296384) <Client callback is called. Error number is <84083975> Message is <ct_send(): network packet layer: internal net library error:...

ct_send(): network packet layer: internal net library error: Net-Lib protocol driver call to write data failed
The below message log is a series of events happened in a Sybase client. More detail is given below. Please provide your suggestions if you have encountered this before The OS is Red Hat Enterprise Linux AS release 3 (Taroon Update 5) and Sybase 12.5.1. we also applied latest patches from sybase 09262005 212550 ErrorMsg: (TID3155296384) <Calling eaDatabase client callback function eaSybCtCb> 09262005 212550 ErrorMsg: (TID3155296384) <Client callback is called. Error number is <84083975> Message is <ct_send(): network packet layer: internal net library error:...

ct_send(): network packet layer: internal net library error: Net-Lib protocol driver call to write data failed
The below message log is a series of events happened in a Sybase client. More detail is given below. Please provide your suggestions if you have encountered this before The OS is Red Hat Enterprise Linux AS release 3 (Taroon Update 5) and Sybase 12.5.1. we also applied latest patches from sybase 09262005 212550 ErrorMsg: (TID3155296384) <Calling eaDatabase client callback function eaSybCtCb> 09262005 212550 ErrorMsg: (TID3155296384) <Client callback is called. Error number is <84083975> Message is <ct_send(): network packet layer: internal net library erro...

Net-Lib protocol driver call to write data failed
Has anyone received this error and if so can you tell me what it means? Thanks, Steve That usually means that a client closed a socket unexpectedly and so when Jaguar tries to write a response, an error occurs. You can usually ignore the message. Allen Steve Fennessey <""steve.fennessey\"@maritz.com NOSPAM> wrote in news:SzbLI83sCHA.198@forums.sybase.com: > Has anyone received this error and if so can you tell me what it means? > Thanks, > Steve > In article <SzbLI83sCHA.198@forums.sybase.com>, Steve Fennessey <"&qu...

win 2000 and TCP entry in syl.ini (ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints failed)
Hallo, I've get an "ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints failed" error. I'tried to connect to database (11.9.x) via an entry like: [MyDB] master=TCP,195.178.103.120,11000 query=TCP,195.178.103.120,11000 The Server and the client running on an Windows2000 machine. If I try to connect from another pc it doesn't work, too. If I connect with NLMSNMP it works fine, but I must have an TCP because I am using JConnect! Thanks, Ralf ...

Net-Lib protocol driver call to register a listener failed ?
This is a multi-part message in MIME format. ------=_NextPart_000_003B_01BE924A.4E541100 Content-Type: text/plain; charset="EUC-KR" Content-Transfer-Encoding: 7bit Hi there, I met following error message in JaguarCTS server log(srv.log). I want to know exact meaning of following messages and how can I fix following problems? Apr 29 13:52:19 1999: SRVLIB Message: 16240/10/0: Net-Library routine net_listen(wer.penta.co.kr 9000) failed in srv__start_listeners Network error: status = 23 - Net-Lib protocol driver call to register a listener failed /*---------------...

Net Lib protocol driver call to connect two endpoints failed
We have developed an application that uses Open Server Gateway to the SQL Anywhere and the sql.edit is configured correctly but we are having a problem. When connecting for the first time no trouble; connected to database but when we close the application and reopen and try to connect again we are receiving the error message: Net Lib protocol driver connect to two endpoints failed...I am sure that the Sql.edit is the culprit but why can we connect once with no error? Please help. thanks Peggy I forgot to add that if we reboot and then try to connect no problem. But we need to ...

{System.Data.Odbc.OdbcException: ERROR [25000] [Microsoft][ODBC Driver Manager] Failed to enlist on calling object's transaction
Hi All I am using Enterprise Library 3.1 to connect MySQL database with the help of MySQL ODBC driver 5.1. Following is connection string <add name="MySQLConnect" connectionString="Driver={MySQL ODBC 5.1 Driver};server=127.0.0.1;database=MySQLDatabase;user=testUser;option=3" providerName="System.Data.Odbc"/> Everything works fine with this driver except the transaction. Following transaction code always throws an error. {System.Data.Odbc.OdbcException: ERROR [25000] [Microsoft][ODBC Driver Manager] Failed to enlist on calling object's transa...

Reading Excel data using ASP.net (VB.net)
Hi,      I'm a fairly experienced VB programmer but am new to .NET and ASP.NET. I need to write an application that reads in data from an Excel spreadsheet and then stores the data (after some manipulation and sanity checks) in a SQL server db.   I think I can handle the SQL server bit and writing data into the db but does anyone have any code samples showing how to connect to Excel via ASP.NET and read the data back? Traditionally  (in VB6) after connecting to Excel in VB (ie creating an object) I have read rows as follows: do until oExcel.cells.item(s...

Error: A network read failed. Unable to read data from the remote client
Hi, I've just started working with Mobilink and am getting stuck at the above error message. I'm setting up replication between a set of ASA servers which each run our application. I've created a test setup for development consisting of two remote db's and a consolidated db running on two machines. One machine has the consolidated plus a remote both running. I'm using ASA 7.0.4 for all. I've set up two definitions on each of the remotes, one for tables to be synchronized every 15 minutes and one for tables to be synchronized every hour. Have added basic ...

Web resources about - Net-Lib protocol driver call to read data failed. - sybase.ase.unix

Kyoto Protocol - Wikipedia, the free encyclopedia
... in their carbon dioxide emissions from fuel combustion between 1990 and 2009. For more detailed country/region information, see Kyoto Protocol ...

Nest’s Weave protocol for the connected home now open to third-party developers
Nest Weave, the communications protocol that Nest uses to make its connected home devices talk to each other, definitely isn't new. But as of ...

NAB joins global banks to design 'blockchain' protocols
National Australia Bank has joined 20 global global banks in a trial of technologies based on the "blockchain" that facilitates bitcoin transactions. ...

New attacks on Network Time Protocol can defeat HTTPS and create chaos
... or tamper with Bitcoin transactions, computer scientists warned Wednesday. The vulnerabilities reside in the N etwork Time Protocol , the widely ...

Case Keenum concussion challenges NFL protocol
Rams quarterback was obviously woozy after his head slammed the ground, but he never missed a play, leading to many questions for NFL

Terrence Jones returns to practice after passing concussion protocol
Rockets forward Terrence Jones returned to practice on Thursday after going through the NBA’s concussion protocol, saying he felt no loss of ...

'Routine,' 'standard,' and 'protocol' for police usually means overkill for black folks
A neighbor sees someone who may be breaking into a home. Civic-minded and filled with neighborly concern, the witness dials 911 and asks police ...

Mentor Graphics Veloce VirtuaLAB adds protocols for networking designs
Mentor Graphics has announced its Veloce VirtuaLAB Ethernet environment with support for 25Gb, 50Gb and 100Gb Ethernet. VirtuaLAB is Mentor Graphics' ...

Sea Change In Concussion Protocols For Youth Soccer
The most popular sport in the world is catching up to football and hockey in how it deals with concussions.

Apple motion against Ericsson could result in devaluation of wireless patent portfolios: protocols patent-ineligible ...
... could also be described as abstract concepts implemented with standard hardware. A full-text search in Apple's filing for the word "protocol" ...

Resources last updated: 11/24/2015 2:20:43 PM