Modifying the Affiliation of Subscriber as Owner in pubsub node

Hello,

I am using Smack version 4.2.0, and trying to modifying the user affiliation for pubsub node,
I used the following code to modify the Affiliation:

PubSubManager mgr = PubSubManager.getInstance(connection);
Form frm = new Form(DataForm.Type.form);
mgr.getNode(nodeName).getNodeConfiguration();
frm.createAnswerForm();
frm.setAnswer(ConfigureNodeFields.publish_model.getFieldName(),userNamePublisher);

Getting exception :- java.lang.IllegalArgumentException: Field not found for the specified variable name.
please correct me i am doing something wrong ,Thanks in advance