java.lang.ClassCastException: org.jnp.interfaces.NamingConte
sony3002 Mar 26, 2006 3:02 PMhello all
i am getting tis error when i connect to remote Jboss 4.0.4RC1
from my stand alone tomcat
java.lang.ClassCastException: org.jnp.interfaces.NamingContext
i am using Jboss 4.0.4RC1 with EJB3
Java 1.5 update 6
Netbeans 5.5 preview
i list all the bind variable in port 1099 and found that my bean is there
Bind Objects :XAConnectionFactory: org.jboss.mq.SpyXAConnectionFactory Bind Objects :TopicConnectionFactory: org.jboss.naming.LinkRefPair Bind Objects :UIL2ConnectionFactory: javax.naming.LinkRef Bind Objects :UserTransactionSessionFactory:$Proxy27 Bind Objects :UIL2XAConnectionFactory: javax.naming.LinkRef Bind Objects :QueueConnectionFactory: org.jboss.naming.LinkRefPair Bind Objects :topic: org.jnp.interfaces.NamingContext Bind Objects :UserLoginBean: org.jnp.interfaces.NamingContext Bind Objects :queue: org.jnp.interfaces.NamingContext Bind Objects :ConnectionFactory: org.jboss.mq.SpyConnectionFactory Bind Objects :UserTransaction: org.jboss.tm.usertx.client.ClientUserTransaction Bind Objects :jmx: org.jnp.interfaces.NamingContext Bind Objects :UILXAConnectionFactory: javax.naming.LinkRef Bind Objects :UILConnectionFactory: javax.naming.LinkRef
what is the problem with me ??? my code ???
here is my remote beans
package test.ejb.user; import java.util.Vector; import javax.ejb.*; /** * This is the bean class for the UserLoginBean enterprise bean. * Created Mar 26, 2006 8:56:08 PM * @author Administrator */ @Stateless() public class UserLoginBean implements com.amlaki.cbmega.ejb.user.UserLoginRemote { public boolean doLogin(String userId,String memberId,String password)throws Exception { System.out.println("User Id Received from Remot Server is :"+userId); System.out.println("Member Id Received from Remot Server is :"+memberId); System.out.println("Password Received from Remot Server is :"+password); System.out.println("Returning true to the called programme....."); return true; } public Vector getUserRights(String userId)throws Exception { System.out.println("Called getUserRights() method of Jboss"); return new Vector(); } }
package test.ejb.user; import java.util.Vector; import javax.ejb.Remote; /** * This is the business interface for UserLogin enterprise bean. */ @Remote()// this line was added by me public interface UserLoginRemote { public boolean doLogin(String userId,String memberId,String password)throws Exception; public Vector getUserRights(String userId)throws Exception; }
UserLoginRemote obj = (UserLoginRemote)Remote.getRemoteObject("UserLoginBean");
please help
Sony George