tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Spam <s...@rockhopper.org>
Subject Re: Tomact 4.1.29 connection poolingusing JNDI! Please help a newbie
Date Wed, 07 Jan 2004 13:15:27 GMT
It looks more like an Oracle jdbc problem rather than Tomcat problem.

Please have a look at the error description:

http://questsupportlink.quest.com/ConnectionAssistant/ora12505.asp

Are you sure your URI is valid?

jdbc:oracle:thin:@dpwdev02:1521:dprd

Especially the dprd which should be the SID.

Else check the port, if you are using Oracle 9i you may use 1522 instead of 1521.

Whatever try a direct connection with a "stupid" java program that use direct jdbc connection.

Hope this could help.

Johann DUPUIS

GuptaD@eircom.ie wrote:

>Hi Guys,
>
>
>   I'm trying to implement connection pooling but it's giving me following
>error.
>I'm using Oracle thin drivers.Please help me..If somebody could post the
>code for successfull implementation then it would be greate..
>
>My Server.xml Context is as following - 
>
>        <Context path="/boots" docBase="boots" debug="0"
>                 reloadable="true" crossContext="true">
>          <Logger className="org.apache.catalina.logger.FileLogger"
>                     prefix="localhost_boots_log." suffix=".txt"
>        	  timestamp="true"/>
>
>          <Ejb   name="ejb/EmplRecord" type="Entity"
>                 home="com.wombat.empl.EmployeeRecordHome"
>               remote="com.wombat.empl.EmployeeRecord"/>
>
>          <!-- If you wanted the examples app to be able to edit the
>               user database, you would uncomment the following entry.
>               Of course, you would want to enable security on the
>               application as well, so this is not done by default!
>               The database object could be accessed like this:
>
>               Context initCtx = new InitialContext();
>               Context envCtx = (Context) initCtx.lookup("java:comp/env");
>               UserDatabase database =
>                    (UserDatabase) envCtx.lookup("userDatabase");
>          -->
><!--
>          <ResourceLink name="userDatabase" global="UserDatabase"
>                        type="org.apache.catalina.UserDatabase"/>
>-->
>
>
>          <!-- PersistentManager: Uncomment the section below to test
>Persistent 
>		       Sessions.
>                         
>               saveOnRestart: If true, all active sessions will be saved
>                 to the Store when Catalina is shutdown, regardless of
>                 other settings. All Sessions found in the Store will be 
>                 loaded on startup. Sessions past their expiration are
>                 ignored in both cases.
>               maxActiveSessions: If 0 or greater, having too many active 
>                 sessions will result in some being swapped out. minIdleSwap
>                 limits this. -1 means unlimited sessions are allowed.
>                 0 means sessions will almost always be swapped out after
>                 use - this will be noticeably slow for your users.
>               minIdleSwap: Sessions must be idle for at least this long
>                 (in seconds) before they will be swapped out due to 
>               maxActiveSessions. This avoids thrashing when the site is 
>                 highly active. -1 or 0 means there is no minimum - sessions
>                 can be swapped out at any time.
>               maxIdleSwap: Sessions will be swapped out if idle for this
>                 long (in seconds). If minIdleSwap is higher, then it will
>                 override this. This isn't exact: it is checked
>periodically.
>                 -1 means sessions won't be swapped out for this reason,
>                 although they may be swapped out for maxActiveSessions.
>                 If set to >= 0, guarantees that all sessions found in the
>                 Store will be loaded on startup.
>               maxIdleBackup: Sessions will be backed up (saved to the
>Store,
>                 but left in active memory) if idle for this long (in
>seconds), 
>                 and all sessions found in the Store will be loaded on
>startup.
>                 If set to -1 sessions will not be backed up, 0 means they
>                 should be backed up shortly after being used.
>
>               To clear sessions from the Store, set maxActiveSessions,
>maxIdleSwap,
>               and minIdleBackup all to -1, saveOnRestart to false, then
>restart 
>               Catalina.
>          -->
>		  <!--
>          <Manager className="org.apache.catalina.session.PersistentManager"
>              debug="0"
>              saveOnRestart="true"
>              maxActiveSessions="-1"
>              minIdleSwap="-1"
>              maxIdleSwap="-1"
>              maxIdleBackup="-1">
>                <Store className="org.apache.catalina.session.FileStore"/>
>          </Manager>
>		  -->
>          <Environment name="maxExemptions" type="java.lang.Integer"
>                      value="15"/>
>          <Parameter name="context.param.name" value="context.param.value"
>                     override="false"/>
>          <Resource name="jdbc/CrdbConn" auth="Container"
>                    type="javax.sql.DataSource"/>
>          <ResourceParams name="jdbc/CrdbConn">
> 
><parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourc
>eFactory</value></parameter>
>          	<parameter><name>maxActive</name>
>		<value>20</value>
>		</parameter>            
>            
>	      <parameter>
>	        <name>maxIdle</name>
>	        <value>10</value>
>	      </parameter>
>	      <parameter>
>	        <name>maxWait</name>
>	        <value>-1</value>
>	      </parameter>
>
>            <parameter><name>driverClassName</name>
>              <value>oracle.jdbc.driver.OracleDriver</value></parameter>
>            <parameter><name>url</name>
> 
><value>jdbc:oracle:thin:@dpwdev02:1521:dprd</value></parameter>
> 
><parameter><name>username</name><value>crdbweb</value></parameter>
> 
><parameter><name>password</name><value>crdbweb</value></parameter>
>          </ResourceParams>
>          <Resource name="mail/Session" auth="Container"
>                    type="javax.mail.Session"/>
>          <ResourceParams name="mail/Session">
>            <parameter>
>              <name>mail.smtp.host</name>
>              <value>localhost</value>
>            </parameter>
>          </ResourceParams>
>          <ResourceLink name="linkToGlobalResource" 
>                    global="simpleValue"
>                    type="java.lang.Integer"/>
>        </Context>
>----------------------------------------------------------------------------
>----------------------------------------------------------
>-------------------Error----------------------------------------------------
>-----------------------------------------------
>java.sql.SQLException: Io exception: Connection
>refused(DESCRIPTION=(TMP=)(VSNNU
>M=135296000)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
>        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
>        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
>        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
>        at
>oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260)
>
>        at
>oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
>va:365)
>        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
>        at
>org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
>erConnectionFactory.java:82)
>        at
>org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
>ConnectionFactory.java:300)
>        at
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
>icDataSource.java:838)
>        at
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
>rce.java:821)
>        at
>org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
>.java:518)
>        at pkgboots.CrdbConn.init(CrdbConn.java:25)
>        at org.apache.jsp.orderList_jsp._jspService(orderList_jsp.java:63)
>        at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>        at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
>.java:210)
>        at
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
>95)
>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>        at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
>icationFilterChain.java:247)
>        at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
>ilterChain.java:193)
>        at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
>alve.java:256)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
>t.invokeNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
>a:480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>        at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
>alve.java:191)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
>t.invokeNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
>a:480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>        at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
>2417)
>        at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
>ava:180)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
>t.invokeNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
>rValve.java:171)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
>t.invokeNext(StandardPipeline.java:641)
>        at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
>ava:172)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
>t.invokeNext(StandardPipeline.java:641)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
>a:480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>        at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
>ve.java:174)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
>t.invokeNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
>a:480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>
>        at
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:19
>3)
>        at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
>:781)
>        at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
>ssConnection(Http11Protocol.java:549)
>        at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
>:589)
>        at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
>ool.java:666)
>        at java.lang.Thread.run(Thread.java:536)
>----------------------------------------------------------------------
>
>Thanks in advance,
>
>divya
>
>Divya Gupta
>-------------------------------
>Software Engineer
>5-A, Cumberland House,
>Fenian Street,
>Dublin-2
>
>PH: +353-1-7012553
>
>
>  
>



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


Mime
View raw message