This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help" Watch "Help" New topic
Author

Help

anna pillutla
Ranch Hand

Joined: Aug 27, 2004
Posts: 32
Hi,

I am trying to access a ejb from a tag handler class. It gives me the following error message:

java.lang.ClassCastException: com.ibm.ws.naming.ipbase.UnresolvedContext
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:212)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:98)
at com.ibm.ws.naming.util.WsnInitCtx.<init>(WsnInitCtx.java:79)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory.java:137)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:80)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.<init>(InitialContext.java:207)

at com.test.properties.UpdatePropertiesHandler.doStartTag(UpdatePropertiesHandler.java:135)
at _Properties_jsp_0._jspService(Properties.jsp :80)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:323)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:503)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:651)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:154)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:317)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:477)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:351)

Anybody has any idea about this error. Any help is appreciated.

Thanks,
Anna.
Prasanna Ram Rambhatla
Greenhorn

Joined: Jul 07, 2005
Posts: 10
Guess There is a problem with Context Setup. Also did you check out the Look up (JNDI)

Revist might help u
anna pillutla
Ranch Hand

Joined: Aug 27, 2004
Posts: 32
Hi Prasanna Ram,

Thank you for your reply.

I am trying to make a iiop call. I mean my PROVIDER_URL is an iiop call to a unix box where the EJB is deployed. My aim is to access that EJB.

Know what... it works for the first time. I mean the first call to that EJB works and from the second call to that lookup fails. I could not figure out why. Its the same part of code( InitialContext code) which gets called all the time. So I am suprised why it works once and fails from second attempt.

Any ideas or help is appreciated.

Thanks,
Anna.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help
 
Similar Threads
remote EJB server's
Error Page Exception
sun/ awt/ X11GraphicsEnvironment Class Not Found?
websphere
NoSuchMethodError while using JExcel API