• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Migration from Oracle to Weblogic and CLOB ClassCastException

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using the same Oracle driver for weblogic as used in OC4J ?

[]s
 
Muhammad Ijaz
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response...

Yes I am using the same driver for weblogic as used in OC4J
 
Muhammad Ijaz
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any help please......

Regards,
Pomy
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic