0 Replies Latest reply on Jan 24, 2006 10:35 AM by chetan aggarwal

    NameNotFoundException for Clustered SFSB

    chetan aggarwal Newbie

      Hi all,

      I am new Jboss clustering. I have made a jboss cluster by using cluster-service.xml . I have created a statefull session bean with following XDoclet comments

      * @ejb:bean
      * name="ClusteredSessionManager"
      * display-name="Clustered Session Manager"
      * description="Clustered Session Manager"
      * type="Stateful"
      * view-type="remote"
      * jndi-name="ejb/ClusteredSessionManager"
      * @ejb.security-identity
      * description="Security Identity"
      * use-caller-identity="true"
      * @ejb.security-role-ref
      * role-link="Echo"
      * role-name="CallerPrincipal"
      * @ejb.permission role-name="Echo"
      *
      * @jboss.cluster-config
      * partition-name="defaultPartition"
      * home-policy="org.jboss.ha.framework.interfaces.RoundRobin"
      * bean-policy="org.jboss.ha.framework.interfaces.FirstAvailable"
      * state-manager="/HASessionState/Default"
      *
      * @jboss.clustered
      * cluster=true

      On server start up bean is getting deployed properly.
      On client side , when i use local jndi look up by giving exact machine name and port , i am able to look this Session Bean . I think its working as non clustered lookup.

      But when i am using autoDiscovery feature to find HA JNDI server and tring to look up this bean by using "ejb/ClusteredSessionManager" jndi name.

      I am getting following exception:

      javax.naming.NameNotFoundException: ejb/ClusteredSessionManager

      at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:223)

      at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:134)

      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:585)

      at org.jboss.ha.framework.server.HARMIServerImpl.invoke(HARMIServerImpl.java:194)

      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:585)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)

      at sun.rmi.transport.Transport$1.run(Transport.java:153)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

      at java.lang.Thread.run(Thread.java:595)

      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)

      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)

      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)

      at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source)

      at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:127)

      at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:196)

      at $Proxy0.lookup(Unknown Source)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)

      at javax.naming.InitialContext.lookup(InitialContext.java:347)


      Have i missed some configuration part or am i doing correct??

      Please somebody help.

      Thanks and Regards,
      Chetan