I am a newbie to Struts. When I try to use the Oracle JDBC extension to take advantage of the Oracle batch update feature, I got an exception "org.apache.commons.dbcp.DelegatingPreparedStatement" It happens when I try to cast a PrepareStatement to OraclePreparedStatement. (It works fine without the cast)
Any idea why? Here is the code snippet: ServletContext context = servlet.getServletContext(); DataSource ds = (DataSource) context.getAttribute(Action.DATA_SOURCE_KEY); try { Connection conn = ds.getConnection(); String sql = "SELECT username FROM users"; OraclePreparedStatement ps = (OraclePreparedStatement) conn.prepareStatement(sql); ResultSet rset = ps.executeQuery(); ...... } catch ( Exception e ) { System.out.println( e.getMessage() ); } struts_config.xml: <data-sources> <data-source> <set-property property="driverClass" value="oracle.jdbc.OracleDriver"/> <set-property property="url" value="jdbc:oracle:thin:@hostname:1522:db"/> <set-property property="maxCount" value="5"/> <set-property property="minCount" value="1"/> <set-property property="user" value="xxx"/> <set-property property="password" value="xxx"/> </data-source> </data-sources> Thanks for any help! _______________________________________________ No banners. No pop-ups. No kidding. Introducing My Way - http://www.myway.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]