ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chema <chemago...@gmail.com>
Subject Could not instantiate DataSourceFactory. Cause: java.lang.ClassCastException
Date Mon, 13 Mar 2006 16:53:46 GMT
Hello:

I'm using iBatis 2.
I'm trying to deploy a WAR file into a SUNONE 7 AS instance but retrieve
this exception:

com.ibatis.common.exception.NestedRuntimeException: Error initializing
iBatis SQLMap, Cause: com.ibatis.common.exception.NestedRuntimeException:
Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error
parsing XML.  Cause: com.ibatis.common.exception.NestedRuntimeException:
Error parsing XPath '/sqlMapConfig/transactionManager/dataSource/end()'.
Cause: com.ibatis.sqlmap.client.SqlMapException: Error initializing
DataSource.  Could not instantiate DataSourceFactory.  Cause:
java.lang.ClassCastException
Caused by: java.lang.ClassCastException


- I set up datasource configuration in the application server as
"jdbc/datasource"

- I defined this datasorce in web.xml

<resource-ref>
                <res-ref-name>jdbc/datasource</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
                <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

- I defined this datasorce in sun-web.xml

<resource-ref>
                <res-ref-name>jdbc/datasource</res-ref-name>
                <jndi-name>jdbc/datasource</jndi-name>
</resource-ref>


- I defined sqlMap client config file

  <transactionManager type="JDBC">
    <dataSource type="JNDI">
      <property name="DataSource" value="jdbc/datasource"/>
    </dataSource>
  </transactionManager>


I dont understand why java.lang.ClassCastException happens.
Indeed, I get to initialize iBatis fine deploying a EAR file within these
config files

Where can stay the problem ?

Thanks in advance

Best regards

Mime
View raw message