Ok There is also one thing I overlooked
in your web.xml
add the following entry to expose the resource to your application:
<resource-ref>
<description>JDBC Connection</description>
<res-ref-name>jdbc/DataSourceTest</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Mike Fagan wrote:
This is a JNDI lookup error please verify you are passing the same
name as appears in the JNDI column for this data source on your JDBC
Data Sources admin page. It should be that simple
[EMAIL PROTECTED] wrote:
It won’t work; i get in my stacktrace the following message.
Would someone please help me?
Caused by: com.ibatis.common.xml.NodeletException: Error parsing
XML. Cause: java.lang.RuntimeException: Error parsing
XPath '/sqlMapConfig/transactionManager/dataSource/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There was a
n error configuring JndiDataSourceDaoTransactionPool. Cause:
javax.naming.NameNotFoundException: While trying to lookup
'jdbc.DataSourceName' didn't find subcontext 'jdbc' Resolved ;
remaining name 'jdbc/DataSourceName'
at
com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:52)
at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:81)
... 39 more
Caused by: java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/transactionManager/dataSource/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There was an error
configuring JndiDataSourceDaoTransactionPool. Cause: javax.
naming.NameNotFoundException: While trying to lookup
'jdbc.DataSourceName' didn't find subcontext 'jdbc' Resolved ; rema
ining name 'jdbc/DataSourceName'
Try,
<dataSource type="JNDI"> <property name="DataSource"
value="jdbc/DataSourceTest"/>
</dataSource>
or whatever the JNDI name is for DataSourceTest in the JDBC Data
Sources Admin Screen.
Regards,
MF
Davy Pulinckx wrote: Hi,
Cane anyone explain me how you configured weblogic and sqlmapconfig.
I use weblogic, I have a datasource and a connectionpool both are
well configured and works fine.
Now, when I begin to write my sqlmapconfig of ibatis I get many
problems with it.
First of all I have developed these 2 sqlmapconfig below for testing,
butt none of them works.
For example lets assume they call ( datasource = DataSourceTest and
connectionpool = ConnectionPoolTest)
How cane I get this to work, I have searched the online documents of
ibatis and internet and I found examples butt they don’t work.
If I use just a transactionManagerType = SIMPLE, all works fine, butt
when I use one of these 2 JNDI below it wont work.
Please someone help me.
Greets
Davy
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<transactionManager type="JDBC">
<dataSource type="JNDI">
<property name="DataSource"
value="DataSourceTest"/>
</dataSource>
</transactionManager>
<sqlMap resource="SqlMap.xml"/>
</sqlMapConfig>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config
2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<transactionManager type="JDBC">
<dataSource type="JNDI">
<property name="DataSource"
value="java:comp/env/jdbc/DataSourceTest"/>
</dataSource>
</transactionManager>
<sqlMap resource="SqlMap.xml"/>
</sqlMapConfig>