Topic
  • 8 replies
  • Latest Post - ‏2013-11-29T09:29:28Z by 60MV_Vikash_Singh
SystemAdmin
SystemAdmin
37422 Posts

Pinned topic Facing error while trying to execute stored procedure from JSF Application

‏2013-03-04T15:23:59Z |
Hi, I am facing the below error when I try to execute a stored Procedure from JSF application which is deployed on WAS 7.0

=2013-03-04 19:06:58,550 INFO http://com.lloydstsb.iw.util.DBUtils - DBUtils : executeFileNetStoredProc method started..
=2013-03-04 19:11:58,271 ERROR http://com.lloydstsb.iw.dao.FileNetCustomDBSynchDAOImpl - Data Access Exception
com.lloydstsb.iw.common.exceptions.DataAccessException: Data Access Exception Occured : Integration Stored Proc- java.sql.SQLException: java.lang.ClassCastException: oracle.jdbc.driver.LogicalConnection incompatible with oracle.jdbc.OracleConnection
at com.lloydstsb.iw.util.DBUtils.executeFileNetStoredProc(DBUtils.java:959)
at com.lloydstsb.iw.util.DAOUtil.executeFileNetStoredProc(DAOUtil.java:117)
at com.lloydstsb.iw.dao.FileNetCustomDBSynchDAOImpl.updateFileNetDetailsCustomDB(FileNetCustomDBSynchDAOImpl.java:36)
at com.lloydstsb.iw.servlet.IndexServlet.service(IndexServlet.java:127)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

The oracle version we are using is 11g.
Previously it worked fine when the application was used in 10g.

Can someone please help me in resolving this issue?

Kiran
Updated on 2013-03-06T14:08:11Z at 2013-03-06T14:08:11Z by SystemAdmin
  • bpaskin
    bpaskin
    4282 Posts

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-03-04T17:21:49Z  
    Hi,

    Are you using a DB Provider and Datasource? If so, you may want to check the DB Provider setup.

    Regards,
    Brian
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-03-05T10:52:27Z  
    • bpaskin
    • ‏2013-03-04T17:21:49Z
    Hi,

    Are you using a DB Provider and Datasource? If so, you may want to check the DB Provider setup.

    Regards,
    Brian
    Hi Brian,

    Thanks for your response.

    I found that ojdbc14.jar file is not compatible with oracle 11g which is being used by the application.
    I changed the jar file from ojdbc14.jar to ojdbc5.jar but with no luck. I am still facing the problem.

    Is there somewhere that the jar files in the application and WAS are clashing or something like that?

    Thanks in advance.

    Kiran
  • bpaskin
    bpaskin
    4282 Posts

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-03-05T12:24:36Z  
    Hi Brian,

    Thanks for your response.

    I found that ojdbc14.jar file is not compatible with oracle 11g which is being used by the application.
    I changed the jar file from ojdbc14.jar to ojdbc5.jar but with no luck. I am still facing the problem.

    Is there somewhere that the jar files in the application and WAS are clashing or something like that?

    Thanks in advance.

    Kiran
    Hi,

    Are you using a JDBC Provider and Datasource or are you making the calls directory from code?

    Brian
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-03-05T14:47:14Z  
    • bpaskin
    • ‏2013-03-05T12:24:36Z
    Hi,

    Are you using a JDBC Provider and Datasource or are you making the calls directory from code?

    Brian
    Yes Brian.

    I am using JDBC Provider and DataSource.

    Kiran
  • bpaskin
    bpaskin
    4282 Posts

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-03-05T15:47:40Z  
    Yes Brian.

    I am using JDBC Provider and DataSource.

    Kiran
    Most likely this is a classloader issue. The application or somewhere in the classpath there is loading the incorrect classes. Turn on verbose class loading and see where the Oracle classes are being loaded.

    Brian
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-03-06T14:08:11Z  
    • bpaskin
    • ‏2013-03-05T15:47:40Z
    Most likely this is a classloader issue. The application or somewhere in the classpath there is loading the incorrect classes. Turn on verbose class loading and see where the Oracle classes are being loaded.

    Brian
    Hi Brian,

    Thanks for your help.
    The issue got resolved by removing the ojdbc jars from the application as they were already referenced by WAS.

    Kiran
  • Rajkr
    Rajkr
    1 Post

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-04-17T17:58:45Z  
    Hi Brian,

    Thanks for your help.
    The issue got resolved by removing the ojdbc jars from the application as they were already referenced by WAS.

    Kiran

    Kiran ,

    I am having the same issue . We are migrating from WAS6 to WAS7 . we have included the ojdbc6.jar that is compatible with our new environment . Still i get the same ClassCast exception .   

    If you have removed ojdbc jars from your application , how did you resolve the references for those classes in your application . Please note we are creating arraydescriptor(Oracle.sql.ArrayDescriptor) and finally an array(oracle.sql.Array) Type is being passed to the stored procedure execution .

     

    The array will have  (arrayDescriptor , Connection, applicationObject)

    Any help in this regard is much appreciated .

  • 60MV_Vikash_Singh
    60MV_Vikash_Singh
    1 Post

    Re: Facing error while trying to execute stored procedure from JSF Application

    ‏2013-11-29T09:29:28Z  
    • Rajkr
    • ‏2013-04-17T17:58:45Z

    Kiran ,

    I am having the same issue . We are migrating from WAS6 to WAS7 . we have included the ojdbc6.jar that is compatible with our new environment . Still i get the same ClassCast exception .   

    If you have removed ojdbc jars from your application , how did you resolve the references for those classes in your application . Please note we are creating arraydescriptor(Oracle.sql.ArrayDescriptor) and finally an array(oracle.sql.Array) Type is being passed to the stored procedure execution .

     

    The array will have  (arrayDescriptor , Connection, applicationObject)

    Any help in this regard is much appreciated .

    Hi Rajkr

    I am facing the same thing. Did you get any solution. If so please mail me at may email id - bigviky@gmail.com

    Thanks

    Vikash