Hi,

I have Tomcat version 6.0.20 and Axis2 version 1.5 installed.  I have a web
service built and installed in axis2.  My web service uses iBatis to access
an AS400 DataSource.  It works with my ibatis configuration if I directly
use JDBC.  My service first trys to build a SqlMapClient instance using a
JNDI configuration and that is failing with an exception:

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 an error configuring
JndiDataSourceTransactionPool. Cause: javax.naming.NameNotFoundException:
Name java:comp is not bound in this Context

So it looks like I don't have my configuration set up right.  I have a test
web application running on the Tomcat server using the exact same ibatis
configuration and it finds my JNDI datasource perfectly and uses it.  I've
searched around a lot and tried many different things like putting the
Resource definition in a context.xml in the axis2/META-INF/context.xml file
but I still get the same exception.

Here is my current setup:

In C:\apache-tomcat-6.0.20\conf\server.xml I define the Resource:

<Resource name="jdbc/TestAS400DataSource" type="javax.sql.DataSource"
driverClassName="com.ibm.as400.access.AS400JDBCDriver" auth="Container"
username="xxx" password="xxx" initialSize="3" url="jdbc:as400://ip"
maxActive="3" maxIdle="3"/>

I have nothing extra in the conf/context.xml

In my context.xml in the axis2/META-INF/context.xml I have the following:

  <ResourceLink global="jdbc/BankCBSAS400DataSource"
name="BankCBSAS400DataSource" auth="Container" type="javax.sql.DataSource"/>

And then in the web.xml I have:

<resource-ref>
  <res-ref-name>TestAS400DataSource</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 read a bit about some kind of problem with the same naming jars in the
tomcat lib and in the axis2/WEB-INF/lib  I looked around and didn't notice
any duplicate ones or any naming ones for that matter.

Is there anything that sticks out as blatantly wrong here?

Thanks

Reply via email to