Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle and IBM WSAD JDBC issue-HELP!

 
Russell Ray
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a DataAccessObject pattern. I discovered you can speed up your procesing with SELECT statments using an OraclePreparedStatment and setting defineColumnType; thereby reducing the number of trips the SQL is sent to the database.

Here is the code:

'ps' is a PreparedStatement.

However, at runtime, I am getting a class cast exception for the below reason. I am using WASD version 5.1.1. I was not aware IBM was using any specific classes in the JDBC drivers.


Could someone please explain this to me? Any help would be greatly appreciated.

Thanks in advance.

Russ

[edited so page doesn't scroll right]
[ May 24, 2005: Message edited by: Jeanne Boyarsky ]
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try with type casting you connection with oracleConenction and make sure that you have classes12.zip in your application classpath,


Shailesh
[ May 24, 2005: Message edited by: Shailesh Chandra ]
 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for offering a good suggestion. However, I did try it and it did not work. I am still getting the same error.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you tell me what is Data Source helper class Name in your data source configuration ?
This class should be com.ibm.websphere.rsadapter.OracleDataStoreHelper

did you try with java program and a thin driver connection.just try without any datasource and check if code is correct.

Shailesh
[ May 24, 2005: Message edited by: Shailesh Chandra ]
 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! The data source helper file is com.ibm.websphere.OracleDataStoreHelper. I think you are suggesting this should be changed, but to what? The only thing I see in the pulldown menu is ibm specific files for the different databases. Any suggestions?

Russ

Thank you again.........
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am not suggesting to change helper class rather i was confirming same.

did you check your code without datasource ?

Shailesh
 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much!!! I was not able to test the code until today. Getting an Oracle connection directly by not using the pooled DataSource proved the IBM class is not compatible with Oracle's suggestion.

I also noticed Oracle's suggestion was 15 millis slower than the current way we are executing the PreparedStatement.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I searched on google and after a quick search it sounds that we can not use oracleConnection while using websphere's data source.however we can do same with driver manager

Shailesh
 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for all your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic