• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Servlet fails to connect to EJB using ProviderURL property in Initial context look

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a web application for which i am using spring MVC. The requirement is that i need to connect to a stateless session EJB using the provider URL property. Both the servlet and the EJB are deployed using a single EAR file. The Ejb basically checks that the application is working fine. The function of the servlet is to verify that RMI, DB, LDAP are working properly and to convey this information to the user logged in through browser. So the servlet MUST make an RMI call to EJB through Look up using "Provider URL" param in the initial context.

Now the problem is when the EAR is deployed and when i make the call to servlet from browser i get an Exception with the following stack Trace. But if i run an JUNIT Integration test on the EJB and again retry for the servlet It works fine. I use "Sun Java System Application Server Enterprise Edition 8.1 (build Jes4RR_Build8)"

Now Here is the stack trace



Here is the Code that i use in the Controller class.


The client spcifically asks for a configurable ProviderURL so that in the production environment the client will deploy the EJB and Servlet seperatly
 
Ajay Kumar bathula
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the Solution for this..The problem was with the initial context factory class. The following code change did the trick.

Now I want to know what is the difference in using "S1ASCtxFactory" against
"com.sun.jndi.cosnaming.CNCtxFactory"
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic