nightmare 07.05.12.a: OC4j 10.1.2 data sources - JNDI name not found

This is a discussion on nightmare 07.05.12.a: OC4j 10.1.2 data sources - JNDI name not found within the Oracle Tools forums in Oracle Database category; I have a problem with JNDI name not found on looking up a data-source in OC4J 10.1.2. It is a very simple application that uses simple DAO and a Struts data source for data access and has been working well. But the application has developed heavy traffic and the client has asked that we add connection pooling through Oracle. Oracle documentation seems to be clear, but I seem to be missing something. Note that we have to use 10.1.2 and that 10.1.3 approaches do not work for 10.1.2. Here are what ...

Go Back   Database Forum > Oracle Database > Oracle Tools

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 05-25-2007, 04:44 AM
Default nightmare 07.05.12.a: OC4j 10.1.2 data sources - JNDI name not found


I have a problem with JNDI name not found on looking up a data-source
in OC4J 10.1.2.

It is a very simple application that uses simple DAO and a Struts data
source for data access and has been working well. But the application
has developed heavy traffic and the client has asked that we add
connection pooling through Oracle.

Oracle documentation seems to be clear, but I seem to be missing
something. Note that we have to use 10.1.2 and that 10.1.3 approaches
do not work for 10.1.2.

Here are what I believe to be the relevant snippets. What is the
problem?

The java lookup:


InitialContext ic = new InitialContext();
DataSource dataSource = (DataSource) ic.lookup("jdbc/pool/OracleDS");


JNDI complains "name not found".

The META-INF/data-sources.xml
file:




data-source
class="oracle.jdbc.pool.OracleConnectionCacheImpl"
name="OracleDS"
location="jdbc/pool/OracleDS"
ejb-name="jdbc/pool/OracleDS"
pooled-location="jdbc/mssPooledDS"
url="jdbcracle:thin:@1n.n.n.n:1521/AAAAAA"
username="user"
password="secret"
min-connections="5"
max-connections="15"
wait-timeout="10"
inactivity-timeout="30"
schema="database-schemas/oracle.xml"
/>




Note that in the META-INF/orion-application.xml
the data source is declared twice


runtime 1.2//EN" "http://xmlns.oracle.com/ias/dtds/orion-
application.dtd">
source="jdbc/pool/OracleDS">



......





WEB-INF/web.xml


,,,,


jdbc/pool/OracleDS
javax.sql.DataSource
Container

....




Thanks

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 11:58 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.