problem in configuring Websphere connection pooling for Oracle
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Imayavaramban_M
Posted On:   Tuesday, July 12, 2005 02:47 AM

hai i am using websphere 6.0 trial version.i tried to create connection pooing.i created jdbc provider and datasource with following parameters scope : cells:SYSTEM31Node01Cell:nodes:SYSTEM31Node01 (where system31 is my system name) Class path :ojdbc14.jar implementation classname :oracle.jdbc.pool.OracleConnectionPoolDataSource jndi-name :jdbc/ifacsDS helper-class: com.ibm.websphere.rsadapter.OracleDataStoreHelper URL : jdbc:oracle:thin:@morpheus:1521:IFACS jdbc/ifacsDS javax.sql.ConnectionPoolDataSource Container    More>>

hai


i am using websphere 6.0 trial version.i tried to create connection pooing.i created jdbc provider and datasource with following parameters

scope : cells:SYSTEM31Node01Cell:nodes:SYSTEM31Node01 (where system31 is my system name)

Class path :ojdbc14.jar


implementation classname :oracle.jdbc.pool.OracleConnectionPoolDataSource


jndi-name :jdbc/ifacsDS

helper-class: com.ibm.websphere.rsadapter.OracleDataStoreHelper


URL : jdbc:oracle:thin:@morpheus:1521:IFACS






			

jdbc/ifacsDS
javax.sql.ConnectionPoolDataSource
Container






in my code i have given

			
try
{

Properties parms = new Properties();
parms.setProperty( Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
Context ctx = new InitialContext( );
String s = " java:comp/env/jdbc/ifacsDS";
DataSource data_source =
( DataSource )ctx.lookup( s );
out.println("success ");

}
catch (Exception e)
{
e.printStackTrace(out);
}







i am getting following error when i run the code



			

Ijavax.naming.NameNotFoundException: Context: SYSTEM31Node01Cell/nodes/SYSTEM31Node01/servers/server1, name: java:comp/env/jdbc/ifacsDS: First component in name java:comp/env/jdbc/ifacsDS not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2000)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1321)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:3024)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData. (WsnOptimizedNamingImplBase.java:3489)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1427)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:4045)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1776)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1737)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1444)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1324)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at check.doProcess(check.java:51)
at check.doGet(check.java:33)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)






   <<Less

Re: problem in configuring Websphere connection pooling for Oracle

Posted By:   Anonymous  
Posted On:   Monday, October 3, 2005 02:13 AM

Try giving just the Data Source name



DataSource ds=(DataSource )ctx.lookup("jdbc/ifacsDS");

Re: problem in configuring Websphere connection pooling for Oracle

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, July 16, 2005 10:12 PM

You just want to look up "jdbc/ifacsDS" in JNDI. The rest of the prefix is just internal plumbing and your code doesn't specify it (the "java:comp/env/").
About | Sitemap | Contact