com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting the nvarchar value 'NM21' to data type int.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Nick K
, 10 months ago
via Stack Overflow by Avi Flax
, 2 years ago
Conversion failed when converting date and/or time from character string.
via Stack Overflow by R. Ingle
, 4 months ago
Transaction (Process ID 129) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
via GitHub by denislepage
, 1 month ago
The column name 'comments' is specified more than once in the SET clause. A column cannot be assigned more than one value in the same SET clause. Modify the SET clause to make sure that a column is updated only once. If the SET clause updates columns of a view, then the column name 'comments' may appear twice in the view definition.
via Google Groups by Fabrice Bellingard, 4 months ago
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CS_AS" and "Latin1_General_CS_AS" in the equal to operation.
com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting the nvarchar value 'NM21' to data type int.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4853)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1781)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1034)
at undefined.PCServer.getProduct(PCServer.java:83)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
87 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.