[JBoss-user] [EJB/JBoss] - NoSuchObjectLocalException on statefule session bean

2005-05-18 Thread jieshengz
Hi.
I had a statefule session bean. After invocation, I tried to remove it so that 
resource hold by it can be released, but I got a NoSuchObjectLocalException 
exception.
10:12:41,552,LogInterceptor] EJBException in method: public abstract void 
javax.ejb.EJBLocalObject.remove() throws 
javax.ejb.RemoveException,javax.ejb.EJBException
javax.ejb.NoSuchObjectLocalException: Could not activate; failed to restore 
state; CausedByException is:

/opt/jboss-3.2.6/server/default/tmp/sessions/DBFacade-e8slfflc-3/e8ux8e11-3g.ser
 (No such file or directory)at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:210)
 at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148) at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)  
 at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
   at 
org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:449)
 at org.jboss.ejb.Container.invoke(Container.java:709)   at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:419)
 at 
org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy.java:41)



My code is like this 

  | DBFacadeLocal serverFacade = null;
  | DBFacadeLocal clientFacade = n
  | UserTransaction ut = getUserTransaction();
  |  try
  | {
  |
  |  serverFacade = ...create one EJB.
  | clientFacade = ...create anothet EJB of the same type.
  | ut.beginTransaction().
  | ...do work here.
  | ut.commit();
  | } catch (Exception e)
  | {
  | try
  | {
  | ut.rollback();
  | } catch (Exception e1)
  | {
  | //ignore
  | }
  | 
  | 
  | } finally
  | {
  |
  | 
  | try
  | {
  | if (serverFacade != null)
  | serverFacade.remove();
  | } catch(Exception e)
  | {   
  | }
  |try
  |  {
  |  if (clientFacade != null)
  |   clientFacade.remove();
  | } catch(Exception e)
  |{   
  | //exception occure here.
  | }
  | } 
  | 
  | 

What could be the cause for this? Help is appreciated.


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

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


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - NoSuchObjectLocalException

2004-04-13 Thread jchang
Hello everybody,

I have two threads executing a findby method (from an entity bean) almost at the 
same time in a STATELESS session bean but one of them is deleting a record in the 
database. Thus, the other one complains with the following error:

javax.ejb.NoSuchObjectLocalException: Entity not found: 
primaryKey=11e1813-fbd1ae2521-b88d8e8d57a53bc420279153d2e46f6f
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:158)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
...

I have declared all my finder methods from the entity bean and the method that calls 
these finders in the STATELESS session bean to be transaction type "Required" and NOT 
read only.

I thought that if a method is not read-only then only one thread can execute at one 
time (Transaction locking).

How can I accomplish that?

Thanks in advance,

jchang
By the way, I am using JBoss 3.2.1 and EJB 2.0


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

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


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user