Hi,
I am using the following transaction manager configuration. As your error
says, it needs a value for datasource. please try the following sort of
thing:

        <transactionManager type = "JDBC">
                <dataSource type = "SIMPLE">
                        <property name = "JDBC.Driver"
                                value = "oracle.jdbc.driver.OracleDriver" />
                        <property name="JDBC.ConnectionURL"
                                value =
"jdbc:oracle:thin:@//abidb02:1586/ORCL" />
                        <property name = "JDBC.Username" value =
"abiwebtest"  />
                        <property name = "JDBC.Password" value = "web4810"
/>
                        <property name = "Pool.MaximumActiveConnections"
value = "100" />
                        <property name = "Pool.MaximumIdleConnections" value
= "50" />
                        <property name="Pool.TimeToWait" value="2000"/>
                </dataSource>
        </transactionManager>

Thanks & Regards,
Gaurav Goel.

-----Original Message-----
From: ashok [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 28, 2007 10:45 AM
To: [email protected]
Subject: Problem during configuration of JNDI + Ibatis + Struts + Tomcat 5.5

Hi

I am facing the following problem while configuration of JNDI +Struts 
+Ibatis +Tomcat +MySql.
I am using mysql-connector-java-3.0.17.jar .

In dao.xml file :
<daoConfig>
<transactionManager type="JDBC">
           <property name="SqlMapConfigResource"
               value="com/examples/ibatis/dao/sqlMapConfig.xml" />
       </transactionManager>
   <context>
      <dao interface="com.examples.ibatis.dao.UserDao"
           implementation="com.examples.ibatis.dao.UserDaoImpl" />
   </context>
</daoConfig>

In sqlMapConfig.xml file :
<sqlMapConfig>
   <settings cacheModelsEnabled="true" enhancementEnabled="true"
       lazyLoadingEnabled="true" errorTracingEnabled="false" 
maxRequests="32"
       maxSessions="10" maxTransactions="5" 
useStatementNamespaces="false" />

       <transactionManager type="JDBC">
           <property name="DataSource" value="JNDI" />
           <property name="DBJndiContext"
               value="java:comp/env/jdbc/exampleDB" />
       </transactionManager>
   <sqlMap resource="com/examples/ibatis/dao/UserTable.xml" />
</sqlMapConfig>

In server.xml

<Context path="/example" reloadable="true" 
docBase="C:\example\WebContent" workDir="C:\example\Aci_New\work" >
<Resource name = "jdbc/exampleDB"
         type="javax.sql.DataSource"
         auth="Container"
         description="Example DB"
         maxActive="100"
         maxIdle="30"
         maxWait="10000"
         username="root"
         password="root"
         driverClassName="com.mysql.jdbc.Driver"
         url="jdbc:mysql://localhost:3306/example />  </Context>

In web.xml
   <resource-ref>
       <description>Exampole DB Connection</description>
       <res-ref-name>jdbc/exampleDB</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
   </resource-ref>

During the creation of daoManager.
The following exception is obtained :
com.ibatis.dao.client.DaoException: Error while configuring DaoManager.  
Cause: com.ibatis.dao.client.DaoException: DAO Transaction Manager
properties must include a value for 'DataSource' of SIMPLE, DBCP or JNDI.
Caused by: com.ibatis.dao.client.DaoException: DAO Transaction Manager
properties must include a value for 'DataSource' of SIMPLE, DBCP or JNDI.

What are the solutions for the above problems ?

Regards
Ashok

Reply via email to