• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

java.lang.ClassCastException: $Proxy0 cannot be cast to oracle.jdbc.OracleConnection

 
Ranch Hand
Posts: 48
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to call a stored proc having table type IN and OUT parameter using jdbc.

When I tried as a standalone program I am not having any issues. Once I deployed the code in Tomcat, the below esxception is thrown

java.lang.ClassCastException: $Proxy0 cannot be cast to oracle.jdbc.OracleConnection
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:160)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:128)


on executing this line of code,



Upon analysis I found that the connection object I get here is of type,oracle.jdbc.driver.T4CConnection. But as per the code it expects a oracle.jdbc.OracleConnection.
I tried adding the ojdbc6.jar in tomcat/lib/common folder as suggested in few forums but did not help.

Please suggest a feasible solution.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic