Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple inheritance in remote interfaces for EJB 3.0 session beans on Weblogic 10.3  RSS feed

 
Maciej Dworznik
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
We started migration from EJB 2.1(WLS 8.1) to EJB 3.0(WLS 10.3.2) and identified few serious problems. One of them is related with multiple business interfaces inheritance. I wrote simple example that presents point of the problem.
we have session bean AImpl:

with remote interface A:

As you can see A extends B, and C. Definition of both interfaces is very simple:

Everything looks nice until we want to invoke some method on AImpl bean. For above implementation code:

writes down ”A \n B” and throws exception:


caused by: java.lang.NoSuchMethodException: pl.gov.arimr.zszik.bazowe.slowniki.ejb.A_vt0zts_AImpl_1032_WLStub.writeC()
at java.lang.Class.getMethod(Class.java:1605)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:165)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:57)

so.. in stub generated by WLS there is no method from interface C ! What more interesting after small change in interface A rely on change in interface implementation order from B, C to C, B () server writes down only A and I have stack like below:

Caused by: java.lang.NoSuchMethodException: pl.gov.arimr.zszik.bazowe.slowniki.ejb.A_vt0zts_AImpl_1032_WLStub.writeB()
at java.lang.Class.getMethod(Class.java:1605)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:165)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:57)

After this experience I came up with suspicion that Weblogic 10.3 does not support inheritance from multiple interfaces in one “generation”. Instead of that it takes only the first interface from the list.
Does anybody have some experience with such a situation? maybe someone have an idea how to work around this problem?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks like a bug to me. Have you checked with WebLogic issue tracker to see if this has been already reported?
 
Jab Arr
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem and found that the Remote interface can't extend several interfaces, Weblogic 10.3 doesnt support it.

You should write your interface like this:

@Remote
@JNDIName(A.JNDI_NAME)
public interface A{

public void writeA();

public void writeB();

public void writeC() ;

}



 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!