ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sasha Borodin <sa...@whoissasha.com>
Subject Re: ClassCastException building SqlMap instance
Date Fri, 01 Apr 2005 01:16:50 GMT
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.
 
Thanks for looking at this.

-Sasha

> From: Brandon Goodin <brandon.goodin@gmail.com>
> Reply-To: <ibatis-user-java@incubator.apache.org>
> Date: Thu, 31 Mar 2005 18:09:02 -0700
> To: <ibatis-user-java@incubator.apache.org>
> Subject: Re: ClassCastException building SqlMap instance
> 
> What are you using for your datasource?
> 
> Brandon
> 
> 
> On Thu, 31 Mar 2005 18:32:57 -0600, Sasha Borodin <sasha@whoissasha.com>
> wrote:
>> I've written some classes that employ the iBatis framework for data access.
>> All patterns used are identical to the iBatis JPetStore example (DaoManager,
>> SqlMaps, a "service" class which abstracts all this, etc.)
>> 
>> These classes work great when accessed from a Tomcat web application.  But I
>> ran into problems using these classes in a custom Realm for Tomcat.  These
>> are the errors I'm getting when the class loader initializes everything on
>> Tomcat startup:
>> 
>> Caused by: java.lang.RuntimeException: Could not initialize BrokerDaoConfig.
>> Cause:  com.ibatis.dao.client.DaoException: Error while configuring
>> DaoManager.  Cause: com.ibatis.sqlmap.client.SqlMapException: There was an
>> error while building the SqlMap instance.
>> --- The error occurred in the SQL Map Configuration file.
>> --- The error occurred while configuring the data source.
>> --- Check the data source type or class.
>> --- Cause: com.ibatis.sqlmap.client.SqlMapException: Error initializing
>> DataSource.  Could not instantiate DataSourceFactory.  Cause:
>> java.lang.ClassCastException
>> 
>> Can anyone shed some light on the ClassCastException?  I Googled but found
>> no references to this exception in this context.
>> 
>> As I mentioned, my classes work when all iBatis (and related) jars are under
>> a webapp's WEB-INF/lib directory.  But in this case, since I'm trying to use
>> the classes in a custom Realm implementation, I've placed all the jars under
>> server/lib directory - that is the only difference between a working and
>> non-working scenario.
>> 
>> Thanks for all your help,
>> 
>> -Sasha Borodin
>> 
>> 



Mime
View raw message