Try this:
 
<transactionManager type="JDBC">
    <dataSource type="JNDI">
      <property name="DataSource" value="java:comp/env/jdbc/datasource"/>   
    </dataSource>
  </transactionManager>

Jeff Butler

 
On 3/14/06, Chema <[EMAIL PROTECTED]> wrote:
Hello:

Sorry if I send this message twice

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

Reply via email to