• 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

Unable to understand EJB exception

 
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have successfully developed and deployed an EJB using WSAD 5.1.2's WebSphere 5.0 Test Environment. I have even able to access the EJB using UTC(Universal Test Client) in WSAD and by launching the j2ee client module using WebSphere lauchClient program.

I have now exposed this ejb as web service using AXIS 1.2 RC2 deployed as web module inside WSAD. This web service is properly exposed as web service as I can see it and access its wsdl when I access axis web services.

Now I have written a standalone-outside-wsad web service client that uses AXIS stubs and when I try to consume to this ejb web service I am getting below error.

faultDetail:
{http://xml.apache.org/axis/}stackTrace: java.lang.ClassCastException: Unable to load class: com.ram.test.interfaces._DemoHome_Stub
at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:386)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:156)
at org.apache.axis.providers.java.EJBProvider.createRemoteEJB(EJBProvider.java:168)
at org.apache.axis.providers.java.EJBProvider.makeNewServiceObject(EJBProvider.java:147)
at org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider.java:258)
at org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.java:138)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:310)




Can anyone please tell me why is error occurring and how to solve it ?





Thanks & Regards,
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The ejb should have a package of client interfaces. Is the jar file that contains these classes available to the client that is running outside the ejb container. The must be accessible for the client to know the interface to work with.
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a web service client that uses axis stubs to commnunicate to the remote web service that exposes ejb ... why do I need to package the ejb interfaces with my web service client. the flow is

outisde-wsad-web-service-client --> inside-wsad-axis-web-module --> inside-wsad-ejb-module
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic