Forum Discussion

vpnkumar's avatar
vpnkumar
Occasional Contributor
5 years ago
Solved

Getting java.lang.NoClassDefFoundError in Ready API

HI all,

I have a need where I need to come up with a function which with return a Jason to map

Json

{ "a":

  { "b": 1,

    "c": null,

    "d": [false, true]

  },

  "e": "f",

  "g": 2.3

}

 Map

Key

Value

a.b

1

a.c

null

a.d[0]

false

a.d[1]

true

e

f

g

2.3

 

This can be done using JsonFlattener jar and was implemented in Eclipse, so added that external Jar in Ready API under “Custom Java libraries” but on executing this function it error out with message “java.lang.NoClassDefFoundError”, can some one please help me how this can be resolved.

 

Below is the code

import com.github.wnameless.json.flattener.JsonFlattener;

 

public def func1(def expected){

def resultMap = [ : ];

resultMap = JsonFlattener.flattenAsMap(expected)

return resultMap;

}

 

 

5 Replies