The forum will be down for maintenance at some point from Friday, August 24 at 19:00 EDT until Sunday, August 26 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

Hi,

We have an application using Sybase ASA 7 and we access the database from a Java JDBC connection. Occassionally we see a Null Pointer Exception being kicked out by the JDBC driver reporting something about a TDS error. The following is what is reported but we have no idea where to start looking. It is having a significant effect on our application:

java.lang.NullPointerException: 
Aug 31 09:43:51 2011:   at com.sybase.timedio.InStreamMgr.moreData(InStreamMgr.java)
Aug 31 09:43:51 2011:   at com.sybase.timedio.Dbio.doRead(Dbio.java)
Aug 31 09:43:51 2011:   at com.sybase.timedio.InStreamMgr.readIfOwner(InStreamMgr.java)
Aug 31 09:43:51 2011:   at com.sybase.timedio.InStreamMgr.doRead(InStreamMgr.java)
Aug 31 09:43:51 2011:   at com.sybase.tds.TdsProtocolContext.getChunk(TdsProtocolContext.java)
Aug 31 09:43:51 2011:   at com.sybase.tds.PduInputFormatter.readPacket(PduInputFormatter.java)
Aug 31 09:43:51 2011:   at com.sybase.tds.PduInputFormatter.read(PduInputFormatter.java)
Aug 31 09:43:51 2011:   at com.sybase.tds.TdsInputStream.read(TdsInputStream.java)
Aug 31 09:43:51 2011:   at com.sybase.tds.TdsInputStream.readUnsignedByte(TdsInputStream.java)
Aug 31 09:43:51 2011:   at com.sybase.tds.Tds.nextResult(Tds.java)
Aug 31 09:43:51 2011:   at com.sybase.jdbc.ResultGetter.nextResult(ResultGetter.java)
Aug 31 09:43:51 2011:   at com.sybase.jdbc.SybStatement.nextResult(SybStatement.java)
Aug 31 09:43:51 2011:   at com.sybase.jdbc.SybStatement.queryLoop(SybStatement.java)
Aug 31 09:43:51 2011:   at com.sybase.jdbc.SybCallableStatement.executeQuery(SybCallableStatement.java)
Aug 31 09:43:51 2011:   at com.sybase.jdbc.SybConnection.isClosed(SybConnection.java)
Aug 31 09:43:51 2011:   at powersoft.powerj.db.java_sql.Transaction.isConnected(Transaction.java)
Aug 31 09:43:51 2011:   at digtrack.digtrackpkg.TicketBean.getTicket(TicketBean.java)
Aug 31 09:43:51 2011:   at digtrack.digtrackpkg._sk_digtrackpkg_Ticket.invoke(_sk_digtrackpkg_Ticket.java:308)

Has anyone ever run into this before? It doesn't look like anything in our code that causes this. We call the DB out of a Java Jaguar (gulp) component.

asked 07 Sep '11, 08:56

Codecranker's gravatar image

Codecranker
481262838
accept rate: 0%

edited 07 Sep '11, 09:30

Siger%20Matt's gravatar image

Siger Matt
3.2k547199

From the stack trace, it seems that you're using jConnect and calling "Connection.isClosed()" from your code.

The error arises due to the fact that in order for the jConnect driver to execute the "isClosed()" functionality, it has issued a "SELECT" (against the jConnect metadata system information) on the SQL Anywhere database server. While reading from this internal result set, there was a NullPointerException thrown.


Support for SQL Anywhere 7 has been end-of-life'd, as has the support for jConnect 4.5/5.5 (which was the version of jConnect released with ASA 7), so your options to pursue this issue may be limited.

Which exact version of SQL Anywhere (dbsrv7 -v) are you using? Which version of jConnect?

(07 Sep '11, 13:55) Jeff Albion
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×136

question asked: 07 Sep '11, 08:56

question was seen: 1,140 times

last updated: 07 Sep '11, 13:56