You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/14 23:47:55 UTC

DO NOT REPLY [Bug 18019] New: - DbcpDataSourceFactory and getConnection(String, String)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18019>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18019

DbcpDataSourceFactory and getConnection(String, String)

           Summary: DbcpDataSourceFactory and getConnection(String, String)
           Product: Tomcat 4
           Version: 4.1.18
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: wholder@nglm.com


I'm trying to convert code from Oracle's OC4J to run under Tomcat 4.1.18.  As 
part of this, I'm trying to configure a DataSource that will let me use pooled 
connections with heavyweight users (each user has a unique username and 
password to access the database.)  I can configure a database resource and open 
a pooled connection using DataSource.getConnection(), but this only lets me 
open a connection using the user/pass that was specified in the 
<ResourceParams> setup for JNDI.

What I want to do is call DataSource.getConnection(String, String), but this 
throws an UnsupportedOperationException exception on the call to getConnection
() (Note: see below for full stack trace.)  Also, it seems this issues is not 
addressed in the docs, so I'm not really clear if there is something more I 
need to do, such as alter the way the database resource is defined, to make it 
work, or if this is just something that is not yet implemented....

Note: I've tried removing the user/password defintions from the 
<ResourceParams> definition, but this just seems to produce a message telling 
me I need to define them.  So, I'm stuck.

Wayne

Stack Trace:

java.lang.UnsupportedOperationException
	at org.apache.commons.dbcp.PoolingDataSource.getConnection
(PoolingDataSource.java:125)
	at org.apache.commons.dbcp.BasicDataSource.getConnection
(BasicDataSource.java:329)
	at com.nglm.webfh.DoRequest.getConnection(DoRequest.java:457)
	at com.nglm.webfh.Login.doLogin(Login.java:123)
	at com.nglm.webfh.Login.doPost(Login.java:104)
	at com.nglm.webfh.DoRequest.post(DoRequest.java:394)
	at com.nglm.webfh.DispatchServlet.invokeModule(DispatchServlet.java:155)
	at com.nglm.webfh.DispatchServlet.doPost(DispatchServlet.java:217)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2415)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:432)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:386)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:534)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:530)
	at java.lang.Thread.run(Thread.java:536)

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org