you've misconfigured it. the driverClassName would have to be a driver.
Using XA data sources needs to create the datasource for those connections first.
There is an example towards the bottom of
http://www.tomcatexpert.com/blog/2010/04/01/configuring-jdbc-pool-high-concurrency
Filip
On 7/12/2011 6:27 AM, Siemback, Chris wrote:
> Hello all,
>
> Has anyone ever been able to successfully setup an Oracle XA datasource using the newer
Tomcat Pool and running Tomcat 7? It appears the Tomcat Pool is attempting to cast the oracle
XA data source to a java.sql.Driver - which it isn't. This needs to be an XA datasource.
Anyone have luck with this - no working examples that I can find? Here's the versions/info/error:
>
> Software:
> Tomcat 7.0.16
> Tomcat Pool 1.1.0.1 http://people.apache.org/~fhanik/jdbc-pool/v1.1.0.1/apache-tomcat-jdbc-1.1.0.1-bin.zip
> Oracle 11 (ojdbc6.jar)
>
>
> Context.xml contents:
> <Resource
> auth="Container"
> type="javax.sql.XADataSource"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> driverClassName="oracle.jdbc.xa.client.OracleXADataSource"
> name="jdbc/mydatabase"
> username="username"
> password="password"
> url="jdbc:oracle:thin:@localhost:1521:XE" />
>
>
> Exception:
>
> SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [javax.servlet.ServletException:
javax.naming.NamingException: oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver]
with root cause
> javax.naming.NamingException: oracle.jdbc.xa.client.OracleXADataSource cannot be cast
to java.sql.Driver
> at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
> at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at org.apache.jsp.jdbc_jsp._jspService(jdbc_jsp.java:69)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
> at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:286)
> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:272)
> at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1730)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
> This e-mail message is being sent solely for use by the intended recipient(s) and may
contain confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by phone
or reply by e-mail, delete the original message and destroy all copies. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|