ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Fereira <ja...@cornell.edu>
Subject Re: ClassCastException building SqlMap instance
Date Fri, 01 Apr 2005 11:44:07 GMT
At 07:16 PM 3/31/2005 -0600, Sasha Borodin wrote:
>Excerpt from sql-map-config.xml:
>
>     <dataSource type="DBCP">
>         <property name="JDBC.Driver"
>             value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
>
>
>The error persists whether or not I place the commons-dbcp, commons-pool,
>commons-collections, and the jdbc driver jars in server/lib.

In documentation I have read regarding using commons-dbcp it suggest 
putting the jar files in $TOMCAT_HOME/common/lib (not server/lib) *and* 
that you do not have your jdbc driver in the context lib directory 
(TOMCAT_HOME/webapps/CONTEXTNAME/WEB-INF/lib).

If you're looking for the library which contains the offending class here's 
a trick I use.  Go into the directories that your classloader will use to 
find jar files (common/lib, server/lib, etc).  If you're using using some 
version of unix run the bourne shell (/bin/sh) or bash and execute the 
following:

for name in *.jar
do
    echo LIBRARY: $name >> classlist
    jar tvf $name >> classlist
done


Now you can look in the classlist file and search for the class name that 
is causing the casting exception.  Scroll up until you find the name of the 
class which contains it.
John Fereira
jaf30@cornell.edu
Ithaca, NY


Mime
View raw message