toJSON method is missing from the java action in sap

0
Hello Everyone, I am using SAPBAPI connector module to get data after pasting the JCO3.dll and JCO3.jar file in the userlib folder I am gating error mentioned billow    Buildfile: C:\SAPTestApp-main\deployment\build_core.xml compile:     [javac] Compiling 228 source files to C:\SAPTestApp-main\deployment\run\bin     [javac] C:\SAPTestApp-main\javasource\sapbapiconnector\processor\BAPIProcessor.java:88: error: cannot find symbol     [javac]                 responseJSON = bapiFunction.getExportParameterList().toJSON();     [javac]                                                                     ^     [javac]   symbol:   method toJSON()     [javac]   location: interface JCoParameterList     [javac] C:\SAPTestApp-main\javasource\sapbapiconnector\processor\BAPIProcessor.java:97: error: cannot find symbol     [javac]                 tableResponseJSON = bapiFunction.getTableParameterList().toJSON();     [javac]                                                                         ^     [javac]   symbol:   method toJSON()     [javac]   location: interface JCoParameterList     [javac] C:\SAPTestApp-main\javasource\sapbapiconnector\utils\BAPIAttributeMapper.java:47: error: cannot find symbol     [javac]         bapiFunction.getImportParameterList().fromJSON(functionRequest.getImportRequestJSON());     [javac]                                              ^     [javac]   symbol:   method fromJSON(String)     [javac]   location: interface JCoParameterList     [javac] Note: Some input files use or override a deprecated API.     [javac] Note: Recompile with -Xlint:deprecation for details.     [javac] 3 errors   
asked
1 answers
2

This method was added in v3.1:

https://javadoc.io/static/com.sap.cloud/neo-java-web-api/2.42.18/com/sap/conn/jco/JCoRecord.html#toJSON(java.io.Writer)

so maybe you have a version before 3.1? If so, update the JAR and you’ll be all set.

answered