• 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

weblogic lookup : classcast exception

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
the lookup is ok but weblogic can't convert into the good class, however the looks ok.
Any idea where can come from the problem?

>>File DispatchAction.java
...
private LoginCtlSessionEJB loginBean;
...
Object o = (EjbUtil.getContext()).lookup("LoginCtlSessionEJB#onp.application.login");
loginBean = (LoginCtlSessionEJB)o;
...
>>File LoginCtlSessionEJBBean.java
...
@Interceptors(interceptEJB.class)
@Stateless (name = "LoginCtlSessionEJB", mappedName = "LoginCtlSessionEJB")
@Remote (value = LoginCtlSessionEJB.class)
public class LoginCtlSessionEJBBean implements LoginCtlSessionEJB {
....

>> Message at exécution :
...
[02/08/2010 16:56:38] [ERROR] [onp.utils.OnpException] [generateExceptionLog:426] Identifiant : 20100802-165638-1
Date Log : le 02/08/2010 à 16:56:38
Exception : java.lang.ClassCastException
Message : weblogic.jndi.internal.WLEventContextImpl cannot be cast to onp.application.login.LoginCtlSessionEJB
Type : Fonctionnelle
Package : onp.workflow.login
Classe : onp.workflow.login.LoginDispatchAction
Méthode : execute(...)
Trace :
java.lang.ClassCastException: weblogic.jndi.internal.WLEventContextImpl cannot be cast to onp.application.login.LoginCtlSessionEJB
at onp.workflow.login.LoginDispatchAction.connexion(LoginDispatchAction.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...


Thanks.

Guillaume.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic