Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Sun J2EE1.4 RI: SerialContextProvider Error While getting InitialContext
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

Report this thread to moderator Post Follow-up to this message
Old Post
Vasanth
03-20-04 01:45 AM


Re: Sun J2EE1.4 RI: SerialContextProvider Error While getting InitialContext
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(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


Report this thread to moderator Post Follow-up to this message
Old Post
Data
03-20-04 01:45 AM


Re: Sun J2EE1.4 RI: SerialContextProvider Error While getting InitialContext
I 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Vasanth
03-20-04 01:45 AM


Re: Sun J2EE1.4 RI: SerialContextProvider Error While getting InitialContext
Il 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");


Report this thread to moderator Post Follow-up to this message
Old Post
Data
03-20-04 01:45 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:36 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.