During a call of stored procedure through DBCP there is a mistake of
reduction of type:
java.lang.ClassCastException
server.xml
factory
org.apache.commons.dbcp.BasicDataSourceFactory
maxWait
5000
maxActive
10
username
IcIDB
password
IcIDB
url
jdbc:oracle:thin:@10.1.33.99:1521:ORATEST0
driverClassName
oracle.jdbc.OracleDriver
maxIdle
2
web.xml
http://java.sun.com/dtd/web-app_2_3.dtd";>
LoginIcIDB
action
org.apache.struts.action.ActionServlet
config
/WEB-INF/struts-config.xml
debug
2
application
ApplicationResources
2
debugjsp
Added to compile JSPs with debug info
org.apache.jasper.servlet.JspServlet
classdebuginfo
true
3
action
*.do
debugjsp
*.jsp
/WEB-INF/struts-bean.tld
/WEB-INF/struts-bean.tld
/WEB-INF/struts-html.tld
/WEB-INF/struts-html.tld
/WEB-INF/struts-logic.tld
/WEB-INF/struts-logic.tld
/WEB-INF/struts-template.tld
/WEB-INF/struts-template.tld
/WEB-INF/struts-tiles.tld
/WEB-INF/struts-tiles.tld
/WEB-INF/struts-nested.tld
/WEB-INF/struts-nested.tld
http://java.sun.com/jstl/core
/WEB-INF/c.tld
http://java.sun.com/jstl/core_rt
/WEB-INF/c-rt.tld
http://java.sun.com/jstl/xml
/WEB-INF/x.tld
http://java.sun.com/jstl/xml_rt
/WEB-INF/x-rt.tld
http://java.sun.com/jstl/fmt
/WEB-INF/fmt.tld
http://java.sun.com/jstl/fmt_rt
/WEB-INF/fmt-rt.tld
http://java.sun.com/jstl/sql
/WEB-INF/sql.tld
http://java.sun.com/jstl/sql_rt
/WEB-INF/sql-rt.tld
IcIDBLnk
javax.sql.DataSource
Container
Class of returning of connection from a pool.
public class OraConnection {
/ **
* The empty designer of a class
*/
public OraConnection () {
}
/ **
* Mетод returning the established connection
* @param dataSourceName String - the name of resource JNDI (as a rule
links to a global resource in a context of the application)
* @param attemptCnt int - кол-in attempts to establish connection
* @param timeDelay long - time between attempts to establish connection
* @return Connection - returned connection
*/
public Connection getConnection (String dataSourceName, int attemptCnt,
long timeDelay) {
Connection con=null;
try {
// Initialization of a context and search of a context of resources:
components and an environment
Context init = new InitialContext ();
Context ctx = (Context) init.lookup ("java:comp/env");
// Return of parameters of a data set by results of search of a
resource with a name dataSourceName
DataSource dataSource = (DataSource) ctx.lookup (dataSourceName);
int curAttemptNum=0;
// Attempts to open connection
while (con == null ** curAttemptNum