[Biojava-l] NullPointerException Exception While Creating DNA MultipleSequenceAlignment
Muhammad Tariq Pervez
tariq_cp at hotmail.com
Fri Jul 22 11:56:52 UTC 2011
Dear all,
I faced the NullPointerException exception while creating the DNA MultipleSequenceAlignment. The same goes right with protein sequence. Exception is thrown at the following line
dnaProfile = Alignments.getMultipleSequenceAlignment(tmpLst);
tmpLst is list of DNA sequences created/declared as follows
List<DNASequence> tmpLst=new ArrayList<DNASequence>();
Note: the tmpLst is filled/populated with two or more two sequences.
I traced the exception by going into Alignments.getMultipleSequenceAlignmen method of the Alignments class and found the following line of code the cause of exception.
static <E> List<E> getListFromFutures(List<Future<E>> futures) {
List<E> list = new ArrayList<E>();
for (Future<E> f : futures) {
// TODO when added to ConcurrencyTools, log completions and exceptions instead of printing stack traces
try {
list.add(f.get());**
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
return list;
}
** is the cause of exception. All is right with the protein sequences.
Can any body help/guide me regarding the problem.
Best Regards.
Tariq, PhD Scholar
More information about the Biojava-l
mailing list