[Biojava-l] Problem Running program on command line

abhi232 at cc.gatech.edu abhi232 at cc.gatech.edu
Wed Sep 26 17:24:34 UTC 2007


Hello all,
I am trying a simple command line program in which i take a abi file as
input and then print the sequence out.

This is my source code:
import java.io.File;
import java.io.IOException;
import org.biojava.bio.program.abi.ABITrace;
import org.biojava.bio.seq.*;
import org.biojava.bio.Annotation;
import org.biojava.bio.seq.SequenceTools;
import org.biojava.bio.seq.DNATools;
/*
 * Command.java

 */


public class Command {

    /** Creates a new instance of Command */
    public Command() {
    }

    public static void main(String args[])
    {
        String arg;
        int len = args.length;
        arg = args[0];
        System.out.println("The input argument path is:"+arg);
        //String path = "C:/applicationfolder/";
        File ft = new File(arg);

                System.out.println("File object created successfully");


        try {
            System.out.println("here1");
            ABITrace trace = new ABITrace(ft);
            Sequence new_seq =
SequenceTools.createSequence(trace.getSequence(),ft.toString(),ft.toString(),Annotation.EMPTY_ANNOTATION);
            String sequence = new_seq.seqString();
            System.out.println("The sequence is:"+sequence);

        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

}

I have set the classpath with all the jar files the biojava library
has.But I am getting the following error.

Exception in thread "main" org.biojava.bio.BioError: Unable to initialize
DNATools
   at org.biojava.bio.seq.DNATools.<clinit>() (Unknown Source)
   at java.lang.Class.initializeClass() (/usr/lib64/libgcj.so.5.0.0)
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib64/libgcj.so.5.0.0)
   at org.biojava.bio.program.abi.ABITrace.getSequence() (Unknown Source)
   at Command.main(java.lang.String[]) (Unknown Source)
Caused by: java.lang.IncompatibleClassChangeError: field
org.biojava.bio.seq.io.CharacterTokenization.CHARACTER was not found.
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib64/libgcj.so.5.0.0)
   at org.biojava.bio.seq.io.CharacterTokenization.getTokenType() (Unknown
Source)
   at
org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.getTokenType()
(Unknown Source)
   at
org.biojava.bio.symbol.SimpleSymbolList.SimpleSymbolList(org.biojava.bio.seq.io.SymbolTokenization,
java.lang.String) (Unknown Source)
   at org.biojava.bio.seq.DNATools.<clinit>() (Unknown Source)

Can somebody please guide me on this?
Thanks in advance.

 _______________________________________________
> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>
>




More information about the Biojava-l mailing list