Win a copy of Modern frontends with htmx this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RI AdviceClient running problem - Can't find SerialContextProvider

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Help needed resolving this issue as i am struck moving forward with this. I am using RI Deploymenttool.

When i try to run AdviceCleint, i get the belwo error.


C:\projects\advice>java -cp "%CLASSPATH%;c:\projects\advice\AdviceAppClient.jar;." AdviceClient

Hello World!
IN GO
javax.naming.CommunicationException: Can't find SerialContextProvider
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:63)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:38)
at AdviceClient.main(AdviceClient.java:14)



-------
CLASSPATH:

C:\projects\advice>echo %CLASSPATH%
C:\j2sdkee1.3.1\bin;C:\j2sdkee1.3.1\lib;C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdkee1.3.1\lib;C:\
j2sdkee1.3.1\lib\j2ee-ri-svc.jar;.

-------AdviceClient.java ------

import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;
import headfirst.*;
import javax.ejb.*;
import java.util.Hashtable;

public class AdviceClient
{
public static void main(String[] args)
{
System.out.println("Hello World!");

new AdviceClient().go();
}

public void go(){

try
{
System.out.println("IN GO");

Context ic = new InitialContext();


Hashtable map = new Hashtable();

/*
map.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
map.put("java.naming.provider.url", "iiop://localhost:1050");
Context ic = new InitialContext(map);
*/


Object o = ic.lookup("Advisor");

AdviceHome home = (AdviceHome)PortableRemoteObject.narrow(o, AdviceHome.class);

System.out.println("GOT HOME");

Advice a = home.create();
System.out.println(a.getMessage());
System.out.println("GOT MESSAGE");


}catch (Exception ex){

ex.printStackTrace();
}


}

}



Thanks in advance.
Also, I am using getMessage method to avoid the CORBA BAD COMMAND ERROR.
[ October 21, 2006: Message edited by: Sai Charan ]
 
Sai Charan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone pls help resolving this issue. Thanks
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic