I am getting below error when creating records. Can you please some tell what is the issue here.
Error Msg:
<30 Aug, 2017 1:49:14 PM IST> <Error> <HTTP> <BEA-101017> <[ServletContext@173662444[app:_auto_generated_ear_ module:SampleUnswCrm path:null spec-version:3.0], request: weblogic.servlet.internal.ServletRequestImpl@6586fb59[
GET /SampleUnswCrm/push/enquiries/to-client-crm.html HTTP/1.1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://localhost:7001/SampleUnswCrm/index.jsp
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8
]] Root cause of ServletException.
java.lang.NullPointerException
at com.feed.layer.controller.PushEnquiryFeedsToClientCrm.formData(PushEnquiryFeedsToClientCrm.java:65)
at com.feed.layer.controller.PushEnquiryFeedsToClientCrm.pushEnquiryFeedsToClientCrm(PushEnquiryFeedsToClientCrm.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Truncated. see log file for complete stacktrace
public void formData() {
Create create = new Create();
Entity entity = new Entity();
AttributeCollection collection = new AttributeCollection();
addAttribute(collection, "kpmgc_email", "sdada@asfsakjh.kjdf");
addAttribute(collection, "kpmgc_firstname", "Test");
addAttribute(collection, "kpmgc_lastname", "Test");
entity.setAttributes(collection);
create.setEntity(entity);
try {
My code:
CreateResponse createResponse = new CreateResponse();
createResponse = _service.create(create); -- getting error here
} catch (RemoteException e) {
e.printStackTrace();
} catch (IOrganizationService_Create_OrganizationServiceFaultFault_FaultMessage e) {
e.printStackTrace();
}
}
private void addAttribute(AttributeCollection collection, String key, Object value) {
KeyValuePairOfstringanyType values = new KeyValuePairOfstringanyType();
values.setKey(key);
values.setValue(value);
collection.addKeyValuePairOfstringanyType(values);
}
Thanks in advance.
*This post is locked for comments