Re: Configuring dbcp in / ROOT context (tomcat 5.5.7)
You shouldn't be specifying the factory (this is a change from 5.0). It is implicit and may change under your nose anyway. If you are not using some custom factory that you are providing, let the container provide the default. Jake Quoting Peter Rossbach <[EMAIL PROTECTED]>: > Hello, > > please give follwing context definition a chance > conf/Calalina/localhost/ROOT.xml > > crossContext="true"> > > maxActive="100" maxIdle="30" maxWait="1" >username="whatver" password="whatver" >driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://127.0.0.1:5432/whatever" scope="Shareable" > factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"/> > > > > > Your are sure that you copy the postgres jar at common/lib? > > Peter > > Stuart Lewis schrieb: > > >Hi, > > > >I've searched the archives and generally on google, and whilst people > >see the problem a lot, I've not found a definitive answer for how to > >configure dbcp in the root context. > > > >E.g. > > > >In server.xml I have: > > > > >crossContext="true"> > > > > > > > maxActive="100" maxIdle="30" maxWait="1" > > username="whatver" password="whatver" > >driverClassName="org.postgresql.Driver" > >url="jdbc:postgresql://127.0.0.1:5432/whatever" scope="Shareable" > >factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"/> > > > > > > > >If I copy this, and have it the same, except: > > > > >crossContext="true"> > > > >then it fails, with: > > > >org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC > >driver of class '' for connect URL 'null' > > > >How should I be configuring my postgress connection for use in the root > context? > > > >Any help will be hugely appreciated, and will stop me from pulling any > >more of my hair out! > > > >Thanks, > > > > > >Stuart > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configuring dbcp in / ROOT context (tomcat 5.5.7)
Hello, please give follwing context definition a chance conf/Calalina/localhost/ROOT.xml Your are sure that you copy the postgres jar at common/lib? Peter Stuart Lewis schrieb: Hi, I've searched the archives and generally on google, and whilst people see the problem a lot, I've not found a definitive answer for how to configure dbcp in the root context. E.g. In server.xml I have: If I copy this, and have it the same, except: then it fails, with: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' How should I be configuring my postgress connection for use in the root context? Any help will be hugely appreciated, and will stop me from pulling any more of my hair out! Thanks, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring dbcp in / ROOT context (tomcat 5.5.7)
Hi, Refer to the attached Readme.txt file and verify that you have done these steps. I think it should solve your problem. Have also attached the server.xml & web.xml files which worked fine for us. let me know whether ur problem gets solved by this. -Original Message- From: Stuart Lewis [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 4:16 PM To: tomcat-user@jakarta.apache.org Subject: Configuring dbcp in / ROOT context (tomcat 5.5.7) Hi, I've searched the archives and generally on google, and whilst people see the problem a lot, I've not found a definitive answer for how to configure dbcp in the root context. E.g. In server.xml I have: If I copy this, and have it the same, except: then it fails, with: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' How should I be configuring my postgress connection for use in the root context? Any help will be hugely appreciated, and will stop me from pulling any more of my hair out! Thanks, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://www.patni.com World-Wide Partnerships. World-Class Solutions. _ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail. _ factory org.apache.catalina.users.MemoryUserDatabaseFactory pathname conf/tomcat-users.xml factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:[EMAIL PROTECTED]:1521:PKGSFT username pswtoshiba password pswtoshiba maxActive 50 maxIdle 10 maxWait 3 removeAbandoned true removeAbandonedTimeout 300 logAbandoned true Settings for Tomcat Connection Pool *** 1) Put classes12.jar file in path => CATALINA_HOME\common\lib 2) Add the Tag given below into server.xml file factory org.apache.commons.dbcp.BasicDataSourceFactory driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:[EMAIL PROTECTED]:1521:PKGSFT username pswtoshiba password pswtoshiba maxActive 50 maxIdle 10 maxWait 3 removeAbandoned true removeAbandonedTimeout 300 logAbandoned true 3) Change the values of url, username, password as per the environment setup at Toshiba side. 4) Significance of following tags: maxActive : Maximum number of dB connections in pool. Make sure the max_connections of DB are large enough to handle this limit. Set to 0 for no limit. maxIdle : Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. maxWait : Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. removeAbandoned : Abandoned dB connections are removed and recycled based on this paramater to the ResourceParams configuration for the DBCP DataSource Resource. removeAbandonedTimeout : Sets the number of seconds a dB connection is left idle before it is considered abandoned. logAbandoned : The logAbandoned parameter can be set to true if you want DBCP to log a stack trace of the code which abandoned the dB connection resources. 5) Add the following tag in web.xml to ensure default session timeout. 5 Value specified is the minutes after which session timeout would occur. http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XM
Configuring dbcp in / ROOT context (tomcat 5.5.7)
Hi, I've searched the archives and generally on google, and whilst people see the problem a lot, I've not found a definitive answer for how to configure dbcp in the root context. E.g. In server.xml I have: If I copy this, and have it the same, except: then it fails, with: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' How should I be configuring my postgress connection for use in the root context? Any help will be hugely appreciated, and will stop me from pulling any more of my hair out! Thanks, Stuart - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]