• 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

NoInitialContextException

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting the following error when calling a web service:

javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.soap.http.SoapInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.soap.http.SoapInitialContextFactory]

The code is as follows:

Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.soap.http.SoapInitialContextFactory");
h.put("weblogic.soap.wsdl.interface",
EcasServices.class.getName() );
h.put("weblogic.soap.verbose", "false" );
Context context = new InitialContext(h);

We recently upgraded from Web Logic 6.x to Web Logic 8.1. The above code worked perfectly fine under 6x but generating error in WL8.1. I did not encounter any errors during building of the webservice.

Could anyone please let me know the solution to this issue? I have looked all over the web and bea doc but couldn't find anything helpful.

Thanks a lot in advance.
 
Sara Fox
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found that "weblogic.soap.http.SoapInitialContextFactory" is not available in weblogic 8.1.

So I changed the code as follows:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
weblogic.jndi.WLInitialContextFactory.class.getName());
String url = ECWSurl+"/EcasServices";
env.put(Context.PROVIDER_URL, url);
Context context = new InitialContext(env);
EcasServices service = (EcasServices)context.lookup ("EcasServicesuri.wsdl");

But now. I am getting the following error:

javax.naming.NameNotFoundException: While trying to lookup 'EcasServicesuri.wsdl' didn't find subcontext 'EcasServicesuri' Resolved ; remaining name 'EcasServicesuri/wsdl'

Could anyone please throw light on what I am doing wrong? I am new to Web Logic and Web Services. Any help is greatly appreciated.
 
I don't like that guy. The tiny ad agrees with me.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic