This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 209296 - NullPointerException at com.microsoft.sqlserver.jdbc.IntColumnFilter.apply
Summary: NullPointerException at com.microsoft.sqlserver.jdbc.IntColumnFilter.apply
Status: RESOLVED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
: 250169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-08 06:02 UTC by jhintsanen
Modified: 2015-02-04 18:23 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 153263


Attachments
stacktrace (2.77 KB, text/plain)
2012-03-08 06:02 UTC, jhintsanen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jhintsanen 2012-03-08 06:02:44 UTC
Build: NetBeans IDE 7.1.1 (Build 201203012225)
VM: Java HotSpot(TM) Client VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08
OS: Windows 7

User Comments:
jhintsanen: Try to open Procedures folder in SQL Server 2008 database using Netbeans IDE Databases view.

GUEST: Listing procedures for SQL Server Database

tboudreau: Scrolling SQL Command window.

Bug is probably in the SQL Server 2005 module, but if you're going to call foreign code, probably such things should be handled more gracefully.




Stacktrace: 
java.lang.NullPointerException
   at com.microsoft.sqlserver.jdbc.IntColumnFilter.apply(IntColumnFilter.java:2154)
   at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:114)
   at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:1982)
   at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:1967)
   at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2219)
   at org.netbeans.modules.db.metadata.model.jdbc.JDBCValue.createProcedureValue(JDBCValue.java:80)
Comment 1 jhintsanen 2012-03-08 06:02:46 UTC
Created attachment 116447 [details]
stacktrace
Comment 2 Libor Fischmeistr 2014-01-08 09:46:15 UTC
Probably problem of the JDBC driver. Tried with the latest one and it works for me.
Comment 3 matthias42 2015-02-04 11:51:22 UTC
*** Bug 250169 has been marked as a duplicate of this bug. ***
Comment 4 matthias42 2015-02-04 12:01:15 UTC
Ok - last evening I browsed the entire AdventureWorks Database for SQL Server 2008 and could not reproduce the problem.

I suspect this is a problem with the driver. Which brings us to the questions:

- Can you please state the version of the server you are using
- Can you please state the version of the driver you are using (and if there are both: are you using sqljdbc.jar or sqljdbc4.jar)

Both informations are available from the connection properties, as:

Driver version
Driver name
Database product name
Database product version

I now looked at the disassembly of the code and for the 2005 and 2012 version of the driver the method "apply" from IngColumnFilter starts later in the code.
Comment 5 matthias42 2015-02-04 18:23:47 UTC
Ok - you don't need to report the version - I could reproduce the problem when using the:

MICROSOFT SQL SERVER JDBC DRIVER 2.0

This thing is _ancient_ - I used the 3.0 version years ago and the current version is 4.1. So closing this again with the advice to the current users to use a current driver.

Feel free to Reopen this, if you can reproduce with a newer driver (current) version.

Just as a documentation:

The problematich download: http://www.microsoft.com/de-de/download/details.aspx?id=2505

The found exception is identical.