[Biojava-l] Problem Running program on command line

Richard Holland holland at ebi.ac.uk
Wed Sep 26 18:25:16 UTC 2007


That's a very odd stack trace. It looks like you're running this through a
java-to-native-code compiler - gcj, jikes, etc.? The exception appears to
be  thrown by libgcj, not any part of biojava.

Could you try running it with a more traditional JRE such as the ones
supplied by Sun. If it works, then the problem lies with gcj or whatever
it is you are using to run this at present. If it doesn't, please report
the new stack trace to us and we will investigate further.

cheers,
Richard

On Wed, September 26, 2007 6:24 pm, abhi232 at cc.gatech.edu wrote:
>
> 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
>>
>>
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>


-- 
Richard Holland
BioMart (http://www.biomart.org/)
EMBL-EBI
Hinxton, Cambridgeshire CB10 1SD, UK




More information about the Biojava-l mailing list