[jboss-user] [JNDI/Naming/Network] - Re: java.lang.ClassCastException: $Proxy78 cannot be cast to

areyyyyy do-not-reply at jboss.com
Wed Apr 15 08:08:37 EDT 2009


  Thanks for ur reply.
 Here i am providing remote interface and stateful session beans:

@Stateful(name = "uhomeSession")
@Remote( { LoginSession.class })
public class LoginSessionBean implements LoginSession {
	@PersistenceContext(unitName = "Model")
	private EntityManager em;
	private PropertyLogger pl;
	private Ruser sessionUser;
	private FinderMethods fm;

	public LoginSessionBean() throws UnknownException, WarningException {
		pl = PropertyLogger.getInstance();
		fm = new FinderMethods();
		pl.write("Leaving LoginSessionBean constructor", 1, "LoginSessionBean",

...  some more methods

public interface LoginSession {
    Object mergeEntity(Object entity);
    void checkSessionUser(String methodName) throws WarningException;
    void logout();
...  some more methods

and i am working with server JBOSS4.2.3GA.

Still i am getting same exception mentioned earlier.

and JNDI VIEW is
 +- uhome (class: org.jnp.interfaces.NamingContext)
  |   +- DefaultSessionBean (class: org.jnp.interfaces.NamingContext)
  |   |   +- remote (proxy: $Proxy96 implements interface com.vs.uhome.model.session.DefaultSession,interface org.jboss.ejb3.JBossProxy)
  |   +- uhomeSession (class: org.jnp.interfaces.NamingContext)
  |   |   +- remote (class: java.lang.Object)
  |   |   +- remoteStatefulProxyFactory (proxy: $Proxy65 implements interface org.jboss.ejb3.ProxyFactory)

I have deployed both stateless (DefaultSessionBean) and stateful (LoginSessionBean).I could call stateless from my servlet but i could not call statefull session beans.

and to mention i have deployed web files in war and all ejb files as jar inside uhome.ear file with application.xml file given below

<!DOCTYPE application PUBLIC "-//Sun Microsystems, 
Inc.//DTD J2EE Application 1.2//EN" 

	<display-name>Uhome Application</display-name>

Please tell me why stateful session beans remote node did not implement  the proxy of loginsession? and what  jndi string  should  i use to lookup for the login session?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225601#4225601

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225601

More information about the jboss-user mailing list