posted 12 years ago
Hi ,
In our application we are creating connection pool using context.xml. Everything works good if I give SID . If I change SID to service name..application raises exception. IS there any alternative to use Service name instead of SID in url?
Context.xml,
<Resource name="jdbc/Oracle-dev"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
username="abc"
password="abc"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc: oracle:thin:@10.112.200.29:1521:STT41"
maxWait="2000"
removeAbandoned="true"
maxActive="20"
maxIdle="10"
initialSize="5"
testOnBorrow="true"
validationQuery="select 1 from dual"
removeAbandonedTimeout="60"
logAbandoned="true"/>
Exception , when I change SID(STT41) to servicename(devstt),
SQLException when creating connection. error msg:Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
10.112.200.29:1521:devstt), error info:Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
10.112.200.29:1521:devstt
)