For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > March 2004 > Sun J2EE1.4 RI: SerialContextProvider Error While getting InitialContext









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sun J2EE1.4 RI: SerialContextProvider Error While getting InitialContext
Vasanth

2004-03-19, 8:45 pm

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(IIOPSSLSocketFactory.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(IIOPSSLSocketFactory.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
Data

2004-03-19, 8:45 pm

Il 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(IIOPSSLSocketFactory.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(IIOPSSLSocketFactory.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.CNCtxFactory");

instead this:

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


Vasanth

2004-03-19, 8:45 pm

I tried prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
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.
Data

2004-03-19, 8:45 pm

Il Tue, 24 Feb 2004 20:03:52 -0800, Vasanth ha scritto:

> I tried prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
> 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");

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com