ObjectNotFoundException is a subclass of FinderException.
NoSuchObjectExsists is what gets throw if you reference an actual bean interface method on an Entity that's beed removed.
Dave
Jon Haugsand <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 06/06/2003 10:41 AM
|
To: <[EMAIL PROTECTED]> cc: Subject: [JBoss-user] Bug in 3.2.1? |
Look at this fragment. The call 'findAktivtByIsin' is a finder in
another bean and it fails (just check the stacktrace). However, it
fails with "ObjectNotFoundException: No such entity". Why is that?
If it does not exist, shouldn't it fail with "FinderException"?
public void checkConsistency() throws InconsistentDataException
...
try
{
vp = EjbHomeFactory.getFactory().lookUpVerdipapir().findAktivtByIsin( this.getIsin() );
} catch( final FinderException e )
{
cat.warn( "Konsistenssjekk feilet." );
throw new InconsistentDataException( e );
}
Detail exception is:
javax.ejb.ObjectNotFoundException: No such entity!
at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityComm
and.java:46)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.jav
a:591)
at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.ja
va:312)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(Cac
hedConnectionInterceptor.java:301)
at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:627)
at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.j
ava:998)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:8
8)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchro
nizationInterceptor.java:188)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(Cac
hedConnectionInterceptor.java:215)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:8
8)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterc
eptor.java:91)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.ja
va:61)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterc
eptor.java:28)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.ja
va:88)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.jav
a:243)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:9
2)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFind
erInterceptor.java:93)
at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477)
at org.jboss.ejb.Container.invoke(Container.java:694)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFact
ory.java:272)
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
at $Proxy59.findAktivtByIsin(Unknown Source)
at norgesbank.bank.sil.entiteter.pant.PantBean.checkConsistency(PantBean.java:2167
)
--
Jon Haugsand, [EMAIL PROTECTED]
http://www.norges-bank.no
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user