Data source lookup in WSAD5.0
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Saturday, November 8, 2003 01:49 AM

I was created a Data source in WSAD names jdbc/OracleDS and try to connect to Oracle DB. my code is something like: Object datasource = m_DataSources.get(sJNDIName); InitialContext ctx = Utility.getInitialContext(); datasource = ctx.lookup(sJNDIName); .. connection = ds.getConnection(sUserID, sPassword); The log message in console is: [11/8/03 16:11:32:827 ICT] 41368120 ConnectionFac I J2CA0122I: Resource reference jdbc/OracleDS could not be located, so default values of the following are used: [Resource-ref settings] res-auth: 1 (APPLICATION) res-isolation-   More>>

I was created a Data source in WSAD names jdbc/OracleDS and try to connect to Oracle DB.





my code is something like:





Object datasource = m_DataSources.get(sJNDIName);
InitialContext ctx = Utility.getInitialContext();
datasource = ctx.lookup(sJNDIName);
..
connection = ds.getConnection(sUserID, sPassword);







The log message in console is:





[11/8/03 16:11:32:827 ICT] 41368120 ConnectionFac I J2CA0122I: Resource reference jdbc/OracleDS could not be located, so default values of the following are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)

[11/8/03 16:11:34:124 ICT] 41368120 ConnectionFac I J2CA0107I: Component-managed authentication alias not specified for connection factory or datasource OracleDS.
[11/8/03 16:11:40:186 ICT] 41368120 FreePool E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/OracleDS, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException. (DataStoreAdapterException.java:251)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException. (DataStoreAdapterException.java:172)
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:182)
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:663)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:189)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:503)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1106)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:897)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1065)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:560)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:374)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:205)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:180)
.........









anyone know how to config data source in WSAD 5.0 to use in order to connect to Oracle Database??

thanks in advance/

   <<Less

Re: Data source lookup in WSAD5.0

Posted By:   Blake_Binkley  
Posted On:   Friday, January 2, 2004 08:32 AM

just wondering if you fixed this issue, the solution is to set up a security account and then assign the security account to the jndi connection

Re: Data source lookup in WSAD5.0

Posted By:   Blake_Binkley  
Posted On:   Friday, January 2, 2004 08:32 AM

just wondering if you fixed this issue, the solution is to set up a security account and then assign the security account to the jndi connection

Re: Data source lookup in WSAD5.0

Posted By:   chandra_shekar  
Posted On:   Monday, December 22, 2003 09:52 AM


Go to EJB Deployment Descriptor, click on references tab, click on Resources tab
Click on Add button
(New ResourceRef) - replace this with the jndi name you gave in ur program. For example if you gave java:comp/env/jdbc/OracleDS, type jdbc/OracleDS.



Type = javax.sql.DataSource (Make sure you havent selected javax.activation.DataSource)



Under Websphere Bindings
jndiname - name you gave while created your datasource.



Save


Restart your server.
About | Sitemap | Contact