Skip to Content
author's profile photo Former Member
Former Member

Java mapping error

I have a synchronous REST - ECC scenario. I am using REST sender adapter.

In the response message, i am using a java mapping to convert xml to JSON. I am getting this error

does not implement the required interface or does not enhance the class

I downloaded a jar file json-org.jar. I used this as imported archive in ESR and added this under operation mapping for response

JSON-org.JPG (84.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 12, 2016 at 10:22 AM

    Hi Midhun,

    Can you share the code you wrote?

    The error simply means PI is not finding the required standard java mapping classes.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 12, 2016 at 09:54 AM

    Hi Midhun,

    Why do you need to convert XML to JSON in mapping - why not to utilize standard XML/JSON conversion functionality of a REST adapter?

    Regarding an error you get. Library that you imported is a JSON processor, not a valid mapping. So you need to develop your custom mapping program and you may get use of that JSON library in a mapping program if necessary, but you cannot directly refer to JSON library in an operation mapping. In operation mapping, you can only refer to Java classes that extend abstract class



    Add a comment
    10|10000 characters needed characters exceeded

    • Midhun,

      Jettison has parameterization to switch on/off escaping of forward slash which can be set through its configuration, but looking in REST adapter, it doesn't look like it implements support of this configuration option currently. So maybe you can raise a suggestion to SAP to implement this.

      For PO 7.4, an appropriate NWDS version is 7.31. As for SP level of NWDS, following SAP recommendation, "Install SAP NetWeaver Developer Studio (NWDS) 7.3 EHP1 latest SP to use it as development environment for SAP NetWeaver 7.4 latest SP. If you are using SAP NetWeaver 7.4 SP lower that the latest, please install SAP NetWeaver Developer Studio 7.3 EHP1 with SP version five levels higher than the number of your SAP NetWeaver 7.4 SP." (extract from SAP Note 1791485). In your case, NWDS 7.31 with currently latest SP is applicable.

      Yes, you can use pure Eclipse installation for Java mappings development. Having NWDS in place simplifies construction of build path of a Java mapping project (necessary mapping API libraries are already there and can be referenced, no need to download specific JAR files from application server), but if you already have pure Eclipse in place and if you are fine with constructing build path manually, then pure Eclipse is absolutely fine for development of Java mapping programs.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.