This is a discussion on EJBHandles getObject() method gives NoSuchObjectException in a Cluster - Weblogic ; I deployed a stateful session bean to server1 and server2 running in one cluster.
In my test client,
I first fired a query on an stateful EJBObject which
created a different stateful EJBObject,
bundled its EJBHandle in a serailzable object
...

I deployed a stateful session bean to server1 and server2 running in one cluster.
In my test client,
I first fired a query on an stateful EJBObject which
created a different stateful EJBObject,
bundled its EJBHandle in a serailzable object
and returned this serializable object to the client.
My next client statement is to get the EJBHandles from the serializable object
and calling getEJBObject(),
the strange thing is that when this statement is executed, it sometimes (about
50% probability) throws a NoSuchObjectException. The error message contains "Bean
has been deleted".

I understand that stateful session bean can't be clustered (only ejbHome of it
is clustable). So the ejbHandle I got from EJBObject should only contain information
of server 1, where the stateful bean is created, any follow request of the beans
should be routed to server 1 instead of server 2. But according to the output,
it seems that the second request of the sf bean was sent to server 2, and the
result is NoSuchObjectException is thrown.

I shutdown one server in the cluster (or undeploy the erring bean from it), the
error disappeared.

The idleTimeOutSeconds of the bean is set sufficiently large (5 hrs), so it should
never be passivated as long as EJB cache is not full.
We are setting the EJBHome clusterable (ofcourse), but we are not asking for Replicating
state.trueNone

I am also facing a similar problem. Only difference is that i am getting the following
error:

---Unable to locate EJBHome: BeanHome' on server: 't3://IP: PORT (A). It appears
as if handle tries to look for the home object on the primary server A which is
down.

"Manoj Sheth" wrote:
>
>I deployed a stateful session bean to server1 and server2 running in
>one cluster.
>In my test client,
>I first fired a query on an stateful EJBObject which
> created a different stateful EJBObject,
> bundled its EJBHandle in a serailzable object
> and returned this serializable object to the client.
>My next client statement is to get the EJBHandles from the serializable
>object
>and calling getEJBObject(),
>the strange thing is that when this statement is executed, it sometimes
>(about
>50% probability) throws a NoSuchObjectException. The error message contains
>"Bean
>has been deleted".
>
>I understand that stateful session bean can't be clustered (only ejbHome
>of it
>is clustable). So the ejbHandle I got from EJBObject should only contain
>information
>of server 1, where the stateful bean is created, any follow request of
>the beans
>should be routed to server 1 instead of server 2. But according to the
>output,
>it seems that the second request of the sf bean was sent to server 2,
>and the
>result is NoSuchObjectException is thrown.
>
>I shutdown one server in the cluster (or undeploy the erring bean from
>it), the
>error disappeared.
>
>I am using WLS 6.1 SP01 on Windows 2000.
>--
>WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
>WebLogic XML Module 6.1 SP1 09/18/2001 14:43:02 #138716
>--
>
>The idleTimeOutSeconds of the bean is set sufficiently large (5 hrs),
>so it should
>never be passivated as long as EJB cache is not full.
>We are setting the EJBHome clusterable (ofcourse), but we are not asking
>for Replicating
>state.
>
>true
>None
>
>
>Any idea why we are getting this problem?
>
>Thanks a lot.
>Manoj Sheth