[Biojava-l] exception with no stacktrace

Cox, Greg gcox@netgenics.com
Thu, 28 Feb 2002 16:54:49 -0500


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:Guoneng.Zhong@med.nyu.edu]
> Sent: Thursday, February 28, 2002 4:31 PM
> To: biojava-l@biojava.org
> 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  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>