ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pecelis, Sergio" <Pecel...@Toepfer.com>
Subject RE: ibatis + websphere
Date Wed, 01 Nov 2006 18:41:58 GMT
Thanks.

I 'forgot' to configure the Geronimo-web.xml 

My sql-map-config.xml is

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

the geronimo-web.xml:

   <naming:resource-ref>
        <naming:ref-name>jdbc/MyDataSource</naming:ref-name>
        <naming:resource-link>desa_as400</naming:resource-link>
    </naming:resource-ref>

and the web.xml:

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



Sergio Andrés Pecelis
{o_
(')_
 

-----Mensaje original-----
De: Kris Schneider [mailto:kschneider@gmail.com] 
Enviado el: Lunes, 30 de Octubre de 2006 09:27 p.m.
Para: user-java@ibatis.apache.org
Asunto: Re: ibatis + websphere

On 10/30/06, Pecelis, Sergio <PecelisS@toepfer.com> wrote:
>
> I am using ibatis and websphere community edition.
>
> I have no problem using  this configuration:
>
>
>
>   <transactionManager type="JDBC">
>
>
>
>     <dataSource type="SIMPLE">
>
>         <property value="${driver}" name="JDBC.Driver"/>
>
>       <property value="${url}" name="JDBC.ConnectionURL"/>
>
>       <property value="${username}" name="JDBC.Username"/>
>
>       <property value="${password}" name="JDBC.Password"/>
>
>       <property name="JDBC.DefaultAutoCommit" value="true"/>
>
>       </dataSource>
>
>
>
> but using the websphere pool, like this:
>
> <transactionManager type="JDBC">
>
>             dataSource type="JNDI">
>
>             <property name="DataSource"
> value="java:comp/env/desa_as400"/>
>
>       /dataSource>
>
>       /transactionManager>
>
>
>
> i get this error:
>
>
>
> com.ibatis.dao.client.DaoException: Error while configuring
> DaoManager.
>
> java.lang.RuntimeException: Error occurred.
>
> com.ibatis.common.xml.NodeletException: Error parsing XML.
>
> java.lang.RuntimeException: Error parsing XPath
> '/sqlMapConfig/transactionManager/dataSource/end()'.
>
> com.ibatis.sqlmap.client.SqlMapException: There was an
> error configuring JndiDataSourceDaoTransactionPool.
>
> javax.naming.NameNotFoundException: desa_as400

Pretty sure I've run into this myself. Try just:

<property name="DataSource" value="desa_as400"/>

In other words, drop "java:comp/env/".

-- 
Kris Schneider <mailto:kschneider@gmail.com>

___________________________________________
CONFIDENTIALITY NOTICE
This e-mail and any files and/or attachments transmitted with it are strictly confidential
and intended solely for the use of the addressee. They may contain privileged and confidential
information and, if you are not the intended recipient, you are hereby notified that any dissemination
or copying and any use or disclosure of the information contained therein is strictly prohibited
and may be illegal. If you are not the intended recipient, please notify mail@toepfer.com
immediately and delete this message and any files and/or attachments thereto.

Mime
View raw message