ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Configuring JNDI + IBatis +Websphere 6.0
Date Tue, 03 Jul 2007 13:51:54 GMT
Assuming that you've created a data source with the JNDI name "exampleDS",
here's what you need to do:

1. Use the second form "java:comp/env/jdbc/exampleDS"
2. Add a resource reference entry in web.xml - name the reference
"jdbc/exampleDS"
3. Map the resource reference "jdbc/exampleDS" to JNDI name "exampleDS"

If you're using RAD/RSA then you can do this all on the references page of
the web.xml editor.

Jeff Butler


On 7/3/07, ashok <ashok@sraindia.com> wrote:
>
> Hi
>
> I am trying to get the datasource using JNDI   and Websphere 6.0
> I have created the exampleDS datasource on Websphere 6.0
>
> *In my sqlmapconfig.xml , i have the following enteries* :
> <transactionManager type="JDBC" commitRequired="true">
>         <dataSource type="JNDI">
>             <property name="DataSource"     value="jdbc/exampleDS" />
>         </dataSource>
>     </transactionManager>
>
> *I get the following exception :*
> Error while configuring DaoManager.  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: There was an error configuring
> JndiDataSourceDaoTransactionPool. Cause:
> javax.naming.NameNotFoundException: Context:
> srai91Node01Cell/nodes/srai91Node01/servers/server1, name: jdbc/acids: First
> component in name acids not found. [Root exception is
> org.omg.CosNaming.NamingContextPackage.NotFound: IDL:
> omg.org/CosNaming/NamingContext/NotFound:1.0]
>
>
> *In my sqlmapconfig.xml , i have the following enteries* :
> <transactionManager type="JDBC" commitRequired="true">
>         <dataSource type="JNDI">
>             <property name="DataSource"     value=
> "java:comp/env/jdbc/exampleDS" />
>         </dataSource>
>     </transactionManager>
>
> *I get the following exception :*
> Caused by: com.ibatis.sqlmap.client.SqlMapException: There was an error
> configuring JndiDataSourceDaoTransactionPool. Cause:
> javax.naming.NameNotFoundException: Name "comp/env/acids" not found in
> context "java:".
> Caused by: javax.naming.NameNotFoundException: Name "comp/env/acids" not
> found in context "java:".
>
>
>
> Regards
> Ashok
>

Mime
View raw message