Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NullPointerException while executing a query.

10 views
Skip to first unread message

sadhiesh

unread,
May 16, 2003, 2:45:29 AM5/16/03
to

Environment I use ::

SYBASE SQL Anywhere Studio 8.0.2
DB driver :: jConnect for JDBC Version 4.5 and 5.5, EBF 9689
Os :: In any os

Summary ::

When i execute the query from myn application i get this exception
often, But i donot know the procedure to reproduce that nor the proper
reason for it. Kindly anyone of you out there could help me out.

================================================================================

java.lang.NullPointerException
at
com.sybase.jdbc2.tds.CurInfoToken.<init>(CurInfoToken.java:49)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1843)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGette-
r.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
.java:201)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
.java:182)
at
at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatemen-
t.java:1462)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
SybPreparedStatement.java:88)
at

================================================================================


java.lang.NullPointerException
at com.sybase.jdbc2.tds.CurInfoToken.<init>(CurInfoToken.java:49)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1908)
at
com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
.java:201)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
.java:182)
at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.-
java:1455)
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.-
java:1440)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPrepa-
redStatement.java:70)

================================================================================


Second issue or excception is ::

11:00:20:831 TOPO: SQLException :
com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -306: Deadlock
detected at:
com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -306: Deadlock
detected
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2415)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1851)
at com.sybase.jdbc2.tds.TdsResultSet.nextResult(TdsResultSet-
.java:485)
at com.sybase.jdbc2.tds.TdsResultSet.next(TdsResultSet.java:298)
at
com.sybase.jdbc2.jdbc.SybResultSet.next(SybResultSet.java:136)

--
Posted via http://dbforums.com

Nick Elson

unread,
May 16, 2003, 6:24:54 PM5/16/03
to
Is it possible that your are just be you are getting a deadlocking issue and
not
recovering in your application code?

ASA Error -306: Deadlock detected at: com.sybase.jdbc2.jdbc.SybSQLException:
ASA Error -306: Deadlock
detected

Since that seems to be affecting you on your result set retrieving thread,
the cursor
is possibly just another element of being the deadlock victim.


I would look into your deadlock problem in more detail. sa_locks,
sa_conn_info
and request level logging my help you narrow down your
SQL/Schema/order-of-operations
problems here.


"sadhiesh" <membe...@dbforums.com> wrote in message
news:2885903.1...@dbforums.com...

sadhiesh

unread,
May 17, 2003, 12:42:34 AM5/17/03
to

Dear Nick,

thanks for your posting. But both the issues are independent. They do
not occur at same times. I get the NPE often than thedead ock. But i
could not figure that out.

-; S ;-

Originally posted by Nick Elson

> Is it possible that your are just be you are getting a deadlocking
> issue and
> not
> recovering in your application code?
>
> ASA Error -306: Deadlock detected at:
> com.sybase.jdbc2.jdbc.SybSQLException:
> ASA Error -306: Deadlock
> detected
>
> Since that seems to be affecting you on your result set
> retrieving thread,
> the cursor
> is possibly just another element of being the deadlock victim.
>
>
> I would look into your deadlock problem in more detail. sa_locks,
> sa_conn_info
> and request level logging my help you narrow down your
> SQL/Schema/order-of-operations
> problems here.
>
>

> "sadhiesh" wrote in message
> news:2885903.1...@dbforums.com"]news:2885903.1053067529@d-
> bforums.com[/url]...


> > Environment I use ::
> > SYBASE SQL Anywhere Studio 8.0.2
> > DB driver :: jConnect for JDBC Version 4.5 and 5.5, EBF
> 9689
> > Os :: In any os
> > Summary ::
> > When i execute the query from myn application i get this
> exception
> > often, But i donot know the procedure to reproduce that nor the
> proper
> > reason for it. Kindly anyone of you out there could help me
> out.
> ============================================================================

> ====
> > java.lang.NullPointerException
> > at
> > com.sybase.jdbc2.tds.CurInfoToken.(CurInfoToken.java:49-


> )
> > at
> com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1843)
> > at
> com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGette-
> > r.java:69)
> > at
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
> > .java:201)
> > at
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
> > .java:182)
> > at

> > at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(Syb-


> Statemen-
> > t.java:1462)
> > at
> com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate
> > SybPreparedStatement.java:88)
> > at
> ============================================================================

> ====
> > java.lang.NullPointerException
> > at
> com.sybase.jdbc2.tds.CurInfoToken.(CurInfoToken.java:49)
> > at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1908)
> > at
> > com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.-


> java:69)
> > at
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
> > .java:201)
> > at
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement-
> > .java:182)
> > at
> com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.-
> > java:1455)

> > at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybState-
> ment.-
> > java:1440)
> > at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(-
> SybPrepa-
> > redStatement.java:70)
> ============================================================================

> ====
> > Second issue or excception is ::
> > 11:00:20:831 TOPO: SQLException :
> > com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -306:
> Deadlock
> > detected at:
> > com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -306:
> Deadlock
> > detected
> > at
> com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2415)
> > at
> com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1851)
> > at
> com.sybase.jdbc2.tds.TdsResultSet.nextResult(TdsResultSet-
> > .java:485)

> > at com.sybase.jdbc2.tds.TdsResultSet.next(TdsResultSet.-
> java:298)
> > at
> > com.sybase.jdbc2.jdbc.SybResultSet.next(SybResultSet.ja-


> va:136)
> > --
> Posted via

http://dbforums.com/http://dbforums.com

Nick Elson

unread,
May 20, 2003, 6:35:46 PM5/20/03
to
I suspect it is best to leave the deadlocking for another thread then ...


As to the stack traces your are getting . . .

There was one report of a very similar stack trace being cause by a computer
virus.
You might want to do some scanning for that possibility. You should also
test
this from another (hopefully clean) machine for comparison.

Unforturnately I don't have any details if the virus in question affected
the
JVM or the dbsrv8 process, so switchin machines for the server part
(and scanning the original server machine too) is also be worth doing too.

This could also be due to a TDS token error. Triple check the behaviour
against dbisqlC [and if you have it Open Client CT-ISQL] to help identify
the underlying nature of this more clearly.

Otherwise we just don't see this routine failing often, so doing a complete
reinstallation may be called for. One common source of problems for
those running 8.0.2 ebf is when one applies just the 8.0.2 maintenance
release over top of an already ebf'ed 8.0.1 (or applying an 8.0.2 ebf
over top of an 8.0.1 installation without going through the maintenance
release first). Sometime the Java Jars do not get recognized so applying
the most recent 8.0.2 ebf or reinstalling 8.0.1 without ebf that and then
upgrading to 8.0.2 (and any ebfs) usually clears up unusual behaviour
like this.

"sadhiesh" <membe...@dbforums.com> wrote in message

news:2890098.1...@dbforums.com...

0 new messages