RE: DelegatingCallableStatement.getInnermostDelegate() -- NoSuchMethodError

2008-03-17 Thread Jim Garrison

 -Original Message-
 From: Phil Steitz [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 15, 2008 5:09 PM
 To: Tomcat Users List
 Subject: Re: DelegatingCallableStatement.getInnermostDelegate() --
 NoSuchMethodError
 
 This looks like a signature from dbcp 1.1.  Are you sure you used dbcp
 1.2+ when you compiled the classes below?  In dbcp 1.1,
 getInnermostDelegate is implemented in DelegatingCallableStatement and
 it returns a CallableStatement.  In 1.2, inheritance is as you
 describe and this method returns a Statement (which you need to cast
 to CallableStatement).

That was it.  That was also the one possibility I hadn't considered :-)
Thanks for the assistance.

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]



Re: DelegatingCallableStatement.getInnermostDelegate() -- NoSuchMethodError

2008-03-15 Thread Phil Steitz
On Fri, Mar 14, 2008 at 5:03 PM, Jim Garrison [EMAIL PROTECTED] wrote:

  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
  

DelegatingCallableStatement.getInnermostDelegate() -- NoSuchMethodError

2008-03-14 Thread Jim Garrison

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

Re: DelegatingCallableStatement.getInnermostDelegate() -- NoSuchMethodError

2008-03-14 Thread Martin Gainty
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

RE: DelegatingCallableStatement.getInnermostDelegate() -- NoSuchMethodError

2008-03-14 Thread Caldarale, Charles R
 From: Jim Garrison [mailto:[EMAIL PROTECTED] 
 Subject: DelegatingCallableStatement.getInnermostDelegate() 
 -- NoSuchMethodError
 
 I've examined the commons-dbcp-1.2.1.jar file that's 
 in the classpath

What do you mean by classpath?  The CLASSPATH environment variable
must NEVER be set for Tomcat (nor should it be used for any other Java
application, these days), and the command line -cp argument should not
contain any additional jars beyond those set by the Tomcat startup
scripts.  Any jars needed by specific webapps should be in that webapp's
WEB-INF/lib directory (or possibly in shared/lib, if absolutely
necessary).

Note that Tomcat includes its own renamed version of commons-dbcp to
support container-managed DB connection pools; why aren't you using
Tomcat's built-in facility, rather than rolling your own?

 this is running in BusinessObjects' Tomcat 5.0 server

Also note that Tomcat 5.0 is no longer actively supported, having been
supplanted by 5.5 and 6.0.  Since this is a repackaged, unsupported
version of Tomcat, you should discuss the problem with the Business
Objects support group.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]