[ http://jira.jboss.com/jira/browse/JBAS-559?page=history ]
     
Scott M Stark closed JBAS-559:
------------------------------

    Resolution: Out of Date

> "No remote interface defined" during entityCtx.getEJBObject
> -----------------------------------------------------------
>
>          Key: JBAS-559
>          URL: http://jira.jboss.com/jira/browse/JBAS-559
>      Project: JBoss Application Server
>         Type: Bug
>     Versions: JBossAS-3.2.6 Final
>     Reporter: SourceForge User
>     Assignee: Scott M Stark

>
>
> SourceForge Submitter: sflexus .
> After migration of our EJB application from jboss 3.0.6 to 
> 3.2.0 the following exception started to occur upon 
> invocation of entityContext.getEJBObject(). The EJB 
> DOES have well defined remote interface. According to 
> spec, getEJBObject() should be available in methods 
> where an instance is associated with the bean. In my 
> case the invocation is inside business method 
> PartnerBean.getRemoteObject() which is being called 
> from business method of CustomerBean.
> getPartnerRemote():
> public abstract class MMSBean {
>   protected EntityContext entityContext;
>   public void setEntityContext(EntityContext 
> entityContext) {
>     this.entityContext = entityContext;
>   }
>   public void unsetEntityContext() {
>     this.entityContext = null;
>   }
>   public EJBObject getRemoteObject() {
>     return entityContext.getEJBObject(); //EXCEPTION 
> HERE
>   }
>   ...
> }
> public abstract class PartnerBean extends MMSBean 
> implements EntityBean {
>   ...
> }
> public abstract class CustomerBean extends MMSBean 
> implements EntityBean {  
>   public PartnerRemote getPartnerRemote() {
>     Partner partner = getPartner(); //CMR method: Partner 
> has 1-to-1 relationship with Customer.
>     return partner == null ? null : (PartnerRemote) partner.
> getRemoteObject();
>   }
> }
> Exception stack trace is below. $Proxy396 is a Customer 
> Bean proxy. $Proxy397 is a Partner Bean proxy.
> java.lang.IllegalStateException: No remote interface 
> defined.
>       at org.jboss.ejb.
> EntityEnterpriseContext$EntityContextImpl.
> getEJBObject(EntityEnterpriseContext.java:174)
>       at com.tw.mms.ejb.MMSBean.
> getRemoteObject(MMSBean.java:62)
>       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:324)
>       at org.jboss.ejb.
> EntityContainer$ContainerInterceptor.
> invoke(EntityContainer.java:1044)
>       at org.jboss.ejb.plugins.cmp.jdbc.
> JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.
> java:95)
>       at org.jboss.ejb.plugins.
> EntitySynchronizationInterceptor.
> invoke(EntitySynchronizationInterceptor.java:301)
>       at org.jboss.resource.connectionmanager.
> CachedConnectionInterceptor.
> invoke(CachedConnectionInterceptor.java:186)
>       at org.jboss.ejb.plugins.
> EntityReentranceInterceptor.
> invoke(EntityReentranceInterceptor.java:82)
>       at org.jboss.ejb.plugins.EntityInstanceInterceptor.
> invoke(EntityInstanceInterceptor.java:174)
>       at org.jboss.ejb.plugins.EntityLockInterceptor.
> invoke(EntityLockInterceptor.java:89)
>       at org.jboss.ejb.plugins.EntityCreationInterceptor.
> invoke(EntityCreationInterceptor.java:53)
>       at org.jboss.ejb.plugins.AbstractTxInterceptor.
> invokeNext(AbstractTxInterceptor.java:84)
>       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)
>       at org.jboss.ejb.plugins.
> ProxyFactoryFinderInterceptor.
> invoke(ProxyFactoryFinderInterceptor.java:122)
>       at org.jboss.ejb.EntityContainer.
> internalInvoke(EntityContainer.java:483)
>       at org.jboss.ejb.Container.invoke(Container.java:
> 674)
>       at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.
> invoke(BaseLocalProxyFactory.java:353)
>       at org.jboss.ejb.plugins.local.EntityProxy.
> invoke(EntityProxy.java:38)
>       at $Proxy397.getRemoteObject(Unknown Source)
>       at com.tw.mms.ejb.CustomerBean.
> getPartnerRemote(CustomerBean.java:199)
>       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:324)
>       at org.jboss.ejb.
> EntityContainer$ContainerInterceptor.
> invoke(EntityContainer.java:1044)
>       at org.jboss.ejb.plugins.cmp.jdbc.
> JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.
> java:95)
>       at org.jboss.ejb.plugins.
> EntitySynchronizationInterceptor.
> invoke(EntitySynchronizationInterceptor.java:301)
>       at org.jboss.resource.connectionmanager.
> CachedConnectionInterceptor.
> invoke(CachedConnectionInterceptor.java:186)
>       at org.jboss.ejb.plugins.
> EntityReentranceInterceptor.
> invoke(EntityReentranceInterceptor.java:82)
>       at org.jboss.ejb.plugins.EntityInstanceInterceptor.
> invoke(EntityInstanceInterceptor.java:174)
>       at org.jboss.ejb.plugins.EntityLockInterceptor.
> invoke(EntityLockInterceptor.java:89)
>       at org.jboss.ejb.plugins.EntityCreationInterceptor.
> invoke(EntityCreationInterceptor.java:53)
>       at org.jboss.ejb.plugins.AbstractTxInterceptor.
> invokeNext(AbstractTxInterceptor.java:84)
>       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)
>       at org.jboss.ejb.plugins.
> ProxyFactoryFinderInterceptor.
> invoke(ProxyFactoryFinderInterceptor.java:122)
>       at org.jboss.ejb.EntityContainer.
> internalInvoke(EntityContainer.java:483)
>       at org.jboss.ejb.Container.invoke(Container.java:
> 674)
>       at sun.reflect.GeneratedMethodAccessor732.
> invoke(Unknown Source)
>       at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:324)
>       at org.jboss.mx.capability.
> ReflectedMBeanDispatcher.
> invoke(ReflectedMBeanDispatcher.java:284)
>       at org.jboss.mx.server.MBeanServerImpl.
> invoke(MBeanServerImpl.java:549)
>       at org.jboss.invocation.local.LocalInvoker.
> invoke(LocalInvoker.java:101)
>       at org.jboss.invocation.InvokerInterceptor.
> invoke(InvokerInterceptor.java:88)
>       at org.jboss.proxy.TransactionInterceptor.
> invoke(TransactionInterceptor.java:77)
>       at org.jboss.proxy.SecurityInterceptor.
> invoke(SecurityInterceptor.java:80)
>       at org.jboss.proxy.ejb.EntityInterceptor.
> invoke(EntityInterceptor.java:112)
>       at org.jboss.proxy.ClientContainer.
> invoke(ClientContainer.java:82)
>       at $Proxy396.getPartnerRemote(Unknown Source)
>       at com.tw.mms.xml.OperatorService.
> processMMSDom(OperatorService.java:30)
>       at com.tw.mms.xml.MMSXmlDomServiceBone.
> processDom(MMSXmlDomServiceBone.java:56)
>       at com.tw.thunderwxf.XmlDomServiceBone.
> process(XmlDomServiceBone.java:109)
>       at com.tw.mms.xml.MMSXmlDomServiceBone.
> process(MMSXmlDomServiceBone.java:33)
>       at com.tw.thunderwxf.MainControllerServlet.
> process(MainControllerServlet.java:444)
>       at com.tw.thunderwxf.MainControllerServlet.
> doGet(MainControllerServlet.java:519)
>       at javax.servlet.http.HttpServlet.
> service(HttpServlet.java:740)
>       at javax.servlet.http.HttpServlet.
> service(HttpServlet.java:853)
>       at org.mortbay.jetty.servlet.ServletHolder.
> handle(ServletHolder.java:360)
>       at org.mortbay.jetty.servlet.
> WebApplicationHandler$Chain.
> doFilter(WebApplicationHandler.java:342)
>       at com.tw.servlet.filters.I18nFilter.
> doFilter(I18nFilter.java:205)
>       at org.mortbay.jetty.servlet.
> WebApplicationHandler$Chain.
> doFilter(WebApplicationHandler.java:334)
>       at com.tw.mms.servlet.LocaleByDomainFilter.
> doFilter(LocaleByDomainFilter.java:46)
>       at org.mortbay.jetty.servlet.
> WebApplicationHandler$Chain.
> doFilter(WebApplicationHandler.java:334)
>       at com.tw.servlet.filters.RequestInfoFIlter.
> doFilter(RequestInfoFIlter.java:98)
>       at org.mortbay.jetty.servlet.
> WebApplicationHandler$Chain.
> doFilter(WebApplicationHandler.java:334)
>       at com.tw.servlet.filters.ErrorHunterFilter.
> doFilter(ErrorHunterFilter.java:45)
>       at org.mortbay.jetty.servlet.
> WebApplicationHandler$Chain.
> doFilter(WebApplicationHandler.java:334)
>       at org.securityfilter.filter.SecurityFilter.
> doFilter(SecurityFilter.java:199)
>       at org.mortbay.jetty.servlet.
> WebApplicationHandler$Chain.
> doFilter(WebApplicationHandler.java:334)
>       at org.mortbay.jetty.servlet.WebApplicationHandler.
> dispatch(WebApplicationHandler.java:286)
>       at org.mortbay.jetty.servlet.ServletHandler.
> handle(ServletHandler.java:558)
>       at org.mortbay.http.HttpContext.
> handle(HttpContext.java:1714)
>       at org.mortbay.jetty.servlet.WebApplicationContext.
> handle(WebApplicationContext.java:507)
>       at org.mortbay.http.HttpContext.
> handle(HttpContext.java:1664)
>       at org.mortbay.http.HttpServer.service(HttpServer.
> java:863)
>       at org.jboss.jetty.Jetty.service(Jetty.java:460)
>       at org.mortbay.http.HttpConnection.
> service(HttpConnection.java:775)
>       at org.mortbay.http.HttpConnection.
> handleNext(HttpConnection.java:939)
>       at org.mortbay.http.HttpConnection.
> handle(HttpConnection.java:792)
>       at org.mortbay.http.SocketListener.
> handleConnection(SocketListener.java:201)
>       at org.mortbay.util.ThreadedServer.
> handle(ThreadedServer.java:289)
>       at org.mortbay.util.ThreadPool$PoolThread.
> run(ThreadPool.java:455)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to