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

NPE in driver

2 views
Skip to first unread message

Jörg von Frantzius

unread,
Sep 14, 2005, 10:18:32 PM9/14/05
to
Hi,

I'm seeing the following problem:

java.lang.NullPointerException
at com.microsoft.jdbc.sqlserver.tds.TDSRPCParameter.initializeUserParam(Unknown Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatement.addUserParametersToRPC(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)

Do other people agree that this must entirely be a problem of the JDBC-driver?

Regards,
Jörg

Robert Klemme

unread,
Sep 15, 2005, 7:28:37 AM9/15/05
to

I would not agree without seeing your and the driver's source code. It
could well be that you provide a null parameter which then triggers the
NPE.

Kind regards

robert

Joe Weinstein

unread,
Sep 15, 2005, 12:27:36 PM9/15/05
to

Jörg von Frantzius wrote:

Yes. Even if your code is incorrect, there is very little excuse for a
driver throwing an NPE. If we can see your code, it will clear things
up. However, if the JDBC code is particularly bad, such as allowing
multiple threads to operate on a given Statement, then it is often
too costly and slow to protect a driver from that level of insult without
hurting it's performance under normal circumstances...
Joe

Jörg von Frantzius

unread,
Sep 29, 2005, 11:27:32 AM9/29/05
to
Robert Klemme schrieb:

Hm. If by "parameter" you mean a parameter to the PreparedStatement, why shouldn't it
be null if e.g. I want to insert NULL values? The only problem then could be a NOT
NULL constraint, but that should really look different I guess ;)

Regards,
Jörg

Jörg von Frantzius

unread,
Sep 29, 2005, 11:39:45 AM9/29/05
to
Jörg von Frantzius schrieb:

> Hm. If by "parameter" you mean a parameter to the PreparedStatement, why
> shouldn't it be null if e.g. I want to insert NULL values? The only
> problem then could be a NOT NULL constraint, but that should really look
> different I guess ;)

Maybe not for BLOB columns, at least that was the problem for someone else:
http://forums.versant.com/forums/main/viewthread?thread=984#

>
> Regards,
> Jörg

0 new messages