Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to cast preparestatement of weblogic6.1 to oracleprpepared statement

 
Saravanan Alagu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Group,

Am facing typical problem in casting prepared statement to oracleprepared statement. Inorder to provide multilingual support in one of our project, we followed the database type conversion for unicode support (changing varchar2 to nvarchar2). I guess setFormOfUse() in oracle prepared statement have to be used for any inserts in column of type NVARCHAR2. My application is running in weblogic6.1 and uses oracle thin driver. In code, when prepared statement is casted to oraclepreparedstatement classcastexception is thrown. Looks like weblogic8.1 supports this conversion. Any idea how to eliinate this issue in weblogic6.1.

Thanks in advance
 
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The weblogic version difference is a misnomer. You are getting a class cast exception because it isn't an Oracle prepared statement.

Why would that be?

1) Perhaps the use of different driver?

2) Check what other environment aka classpath differences there are between the one that works and the one that doesn't.
 
Saravanan Alagu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Looks like no issue in classpath. Probably choice of driver could be different for oracle extension classes. I put mmy question this way, how do i use oracle extension classes in weblogic6.1 to insert unicode characters. Your suggestion is very much valuable and appreciated.

Thanks
Saran
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the days of Weblogic 6.1, BEA provided their own Oracle Driver. ie you are trying to cast the BEA driver to an Oracle driver, and this is not going to work.
 
Saravanan Alagu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David

Do you know how this will work? If i use JDriver in weblogic, will it solve the problem.

Thanks
Saran
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure, unfortunately.
I'm sure we were using the (oracle provided) Oracle driver at one stage, but I can't remember what we needed to change.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic