For oracle 10g and if you are using jdk1.4 or higher use ojdbc14.jar. Download ojdbc14.jar from oracle website.
Place it inthe jboss/default/lib directory.
Connection conn = null;
Context ic =null;
DataSource ds=null;
// To be used in JBoss Server
try{
ic = new InitialContext();
ds=(DataSource)ic.lookup("java:/OracleDS");
System.out.println(ds.toString());
//System.out.println(ds.);
conn = ds.getConnection();
}
catch(Exception ere)
{
ere.printStackTrace();
}
OraceDS is the JNDI name give inghe Oracle-ds.xml file
If your problem is not fixed, let me help you.
Trinity