[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-user
Subject: [JBoss-user] [Beginners Corner] - Can't retrieve a Connection object using Oracle 9i and JBoss
From: suttrix <nukes () jboss ! org>
Date: 2004-12-31 18:21:47
Message-ID: 21928370.1104517318346.JavaMail.jboss () colo-br-02 ! atl ! jboss ! com
[Download RAW message or body]
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
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic