| Author |
Migration from Oracle to Weblogic and CLOB ClassCastException
|
Muhammad Ijaz
Ranch Hand
Joined: Mar 03, 2009
Posts: 34
|
|
Dear All,
I am migrating a web application from Oracle OC4J to Weblogic 10.0.3.
In this application there are number of java files which uses the following piece of code and I can't change that:
I have deployed the application on Weblogic Application Server. But when I run the application, it gives me the following exception:
I need to resolve the above problem..
Any help will be highly appreciated
Regards,
Pomy
|
IBM Certified WebSphere Commerce Application Developer
|
 |
Marcos Maia
Ranch Hand
Joined: Jan 06, 2001
Posts: 977
|
|
Are you using the same Oracle driver for weblogic as used in OC4J ?
[]s
|
 |
Muhammad Ijaz
Ranch Hand
Joined: Mar 03, 2009
Posts: 34
|
|
Thanks for your response...
Yes I am using the same driver for weblogic as used in OC4J
|
 |
Muhammad Ijaz
Ranch Hand
Joined: Mar 03, 2009
Posts: 34
|
|
Any help please......
Regards,
Pomy
|
 |
Marcos Maia
Ranch Hand
Joined: Jan 06, 2001
Posts: 977
|
|
Muhammad Ijaz wrote:Any help please......
Regards,
Pomy
Hi,
I would give a try for specific weblogic drivers:
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jdbc_admin/third_party_drivers.html
If this doesn't work I would try latest version of official Oracle driver!
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
Have you tryied this? This might be an incompatibility between JVM and driver version so I believe it's worth it trying new drivers.
regards.
|
 |
Muhammad Ijaz
Ranch Hand
Joined: Mar 03, 2009
Posts: 34
|
|
Dear Marcos,
I have tried using ojdbc5, ojdbc6 and classess12 but with the same result. I am stuck with the problem. I have googled a lot but in vein. In some posts I got the idea to use weblogic.jdbc.vendor.oracle.OracleThinClob. But there is no package or class like mentioned in bold, available in weblogic.jar that I get from WEBLOGIC_HOEM/lib. I have downloaded weblogic 10.3 two times but still got no solution. weblogic.jar does not contain weblogic.jdbc.vendor.oracle.OracleThinClob.
Any idea please...
Regards,
Pomy
|
 |
Muhammad Ijaz
Ranch Hand
Joined: Mar 03, 2009
Posts: 34
|
|
I have also read about using weblogic.jdbc.common.OracleClob to write unicode data but I do not find this package within the weblogic.jar
Regards,
Pomy
|
 |
Marcos Maia
Ranch Hand
Joined: Jan 06, 2001
Posts: 977
|
|
Hi,
Have you tryied the way showed on the following link: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jdbc/thirdparty.html#wp1045809
[]s
|
 |
Muhammad Ijaz
Ranch Hand
Joined: Mar 03, 2009
Posts: 34
|
|
I have been able to resolve the problem. I have typecast the ResultSet to WLS ResultSet, then using WLS ResultSet I got the Vendor Specific OracleReslutSet from WLS ResultSet method
getVendorObj() as in the following:
Now using oracleResultSet I am able to use OracleResultSet.getCLOB(clobColumn);
The main problem was that where is the weblogic.jdbc.wrapper package. I found it in
WLS_HOME/modules/com.bea.core.datasource_1.4.0.0.jar.
OracleThinClob is also present in the above mentioned jar file, but I didn't use it as I have already resolved the problem by typecasting the ResultSet.
I am really very grateful to you for spending your precious time for helping me
Regards,
Pomy
|
 |
 |
|
|
subject: Migration from Oracle to Weblogic and CLOB ClassCastException
|
|
|