You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Chema <ch...@gmail.com> on 2006/03/13 17:53:46 UTC
Could not instantiate DataSourceFactory. Cause: java.lang.ClassCastException
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