Thanks, Axel, for your helpful article. And apologies to Larry for the lack of specificity in my posting! - he was right. I've now got it all up and working - and no exceptions. BUT something weird is happening with the Axis servlet after I've run the program to access the service which connects to a MySQL database. I've checked with the Tomcat log open while I try different shutdown configurations. This happens only if I've run the program and has nothing to do with whether MySQL is up or down before I close Tomcat. Tomcat throws the exception I've appended to this posting while shutting down. Why doesn't the Axis servlet want to unload? every link to the database (ResultSet, Statement, Connection, Context) is closed at the end of my program.

Thanks.

Madeleine

INFO: ContextListener: contextDestroyed()
- Servlet AxisServlet threw unload() exception
javax.servlet.ServletException: Servlet.destroy() for servlet AxisServlet threw exception
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1306)
at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1646)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892)
at org.apache.catalina.core.StandardContext.removeChild(StandardContext.java:3025)
at org.apache.catalina.startup.ContextConfig.stop(ContextConfig.java:1011)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:253)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4275)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1063)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1063)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.stop(StandardService.java:512)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)
at org.apache.catalina.startup.Catalina.start(Catalina.java:561)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)


Axel Burwitz wrote:
MKW wrote:

Does anyone please know the right configuration inside Tomcat's server.xml for accessing a MySql database inside an Axis web service?

This is what I've tried inside server.xml:
<Context path="/axis" docBase="axis"
        debug="5" reloadable="true" crossContext="true">

<Resource name="jdbc/axis" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="XX" password="xxx" driverClassName="com.mysql.jdbc.Driver"


url="jdbc:mysql://localhost:3306/dbname?autoReconnect=true"/>
 </Context>

With this added to the Axis web.xml:
<description>dbName</description>
  <resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/axis</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref>

It doesn't work.  Any ideas, please?

Thanks.

Madeleine



Have written a hint how I got it working, and it has helped some people before, so maybe you have a look at it:
http://www.lug-untermain.de/faqs/sqljava.php


rgds
Axel




Reply via email to