hi darranel,

thanks for reply

i am reframing the whoe scenario

the JNDI in the lookup matched the JNDI name in the descriptor 

i am encountering exceptions 

javax.naming.NameNotFoundException: OracleDS not bound 
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) 
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) 
at org.jnp.server.NamingServer.getObject(NamingServer.java:509) 
at org.jnp.server.NamingServer.lookup(NamingServer.java:282) 
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
at java.lang.reflect.Method.invoke(Method.java:585) 
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) 
at sun.rmi.transport.Transport$1.run(Transport.java:153) 
at java.security.AccessController.doPrivileged(Native Method) 
at sun.rmi.transport.Transport.serviceCall(Transport.java:149) 
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) 
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) 
at java.lang.Thread.run(Thread.java:595) 
at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
 
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) 
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) 
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) 
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:530) 
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509) 
at javax.naming.InitialContext.lookup(InitialContext.java:351) 
at 
SenderClass.JMSQueueMessageProducer.establishConnection(JMSQueueMessageProducer.java:77)
 
at SenderClass.JMSQueueMessageProducer.main(JMSQueueMessageProducer.java:147) 

my oracle-ds.xml entries are : 

<?xml version="1.0" encoding="UTF-8"?> 

<!-- ===================================================================== --> 
<!-- --> 
<!-- JBoss Server Configuration --> 
<!-- --> 
<!-- ===================================================================== --> 


<local-tx-datasource> 
<jndi-name>OracleDS</jndi-name> 
<connection-url>jdbc:oracle:thin:@3.220.220.220:1521:ora9idev</connection-url> 
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class> 
<user-name>mukund</user-name>
<!--the tag  is not coming int he preview therefore i have inserted the space. 
it is nto there in the actuall oracle-ds.xml  --> 
<pass word>windrmd</pass word>
<min-pool-size>5</min-pool-size> 
<max-pool-size>100</max-pool-size> 
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
 

<!--the tag  is not coming int he preview therefore i have inserted the space. 
it is nto there in the actuall oracle-ds.xml  -->
     <meta data>
         <type-mapping>Oracle9i</type-mapping>
      </meta data>


</local-tx-datasource> 

The code through which i am excessing it is 

private static InitialContext jc = null; 
/** 
* DOCUMENT ME! 
*/ 
public static void establishConnection() { 
try { 

jc = new InitialContext(); 

System.out.println("not yet connected 1"); 

javax.sql.DataSource ds = (javax.sql.DataSource) jc.lookup("java:/OracleDS"); 
Connection conn = ds.getConnection(); 

if (conn != null) { 
System.out.println("connected:" + conn.getMetaData().getUserName()); 
} 

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

the JNDI properties filein is the src folder and contians the following entries 

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory 
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces 
java.naming.provider.url=localhost 

i tried searching alot but could not make it work properly with JBOSS 3.2.5. 

i have tried using help available on jboss and oracle site. 

can anyone guide/ help me in setting up the connection with oracle 9i db 
thanks & regards, 
Mukund 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3897663#3897663

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3897663


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to