cancel
Showing results for 
Search instead for 
Did you mean: 

Problems when call Java from ABAP via JRA (jco/rfc)

0 Kudos

Hello.

Please, can anybody give some hint about problem? I have task to realize Java library to handle some calls from ABAP. I try small examples with standalone JCoServer – works fine. Also we have deployed AS Java server (NW 7.30). I think, what it’s better to realize server app on AS Java, but take some troubles.

Thirst I try to implement stateless bean with function processFunction. But it’s not working. In server log I found message:

JLinEE validation of application [jcoear_tst] returned result Messages for application "jcoear_tst" reported by JLinEE checks: WARNINGS: EJB Model Builder: ASJ.ejb.004143 The stateless session bean TestBean has an interface com.jcoTest.TestBean which exposes a method with name processFunction. That means the bean is exposed for RFC access which since JCo 3.0 is a deprecated functionality and the bean will not be exposed in JNDI for RFC access. Please check SAP note 1077727 "SAP JCo 3.0 release and support strategy".  (Location:com.jcoTest.TestBean)[message resource bundle missing], file: jcoejb_tst.jar\# jcoejb_tst.jar, severity: warning

Ok, then I was tried to configure JRA (Resource Adapter) for access from ABAP. I developed MessageDrivenBean, make clone of SAPJRAResourceAdapter15 and configure it. Call from ABAP working, but it’s not retrieve value:

In ABAP:

  EXPORTING      VALUE(RES) TYPE  STRING

  CALL FUNCTION 'TESTMDB'   DESTINATION 'JCOJRA_TEST'   EXPORTING     RES = RESULT

In BEAN:  response.put("RES", "Bla-bla-bla");

But RESULT in ABAP not change value. During trace found this (is it important?):

UUID: ab_rfccheck_uuid take uuid over E568122D-9183-5BF1-BD81-00145EF10E72

***Discarding unrequested parameter RES

<* RfcGetData >Thu Oct 01 10:58:20,092<    successful *>

Another question: then I’m try return (in exporting case) structure in bean not initialized:

response.get("RES")   is null.

How I can create object, that  implement MappedRecord interface (where is no API) to put it in response?

Also I seen another side effect: there is internal cache for function module signature. When I change signature in ABAP (add\remove parameters) it’s not immediately changing during bean method call. How to drop this cache without restarting whole server (restarting adapter, ear application not helps)?

P.S. Sorry for My English.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Found solutions by self.

It's possible to droop Jco cache in SAP nw admin - availability and performance - resource monitoring - jco monitoring - metadata cache.

After dropping cache exporting params with structure begin working.

Answers (0)