Seems like you need to set some object before calling service.findAll();
While this method is executing it might be trying to access some object which is turning out to be null. Debug and find out the exact line which is throwing NPE.
Frage
my code is :
import ir.sbu.nlp.wordnet.data.model.FNSense;
import ir.sbu.nlp.wordnet.data.model.FNSynset;
import ir.sbu.nlp.wordnet.data.model.FNSynsetsRelation;
import ir.sbu.nlp.wordnet.service.FNSynsetService;
import java.util.Vector;
public class sample2 {
public static void main(String[] args) {
FNSynsetService service=new FNSynsetService();
service.findAll();
}
}
and when I run it display this error
Data Load Started... Exception in thread "main" java.lang.NullPointerException at ir.sbu.nlp.wordnet.data.dao.FNWordDao.getTextNode(FNWordDao.java:513) at ir.sbu.nlp.wordnet.data.dao.FNWordDao.loadWords(FNWordDao.java:438) at ir.sbu.nlp.wordnet.data.dao.FNWordDao.<init>(FNWordDao.java:76) at ir.sbu.nlp.wordnet.data.dao.FNDaoManager.<init>(FNDaoManager.java:25) at ir.sbu.nlp.wordnet.data.dao.FNDaoManager.getInstance(FNDaoManager.java:40) at ir.sbu.nlp.wordnet.service.FNSynsetService.<init>(FNSynsetService.java:51) at sample2.main(sample2.java:12)
Can every one help me? I copy every file needed for installation
Lösung
Seems like you need to set some object before calling service.findAll();
While this method is executing it might be trying to access some object which is turning out to be null. Debug and find out the exact line which is throwing NPE.