I'm having trouble getting Oracle access from Axis2 to work under Tomcat 6. I've spent a lot of time Googling and prodding and poking the application and I haven't found a solution that works for me.
Oddly the configuration I'm using seems to work for another application. Let's start with the configuration in axis2/META-INF/context.xml, which is: <?xml version='1.0' encoding='utf-8'?> <Context> <Resource name="jdbc/AppDatabase" auth="Container" type="javax.sql.DataSource" factory="org.apache.commons.dbcp.BasicDataSourceFactory" maxWait="-1" maxActive="20" maxIdle="10" url="jdbc:oracle:thin:@frogfoot:1521:w2" driverClassName="oracle.jdbc.OracleDriver" username="********" password="********" accessToUnderlyingConnectionAllowed="true" /> </Context> this seems to work for another app, without a resource-ref, but this app gets the "javax.naming.NameNotFoundException: Name jdbc is not bound in this Context". To resolve this I add the following resource-ref in axis2/WEB-INF/web.xml: <resource-ref> <description>DB Connection</description> <res-ref-name>jdbc/AppDatabase</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> I now get "org.apache.axis2.AxisFault: Cannot create JDBC driver of class '' for connect URL 'null'". The full stack trace is: [ERROR] Cannot create JDBC driver of class '' for connect URL 'null' java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValvejava:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourcejava:880) at com.wirefast.wsam.service.WMSSubmissionService.getConnection(WMSSubmissionService.java:208) at com.wirefast.wsam.service.WMSSubmissionService.submitMessage(WMSSubmissionService.java:570) ... 25 more Caused by: java.lang.NullPointerException at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507) at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476) at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307) at java.sql.DriverManager.getDriver(DriverManager.java:253) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143) ... 28 more Obviously something isn't right, but I can't figure out where the problem lies. Maybe the fact that it is invoking sun.jdbc.odbc.JdbcOdbcDriver instead of oracle.jdbc.OracleDriver is a clue? Or am I missing something else? Neil Youngman Neil Youngman Developer Wirefast Limited Wirefast provides secure corporate messaging services. See our messaging solutions at http://www.wirefast.com/ Please consider the environment. Does this email or attachment need to be printed? This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. Wirefast Limited is registered in England & Wales Company number: 03865860 Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ