Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update and Insert do not work after migrating to WebSphere 7.0 from WebSphere 6.1

 
Ravinder Rao
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a method written in java to execute the SQL statment for INSERT,UPDATE and DELETE modes. This was working on WebSphere 6.1 and after upgrading to WebSphere 7.0 it stopped working.

Below is my code :



Below is my Error stack trace :

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

There was an error updating the admin table. Please check the data for errors and format. com.microsoft.sqlserver.jdbc.SQLServerException: Cannot update identity column 'PRODUCT_ID'.com.microsoft.sqlserver.jdbc.SQLServerException: Cannot update identity column 'PRODUCT_ID'.

This appears to be the error. Did you update your database or jdbc driver when you upgraded WebSphere? Because this error doesn't appear to be related to the version of WAS.
 
Ravinder Rao
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes the drivers are upgraded.
 
Ravinder Rao
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what i get when i do a test run in admin console

[10/2/12 12:21:13:146 GMT-06:00] 0000003b DSConfigurati I DSRA8203I: Database product name : Microsoft SQL Server
[10/2/12 12:21:13:147 GMT-06:00] 0000003b DSConfigurati I DSRA8204I: Database product version : 9.00.3205
[10/2/12 12:21:13:147 GMT-06:00] 0000003b DSConfigurati I DSRA8205I: JDBC driver name : Microsoft SQL Server JDBC Driver 3.0
[10/2/12 12:21:13:147 GMT-06:00] 0000003b DSConfigurati I DSRA8206I: JDBC driver version : 3.0.1301.101
[10/2/12 12:21:13:148 GMT-06:00] 0000003b DSConfigurati I DSRA8025I: Successfully connected to DataSource.

But my Websphere variables is pointed to JDBC Driver 4.0

MICROSOFT_JDBC_DRIVER_PATH C:\Program Files (x86)\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu

MICROSOFT_JDBC_DRIVER_NATIVEPATH C:\Program Files (x86)\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x86
 
Paul Clapham
Sheriff
Pie
Posts: 20964
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So your configuration is not working the way you expected. Go into the administration console and review how you have your data sources configured. (Also review your code to make sure it actually uses the data sources, instead of accessing a JDBC driver which gets installed in your application's WEB-INF/lib directory.)
 
Ravinder Rao
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i use the latest sqljdbc4.jar i get the below error when testing to connect to a database responsible for authentication.

[10/4/12 11:47:27:201 GMT-06:00] 0000001d SystemErr R java.sql.SQLException: SQL Server version 8 is not supported by this driver. ClientConnectionId:3908e14b-5db1-444a-8779-2fa400ec6ec0DSRA0010E: SQL State = 08S01, Error Code = 0
 
Ravinder Rao
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved it by using http://jtds.sourceforge.net/ . This works with both SQL Server and Sybase. The issue i was having is that my application uses both MS SQL Server 2000 and 2008. sqljdbc4.jar is good for later but not former. Using jtds1.2.6.jar and updating driver string resolved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic