I have a Bean Class Activity which associates List of Profiles and a User Bean. Now If I am trying to insert this Activity bean in Solr by SOLRJ, it is giving me null pointer exception. The Exception is causing by below piece of code:
public <T> boolean insert (T bean) {
try {
UpdateResponse response = solrClient.addBean(bean);
System.out.println("insert bean ElapsedTime: " + response.getElapsedTime());
solrClient.commit();
return true;
} catch (IOException | SolrServerException e) {
e.printStackTrace();
}
return false;
}
Refer below URL for nested document insertion and searching: