aspose file tools*
The moose likes BEA/Weblogic and the fly likes weblogic lookup : classcast exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic lookup : classcast exception" Watch "weblogic lookup : classcast exception" New topic
Author

weblogic lookup : classcast exception

spipe pic
Greenhorn

Joined: Aug 03, 2010
Posts: 4
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.
spipe pic
Greenhorn

Joined: Aug 03, 2010
Posts: 4
solution :



 
Don't get me started about those stupid light bulbs.
 
subject: weblogic lookup : classcast exception