cancel
Showing results for 
Search instead for 
Did you mean: 

NoSuchMethodException when calling EJB from another EJB

Former Member
0 Kudos

We have 2 development configurations, MasterData and TD. Both contains EJB. We try to call MD from TD.

MD contains methods:

1. Version getVersion(String, int, int)

2. FSI getFSI(String, Version, int, int)

where both Version and FSI are in com.xxx.xxx package.

When we call them:

1. getVersion is called successfuly

2. getFSI is throwing exception:

java.lang.NoSuchMethodException: com.xxx.xxx.ejb.MasterDataRemoteObjectImpl0.getFSI(java.lang.String, com.xxx.xxx.Version, int, int)

at java.lang.Class.getMethod(Class.java:986)

at com.sap.engine.services.rmi_p4.reflect.LocalInvocationHandler.invokeInternal(LocalInvocationHandler.java:51)

at com.sap.engine.services.rmi_p4.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:53)

at $Proxy40.getFSI(Unknown Source)

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 com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187)

at $Proxy41.getFSI(Unknown Source)

at <<<calling method>>>

...

It seems like EJB container cannot find Version which is there (in library.jar in the root of ear file of TD). I also tried other combination of positioning library.jar but it always failed at least with this error.

How can we create dependency between TD and MD to create correct EAR file for TD (they should be deployed separately)?

Thanks for all answers

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I'm working on the same project. I've got two questions regarding your statements

1)

"Set the dependency in your project properties. Make sure to include the other project into yours.":

We've set the SC and DC dependencies. But we don't have the possibility to include the two DCs in one project!

2)

"Make sure both beans are in your deployment descriptor and setup with different unique identifiers (class or class name are not traditionally part of the identifier)": As far as I know, two DCs can not have one deployment descriptor. Is there a possibility to use one deployment descriptor?

Regards,

Volker

Former Member
0 Kudos

Set the dependency in your project properties.

Make sure to include the other project into yours.

Make sure both beans are in your deployment descriptor and setup with different unique identifiers (class or class name are not traditionally part of the identifier)

Enjoy