Jim http://commons.apache.org/dbcp/apidocs/org/apache/commons/dbcp/DelegatingSta tement.html#getInnermostDelegate() I would check to make sure you have (at least version( 1.21 DBCP e.g. commons-dbcp-1.2.1.jar
Martin- ----- Original Message ----- From: "Jim Garrison" <[EMAIL PROTECTED]> To: "Tomcat Users List" <users@tomcat.apache.org> Sent: Friday, March 14, 2008 7:03 PM Subject: DelegatingCallableStatement.getInnermostDelegate() -- NoSuchMethodError I'm getting a NoSuchMethodError on org.apache.commons.dbcp.DelegatingCallableStatement.getInnermostDelegate (). AFAICT DelegatingCallableStatement inherits ultimately from DelegatingStatement, which DOES have such a method. I've examined the commons-dbcp-1.2.1.jar file that's in the classpath, and the inheritance hierarchy looks OK and there IS a getInnermostDelegate() method on DelegatingStatement. Since this is running in BusinessObjects' Tomcat 5.0 server I thought there might be a classloader problem. I printed out the classloaders at the point where the error happens, but the debugging output seems to indicate that everything should work -- but I still get the exception. I can't really post an SSCCE as this is buried in a much larger system that runs only under Tomcat. Source Fragment =============== import java.sql.*; import org.apache.commons.dbcp.DelegatingCallableStatement; . . . PreparedStatement stmt; . . . protected void executeStatement() throws SQLException { if ( TPMonitor.TYPE_ORACLE == TPMonitor.getInstance().getDBType() ) { System.out.println("DBTYPE: ORA"); System.out.println("stmt CLASS: " + stmt.getClass().getName()); System.out.println("stmt LOADER: " + stmt.getClass().getClassLoader().toString()); DelegatingCallableStatement dcs = (DelegatingCallableStatement) stmt; System.out.println("dcs CLASS: " + dcs.getClass().getName()); System.out.println("dcs LOADER: " + dcs.getClass().getClassLoader().toString()); Statement cs = dcs.getInnermostDelegate(); The above statement throws the following exception: java.lang.NoSuchMethodError: org.apache.commons.dbcp.DelegatingCallableStatement.getInnermostDelegate ()Ljava/sql/CallableStatement; Debugging Output ================ DBTYPE: ORA stmt CLASS: org.apache.commons.dbcp.DelegatingCallableStatement stmt LOADER: StandardClassLoader delegate: true repositories: file:C:\Program Files\Business Objects\Tomcat\common\classes\ file:C:\Program Files\Business Objects\Tomcat\common\endorsed\xalan.jar file:C:\Program Files\Business Objects\Tomcat\common\endorsed\xercesImpl.jar file:C:\Program Files\Business Objects\Tomcat\common\endorsed\xml-apis.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\ant-launcher.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\ant.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-collections-2.1.1.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-dbcp-1.2.1.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-el.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-pool-1.2.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\jasper-compiler.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\jasper-runtime.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\jsp-api.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-common.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-factory.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-java.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-resources.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\ojdbc14.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\servlet-api.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\sqljdbc.jar ----------> Parent Classloader: [EMAIL PROTECTED] dcs CLASS: org.apache.commons.dbcp.DelegatingCallableStatement dcs LOADER: StandardClassLoader delegate: true repositories: file:C:\Program Files\Business Objects\Tomcat\common\classes\ file:C:\Program Files\Business Objects\Tomcat\common\endorsed\xalan.jar file:C:\Program Files\Business Objects\Tomcat\common\endorsed\xercesImpl.jar file:C:\Program Files\Business Objects\Tomcat\common\endorsed\xml-apis.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\ant-launcher.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\ant.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-collections-2.1.1.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-dbcp-1.2.1.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-el.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\commons-pool-1.2.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\jasper-compiler.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\jasper-runtime.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\jsp-api.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-common.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-factory.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-java.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\naming-resources.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\ojdbc14.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\servlet-api.jar file:C:\Program Files\Business Objects\Tomcat\common\lib\sqljdbc.jar ----------> Parent Classloader: [EMAIL PROTECTED] java.lang.NoSuchMethodError: org.apache.commons.dbcp.DelegatingCallableStatement.getInnermostDelegate ()Ljava/sql/CallableStatement; at com.troux.reportingData.impactAnalysis.AssetAnalysisResultQuery.executeS tatement(AssetAnalysisResultQuery.java:135) at com.troux.servercommon.db.TPDBCalls.doTry(TPDBCalls.java:40) at com.troux.servercommon.db.TPHelperBase.doATry(TPHelperBase.java:160) at com.troux.servercommon.db.TPQuerier.doATry(TPQuerier.java:79) at com.troux.servercommon.db.TPHelperBase.handleDatabaseAccess(TPHelperBase java:207) at com.troux.servercommon.db.TPHelperBase.handleDatabaseAccess(TPHelperBase java:188) at com.troux.reportingData.impactAnalysis.AssetAnalysisResultGenerator.gene rateResults(AssetAnalysisResultGenerator.java:46) at com.troux.reportingData.impactAnalysis.AssetAnalyzerImpl.generateResults (AssetAnalyzerImpl.java:24) at com.troux.reportingData.impactAnalysis.AssetAnalysisServlet.processReque st(AssetAnalysisServlet.java:121) at com.troux.reportingData.impactAnalysis.AssetAnalysisServlet.doGet(AssetA nalysisServlet.java:140) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:237) etc, etc. IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]