You are right. When I do the following replacements "his" -> "HIS" and "ile" -> "ILE" in the org/biojava/bio/seq/TranslationTables.xml my code and a TraceViewer demo in biojava package perfectly worked on Windows and Linux. I think the problem is related with lower/upper case conversions. In turkish uppercase of 'i' is not 'I' but 'I' with a dot. Also lower case of 'I' is not 'i' but lower case dotless i (ı). Current locale settings affects the behaivour of toLower(), toUpper().
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#toUpperCase(java.util.Locale) I made the code run by modifying XML file in biojava.jar but i know it is not a nice solution. Thank you Huseyin Kaya On Mon, 24 Sep 2007 08:59:20 +0100, Richard Holland wrote > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Could this be an encoding problem with the XML file in the JAR? i.e. > Linux and Windows generally use different text encodings and so may > misinterpret some of the characters in the XML file, generating the > errors you see. I suppose this could be an issue if the Windows > environment is running internationalisation under a non-Western-European > character set, whereas the Linux box is running with an English > character set. > > Unfortunately I do not have access to a Windows machine to test this > on. > > Do any other BJ developers out there have access to a Windows machine > that they can investigate this with? > > cheers, > Richard > > hkaya wrote: > > On windows machine, I downloaded > > http://www.biojava.org/download/bj15/bin/BioJava1.5-bin.tar.gz with Internet > > Explorer and extract jar files. I also tried downloading the same file on > > linux and > > copy the jar files to windows with samba. On both case the same error > > occurs. > > After your message I delete and downloaded the same file again, but > > the situation is same. > > > > Huseyin > > > > On Sun, 23 Sep 2007 20:19:09 +0800, Mark Schreiber wrote > >> The stack trace indicates that the resources in you biojava.jar file > >> are missing or corrupt. Where did you get it from? > >> > >> If you copy the jar from you linux machine to windows do you still > >> get the same error? > >> > >> - Mark > >> > >> On 9/23/07, hkaya <[EMAIL PROTECTED]> wrote: > >>> Hello > >>> > >>> The following small code perfectly runs on Linux but > >>> it fails on Windows and Mac. I'm using biojava 1.5. > >>> Could anybody tell me where i am doing something wrong? > >>> > >>> Thanks > >>> Huseyin Kaya > >>> > >>> > >>> 1. TraceTest.java > >>> > >>> import java.io.File; > >>> import org.biojava.bio.chromatogram.Chromatogram; > >>> import org.biojava.bio.chromatogram.ChromatogramFactory; > >>> > >>> public class TraceTest { > >>> public static void main(String[] args) { > >>> try { > >>> Chromatogram trace = > > ChromatogramFactory.create(new File("test.scf")); > >>> System.out.println("Success!"); > >>> } catch (Exception e){ > >>> System.out.println("Failed!"); > >>> e.printStackTrace(); > >>> } > >>> } > >>> } > >>> > >>> 2. Test chromatogram file : > >>> http://istanbul.be.itu.edu.tr/~huseyin/test.scf > >>> > >>> 3. Exception thrown in Windows XP/Vista: > >>> > >>> Desktop> java -classpath biojava-1.5.jar;. TraceTest > >>> Exception in thread "main" org.biojava.bio.BioError: Unable to > >>> initialize > >>> DNATools > >>> at org.biojava.bio.seq.DNATools.<clinit>(DNATools.java:117) > >>> at org.biojava.bio.program.scf.SCF$V3Parser.parseSamples(SCF.java:560) > >>> at org.biojava.bio.program.scf.SCF$Parser.parse(SCF.java:350) > >>> at > >>> org.biojava.bio.program.scf.SCF$ParserFactory.parse(SCF.java:206) > >>> at org.biojava.bio.program.scf.SCF.load(SCF.java:149) > >>> at org.biojava.bio.program.scf.SCF.load(SCF.java:141) > >>> at org.biojava.bio.program.scf.SCF.create(SCF.java:126) > >>> at > >>> > > org.biojava.bio.chromatogram.ChromatogramFactory.create(ChromatogramFactory.java:75) > >>> at TraceTest.main(TraceTest.java:8) > >>> Caused by: org.biojava.bio.BioError: Unable to initialize RNATools > >>> at org.biojava.bio.seq.RNATools.<clinit>(RNATools.java:126) > >>> at org.biojava.bio.seq.DNATools.<clinit>(DNATools.java:110) > >>> ... 8 more > >>> Caused by: org.biojava.bio.BioError: Couldn't parse > >>> TranslationTables.xml > >>> at > >>> org.biojava.bio.seq.RNATools.loadGeneticCodes(RNATools.java:529) > >>> at org.biojava.bio.seq.RNATools.<clinit>(RNATools.java:124) > >>> ... 9 more > >>> Caused by: org.biojava.bio.symbol.IllegalSymbolException: > >>> Token `his' does not appear as a named symbol in alphabet > > `PROTEIN-TERM' > >>> at > >>> org.biojava.bio.seq.io.NameTokenization.parseToken(NameTokenization.java:110) > >>> at > >>> org.biojava.bio.seq.RNATools.loadGeneticCodes(RNATools.java:520) > >>> ... 10 more > >>> > >>> > >>> _______________________________________________ > >>> Biojava-l mailing list - [email protected] > >>> http://lists.open-bio.org/mailman/listinfo/biojava-l > >>> > > > > > > Huseyin > > > > _______________________________________________ > > Biojava-l mailing list - [email protected] > > http://lists.open-bio.org/mailman/listinfo/biojava-l > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2.2 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFG925X4C5LeMEKA/QRAhP0AKCM42VcwZmwPFBRvwK3NtNdmZJwJQCdF3EO > GNJ0p5xNdQeQ1oNYwrdSmMg= > =Hu8w > -----END PGP SIGNATURE----- Huseyin _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
