Hi -

This is a compilation error. It is caused because the biojava write
method is expecting a Namespace object from the biojavax package but
netbeans has guessed that you wanted a Namespace object from the
javax.xml.stream.events package and has imported this for you.

If you remove that import ( javax.xml.stream.events.Namespace) and
then import the biojavax Namespace object it should compile.

- Mark

On 10/4/07, El Mabrouk M <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I have just started to learn biojava. I have written a small
> program that write a sequence in fasta file with the help of the biojavax 
> method
>
> RichSequence.IOTools.writeFasta(seqOut, s1, ns);
> I have got the error "cannot find symbol".
> I'm using biojava 1.5, jdk 1.6 and netbeans.
> What can be done to fix this problem?
>
> This is what I tried:
>
> import org.biojava.bio.seq.*;
> import java.io.*;
> import org.biojava.bio.symbol.SymbolList;
> import org.biojavax.RichObjectFactory;
> import javax.xml.stream.events.Namespace;
> import org.biojavax.bio.seq.RichSequence;
>
> public class SeqFastaF {
>     public static void main(String[] args) {
>         SymbolList dna0 = 
> DNATools.createDNASequence("atgctgaacaacggcatggcaacttacggacggactacgact", 
> "dna_1");
>         Sequence s1 = DNATools.createDNASequence(dna0.seqString(), "dna_0");
>         try {
>             OutputStream seqOut = System.out;
>             Namespace ns = (Namespace) 
> RichObjectFactory.getDefaultNamespace();
>             RichSequence.IOTools.writeFasta(seqOut,s1,ns);
>         } catch (IOException ex) {
>             //io error
>             ex.printStackTrace();
>         }
>     }
> }
>
> Error:
> cannot find symbol
> symbol  : method 
> writeFasta(java.io.OutputStream,org.biojava.bio.seq.Sequence,javax.xml.stream.events.Namespace)
> location: class org.biojavax.bio.seq.RichSequence.IOTools
>
>
>
> ---------------------------------
> Be smarter than spam. See how smart SpamGuard is at giving junk email the 
> boot with the All-new Yahoo! Mail
> _______________________________________________
> Biojava-l mailing list  -  [email protected]
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>
_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l

Reply via email to