use
DataSource ds = (DataSource)
jndiCntx.lookup("java:/OracleDB");
return ds.getConnection( );
Allan.
--- "De Closmadeuc, Etienne"
<[EMAIL PROTECTED]> wrote:
>
> I'm trying to execute a query on an Oracle 8.1.7
> database but ...
> I can't figure what JNDI name must be used.
>
> <mbean code="org.jboss.jdbc.XADataSourceLoader"
>
name="DefaultDomain:service=XADataSource,name=OracleDB">
> <attribute name="PoolName">OracleDB</attribute>
> <attribute
>
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
> l</attribute>
> <attribute
>
name="URL">jdbc:oracle:thin:@spirou:1521:AGENCE</attribute>
> <attribute name="JDBCUser">******</attribute>
> <attribute name="Password">******</attribute>
> </mbean>
> ...
> jboss.xa.xidclass=oracle.jdbc.xa.OracleXid
> ...
> [OracleDB] Starting
> [OracleDB] XA Connection pool OracleDB bound to
> java:/OracleDB
> [OracleDB] Started
> ...
> <resource-ref>
> <description>DataSource for the Oracle
> database</description>
> <res-ref-name>OracleDB</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> ...
> InitialContext jndiCntx = new InitialContext(
> );
> DataSource ds = (DataSource)
> jndiCntx.lookup("java:comp/env/OracleDB");
> return ds.getConnection( );
> ...
> but I get this error :
>
> Got context
> Got reference
> java.rmi.ServerException: RemoteException occurred
> in server thread; nested
> exception is:
> java.rmi.ServerException: Transaction rolled
> back; nested exception
> is:
> java.sql.SQLException: Table not found: TAB
> in statement [select
> tname from tab where tabtype = 'TABLE']
>
> and of course, this table exists in Oracle :
>
> Oracle8i Enterprise Edition Release 8.1.7.0.0 -
> Production
> With the Partitioning option
> JServer Release 8.1.7.0.0 - Production
>
> SQL> select tname from tab where tabtype = 'TABLE';
>
> TNAME
> ------------------------------
> ACCOUNTSAMPLE
>
> Thanks for any help.
>
> Etienne de Closmadeuc ([EMAIL PROTECTED])
> Logica SA
> 183, route de Can�jan 33173 GRADIGNAN CEDEX
> T�l : 05.56.75.77.00
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
>
http://lists.sourceforge.net/lists/listinfo/jboss-user
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user