FlatBufferBuilder fbb = new FlatBufferBuilder(1024);
String directory = \"/Users/samarnath/RmsOne/CreateFlatBuffer/src/com/rms/objects/resources\";
From the documentation: "Everything else (other tables, strings, vectors) MUST be created before the start of the table they are referenced in."
So move int policyName = fbb.createString(riskitems[1])
and any other strings/vectors/tables you reference in SingleCoverRiskPolicy
to before startSingleCoverRiskPolicy
.