• 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

An exception while runing stateless session bean at WSAD

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i encountered a problem while calling a stateless session bean from a helper class,and i hope some body can help me out here in the ranch.
the code as below:
java.util.Properties p = new java.util.Properties();
p.put(Context.PROVIDER_URL, "iiop://localhost:900");
p.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
Context ctx = new InitialContext(p);
Object obj = ctx.lookup("ejb/com/rsc/rs/oa/document/ejb/MyDocumentFolderHome");
MyDocumentFolderHome mdfh = (MyDocumentFolderHome)PortableRemoteObject.narrow(obj,MyDocumentFolderHome.class);
MyDocumentFolder mdf = mdfh.create();//EXception throwed here!
-------------------
And the Exception is:
org.omg.CORBA.BAD_PARAM: Servant is not of the expected type. minor code: 0 completed: No
at com.ibm.rmi.corba.ClientDelegate.servant_preinvoke(ClientDelegate.java:745)
at org.omg.CORBA.portable.ObjectImpl._servant_preinvoke(ObjectImpl.java:213)
at com.rsc.rs.oa.document.ejb._MyDocumentFolderHome_Stub.create(_MyDocumentFolderHome_Stub.java:225)
at com.rsc.rs.oa.document.web.MyDocumentWebAgent.getMyDocumentFolder(MyDocumentWebAgent.java:109)
at com.rsc.rs.oa.document.web.MyDocumentWebAgent.draftNewApplication(MyDocumentWebAgent.java:75)
at com.rsc.rs.oa.control.web.handlers.Oa3020Handler.processRequest(Oa3020Handler.java:55)
at com.rsc.mainframe.control.web.RequestProcessor.processRequest(RequestProcessor.java:90)
at com.rsc.mainframe.control.web.MainServlet.doProcess(MainServlet.java:275)
at com.rsc.mainframe.control.web.MainServlet.doGet(MainServlet.java:228)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.SingleThreadModelServlet.service(SingleThreadModelServlet.java:73)
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:523)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)[02-10-29 16:39:29:409 CST] 2d72235c SystemOut U MainServlet: target screen is: null
[02-10-29 16:39:29:409 CST] 2d72235c SystemOut U MainServlet: unknown exception: org.omg.CORBA.BAD_PARAM
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
 
lihui
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have found the answer
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And it was ???!!!
Kyle
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Encountered the same problem...

Possible cause is a mismatch between the generated stubs for the EJB and the actual implementing classes. This can happen when reinstalling the application without a full server restart.

see also at the Websphere Information Center (last item on the page)
 
reply
    Bookmark Topic Watch Topic
  • New Topic