on 06-10-2011 12:22 PM
Hello everybody!
I have error when trying to call SOAP module. The initial context returns $Proxy514 object instead of ModuleHome
Object obj = initialContext.lookup( "localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean" );
I noticed that this module (com.sap.aii.adapter.soap.ejb.jar) XISOAPAdapterBean has 2 interfaces:
Interface : [0] = com.sap.aii.af.lib.mp.module.ModuleHome
Interface : [1] = com.sap.engine.services.ejb3.runtime.ComponentInterface
This is what I get if pass just "sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean" and than output this this object.toString into file.
I discovered that this is classloader issue, but didn't find any solution how to solve it. In NetWeaver Admin I can see this module and it's interfaces and they are Module, ModuleLocal, ModuleHome etc. But when I call lookup it gives me following class instance:
com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler@27f7c54f
Need any help.
PS: run PI 7.11EP6
Hello everybody.
I was trying to make the all possible methods. First I tried to call EJB directly, then through reflection interface, but still I can't call the required method.
What I do now is:
Context ctx = new InitialContext();
modulename = "ejb:/sap.com/com.sap.aii.adapter.soap.app/LOCAL/XISOAPAdapterBean/com.sap.aii.af.lib.mp.module.Module";
Object o = ctx.lookup(modulename);
Method create = o.getClass().getMethod("process",new Class[] {ModuleContext.class, ModuleData.class});
Proxy op = (Proxy) o;
InvocationHandler ih = Proxy.getInvocationHandler(op);
Object mod = ih.invoke(o, create, new Object[] {moduleContext, moduleData});
After this operator I have an error
Throwable exception: Cannot locate invocation chain for method public final com.sap.aii.af.lib.mp.module.ModuleData $Proxy1005.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException from interface interface com.sap.aii.af.lib.mp.module.Module
As I understand through my log lookup I receive $Proxy, that has methods including
public final com.sap.aii.af.lib.mp.module.ModuleData $Proxy1005.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException
This I receive from MethodList of proxy object.
But I still can't perform the required operation.
Probably I need to connect this proxy with EJB instance somehow?
Does anybody know thomething about this issue?
Edited by: Yaroslav Isachenko on Jun 17, 2011 4:48 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello. I found out that probably reason of this issue is that my EAR file that I deploy to server containing resources jar files (also com.sap.aii.af.lib.mod.jar and com.sap.aii.adapter.soap.ejb.jar). I can deploy them through NWDS but I didn't find how to remove this jars. What is the required config of Java Build Path not to include them into deployed EAR file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.