I want to use JNDI to retrive a Connection object from an Oracle 9i DBMS and 
get the following error:

javax.naming.CommunicationException: Receive timed out [Root exception is 
java.net.SocketTimeoutException: Receive timed out]
        at 
org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1118)
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1197)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:515)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at masteringEJB.ch4.CountClient.main(CountClient.java:44)
Caused by: java.net.SocketTimeoutException: Receive timed out
        at java.net.PlainDatagramSocketImpl.receive0(Native Method)
        at 
java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
        at java.net.DatagramSocket.receive(DatagramSocket.java:712)
        at 
org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1088)
        ... 5 more

That exception is thrown when i do:

Properties props=System.getProperties();
Context ctx=new InitialContext(props);
DataSource ds=(DataSource)ctx.lookup("java://OracleDS"); // Exception thrown
Connection conn= ds.getConnection();

I pass the JVM the following props:
-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-Djava.naming.provider.url=jnp://ahernandez:1099
-Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

I use this code to test Bean-Managed Entity Beans

Any hints?

Thanks in advance

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

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


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to