Code Comments
Programming Forum and web based access to our favorite programming groups.Hi: I am running Sun J2EE 1.4 Reference Implementation. I deployed an
session EJB and am looking up for localHome through JNDI. While
getting InitialContext, I am getting the following error:
****************************************
******************8
Feb 24, 2004 5:41:23 PM
com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl
<init>
WARNING: ORBUTIL.connectFailure
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed:
No
.....
Caused by: java.lang.RuntimeException: java.net.ConnectException:
Connection refused: connect at
com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFacto
ry.java:390) at
com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl.<init>(S
ocketFactoryConnectionImpl.java:58)
.. 11 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:460)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFa
ctory.java:381)
.. 12 more
javax.naming.CommunicationException: Can't find SerialContextProvider
[Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor
code: 201 completed: No]
****************************************
********************8
Here is my code:
Hashtable prop = new Hashtable();
prop.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.SerialInitContextFactory");
prop.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
_InitialContext = new InitialContext(prop);
****************************************
********************8
\sun\appserver\lib\appserv-rt.jar and j2ee.jar are in my classpath.
What am I missing?
Thanks for your help,
Vasanth
Post Follow-up to this messageIl Tue, 24 Feb 2004 04:45:07 -0800, Vasanth ha scritto:
> Hi: I am running Sun J2EE 1.4 Reference Implementation. I deployed an
> session EJB and am looking up for localHome through JNDI. While
> getting InitialContext, I am getting the following error:
> ****************************************
******************8
> Feb 24, 2004 5:41:23 PM
> com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl
> <init>
> WARNING: ORBUTIL.connectFailure
> org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed:
> No
> .....
> Caused by: java.lang.RuntimeException: java.net.ConnectException:
> Connection refused: connect at
> com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFac
tory.java:390) at
> com.sun.corba.ee.impl.legacy.connection.SocketFactoryConnectionImpl.<init>
(SocketFactoryConnectionImpl.java:58)
> ... 11 more
> Caused by: java.net.ConnectException: Connection refused: connect
> at sun.nio.ch.Net.connect(Native Method)
> at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:460)
> at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
> at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocke
tFactory.java:381)
> ... 12 more
> javax.naming.CommunicationException: Can't find SerialContextProvider
> [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor
> code: 201 completed: No]
> ****************************************
********************8
> Here is my code:
> Hashtable prop = new Hashtable();
try this:
prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactor
y");
instead this:
prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialIn
itContextFactory");
> prop.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
> _InitialContext = new InitialContext(prop);
> ****************************************
********************8
> \sun\appserver\lib\appserv-rt.jar and j2ee.jar are in my classpath.
>
> What am I missing?
>
> Thanks for your help,
> Vasanth
Post Follow-up to this messageI tried prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNC txFactory"); Got the following exception: javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No] Note: I am running server and client in same system. Should I provide Context.PROVIDER_URL? If so, what value should I put? Thanks.
Post Follow-up to this messageIl Tue, 24 Feb 2004 20:03:52 -0800, Vasanth ha scritto:
> I tried prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.C
NCtxFactory");
> Got the following exception:
> javax.naming.CommunicationException: Cannot connect to ORB [Root
> exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201
> completed: No]
>
> Note: I am running server and client in same system. Should I provide
> Context.PROVIDER_URL? If so, what value should I put?
>
> Thanks.
ops...sure, the URL:
prop.put("java.naming.provider.url", "iiop://localhost:1050");
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.