I'd need to see all your code to be sure, but it looks like your file isn't initialized, and that's what's causing the null pointer exception. Whenere is 'file' coming from in creating the bufferedReader? If you're sure it's valid, I'd recommed breaking that line up into sub lines to track down which statement is causing problems.
Greg > -----Original Message----- > From: Guoneng Zhong [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 28, 2002 4:31 PM > To: [EMAIL PROTECTED] > Subject: [Biojava-l] exception with no stacktrace > > > Hi, > I tried the following lines and got the following exception. > Problem is > that I don't know what the problem is. What line and what the > underlying cause. There is no stacktrace beyond my own... > > Thanks ahead for all the help! > > G > > AlignmentFormat format = new MSFAlignmentFormat(); > Alignment alignment = format.read(new BufferedReader(new > FileReader(file))); > List labels = alignment.getLabels(); > System.out.println("Retrieved "+labels.size()+" labels"); > for(int i=0;i<labels.size();i++){ > SymbolList list = (SymbolList)labels.get(i); > System.out.println(list.seqString()); > } > > MSFFormatReader null > Exception in thread "main" java.lang.NullPointerException > at test.TestClustalW.readFile(TestClustalW.java:27) > at test.TestClustalW.main(TestClustalW.java:20) > > _______________________________________________ > Biojava-l mailing list - [EMAIL PROTECTED] > http://biojava.org/mailman/listinfo/biojava-l > _______________________________________________ Biojava-l mailing list - [EMAIL PROTECTED] http://biojava.org/mailman/listinfo/biojava-l