From: Hayden, K. M. <KH...@be...> - 2009-06-15 19:16:19
|
Hey Rutger, Finally figured this out and I have an alternative to suggest. Instead of adding predicateHandlerMapping.properties to the JVM classpath, you could just recompile and load that source up, so that predicateHandlerMapping.properties is copied to the bin folder for anyone who checks out nexml. That way anyone setting up nexml would only have to put a path to the nexml bin in classpaths.xml and not have to worry about adding a path to predicateHandlerMapping.properties to their JVM classpath. Otherwise, adding a path to predicateHandlerMapping's directory in my .bashrc file (along with a path to nexml's bin in classpaths.xml) worked. Kasia Katherine "Kasia" Hayden Bennington College, Class of 2011 312.576.8175 kh...@be... -----Original Message----- From: Rutger Vos [mailto:rut...@gm...] Sent: Wed 6/10/2009 5:48 PM To: Hayden, Katherine M. Cc: Wayne Maddison; TreeBASE Developers; Enrico Pontelli; ju...@ig...; nex...@li...; ph...@go... Subject: Re: [Nexml-discuss] CDAO term inclusion community process Hi Kasia, you don't want to have the properties file listed in your classpaths.xml. All you need in there is the path to the root of the compiled nexml classes, i.e. <classpath>../../nexmltest/java/bin</classpath> or wherever the root of the folder structure is that contains org/nexml/model/Annotatable.class (and all other core nexml classes) and mesquite/nexml/InterpretNEXML/HyperlinkHandler.class (and all other mesquite/nexml classes). Under a clean mesquite install that path is all you need to have in your classpaths.xml, you don't need to point to the nexml source, or the mesquite source, or your Mesquite_Folder, or your properties file. The properties file needs to be in the jvm classpath (NOT in the classpaths.xml) such that it can be read from within InterpretNEXML.class. Please have a look at the code for java/src/mesquite/nexml/InterpretNEXML/InterpretNEXML.java for where that properties file is read (lines 65 and 81) and try to figure out why it's not working - reading a properties file is pretty standard so I'm a little bit at the end of my wits as to why this isn't working. Once you think you have it figured out, try loading the attached file and send me the mesquite log. The first log you sent me you were basically there except that the properties file couldn't be found. Rutger On Wed, Jun 10, 2009 at 2:07 PM, Hayden, Katherine M.<KH...@be...> wrote: > Hi Rutger, > > Thanks for spending all this time working through this! > > When I've used the url > https://nexml.svn.sourceforge.net/svnroot/nexml/trunk/nexml/java for > checkout, rather than > https://nexml.svn.sourceforge.net/svnroot/nexml/trunk/nexml/ I don't have > the Examples folder that the hyperlink.xml file is in, so I can't read that. > > But about using the first url, I now have the problem that when I try to > export in Nexml I no longer get the default hyperlink.xml that treated > hyperlink as a predicate; instead it crashes, with the log file reproduced > below. What's odd is that for Mesquite to even load nexml now, > predicateHandlerMapping.properties must be commented out. > > So, two log files. The fist is where the .properties file is commented out > in my classpaths.xml file and thus Mesquite loads the nexml module, provides > exporting as NeXml as an option, but crashes when I try to export. The > second is when the .properties file isn't commented out in my classpaths.xml > file, but not you don't see that Mesquite loads nexml in the log. > > Error message when I try to export with nexml. Log: > > > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/dom4j-1.6.1.jar > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/JSci.zip > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/pal.zip > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/Jama-1.0.1.zip > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/iText.jar > Mesquite version 2.6+ (build 499) > Copyright (c) 1997-2009 W. Maddison and D. Maddison > The basic Mesquite package (class library and basic modules) is free > software; you can redistribute it and/or modify it under the terms of the > GNU Lesser General Public License. Mesquite is distributed in the hope > that it will be useful, but WITHOUT ANY WARRANTY. For details on license > and lack of warranty see the GNU Lesser General Public License by selecting > "Display License" from the Window menu or at www.gnu.org > > Principal Authors: Wayne Maddison & David Maddison > Development Team: Wayne Maddison, David Maddison, Peter Midford, Jeff Oliver > Development Team Alumnus: Danny Mandel > > > Wed Jun 10 16:25:01 EDT 2009 > Running under Java 1.6.0_13; virtual machine by Sun Microsystems Inc. on > Linux 2.6.28-13-generic (architecture: i386) > User: kasia > > Incorporated from /home/kasia/workspace/Mesquite Project/Mesquite_Folder/ > dom4j-1.6.1.jar JSci.zip pal.zip Jama-1.0.1.zip iText.jar > > > Mesquite directory: /home/kasia/workspace/Mesquite Project/Mesquite_Folder/ > Log file located in: /home/kasia/Mesquite_Support_Files > Prefs directory: /home/kasia/Mesquite_Support_Files/Mesquite_Prefs > > Modules loading from directory /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/mesquite/ > > ancstates basic categ charMatrices charts cont genesis io lists minimal > parsimony stochchar trees align assoc batchArch coalesce consensus correl > distance diverse dmanager mb meristic molec ornamental pairwise rhetenor > search tol treefarm iText jama jsci pal trunk > > Additional modules loaded from > /home/kasia/workspace/MesquiteGSoC/Mesquite_Folder > > > Additional modules loaded from /home/kasia/workspace/nexmltest/java/bin > nexml > > 687 modules installed. > 1 prerelease substantive modules installed. > > Mesquite makes use of BrowserLauncher by Eric Albert, corejava.Format by > Horstmann & Cornell, and iText by Lowagie & Soares > > ------------------------------ > > > > > THIS IS A PRERELEASE (BETA) VERSION: Please do not publish results from this > version without permission of authors. > > Loading manual for searching..... manual ready. > Mesquite > openGeneral "Open_URL" > Opening external > at Wed Jun 10 16:25:13 EDT 2009 > Dialog box shown. Title: Open URL > > For console choice use component numbers > 1 <blank> > 2 (Cancel) > 3 (OK) > Enter number of component to select. > If component is a editable text, enter > both number of component and the text within it > (e.g. if you want to specify the text for component 1 to be "100.0", > enter "1 100.0" > > (Open URL) # > (Mesquite) # Dialog closed > Location: > http://nexml-dev.nescent.org/nexml/examples/translations/hyperlink.nex > > Reading NEXUS file hyperlink.nex > Reading block: TAXA > Reading block: TREES > Reading block: NOTES > Reading block: MESQUITE > File reading complete (file hyperlink.nex) > Basic File Coordinator > export > Dialog box shown. Title: Export format > > For console choice use component numbers > Export part or all of the information as a file of the following > format > -------------- > 1 List > 1 *Export NEXUS Tree File > 2 Export NEXUS Tree File from Tree Source > 3 Phylip (trees) > 4 Export Taxa Distance Matrix > 5 NeXML (taxa, matrices, trees and annotations) > -------------- > Exports NEXUS file with a tree block, and optionally a taxa block. > 2 (Cancel) > 3 (OK) > Enter number of component to select. > If component is a list or choice menu, enter > both number of component and number of item within it to choose > (e.g. if a list is component 1, and you want to select its item 2, enter "1 > 2" > > > (Export format) # > (Mesquite) # Dialog closed > (Following stack trace from object of class: class > mesquite.lib.PendingCommand) > java.lang.NullPointerException > at java.util.Properties$LineReader.readLine(Properties.java:418) > at java.util.Properties.load0(Properties.java:337) > at java.util.Properties.load(Properties.java:325) > at mesquite.nexml.InterpretNEXML.InterpretNEXML.exportFile(Unknown > Source) > at > mesquite.minimal.BasicFileCoordinator.BasicFileCoordinator.export(BasicFileCoordinator.java:1003) > at > mesquite.minimal.BasicFileCoordinator.BasicFileCoordinator.doCommand(BasicFileCoordinator.java:1488) > at mesquite.lib.PendingCommand.go(PendingCommand.java:205) > at mesquite.lib.MainThread.run(MainThread.java:116) > > Dialog box shown. Title: Crash > > For console choice use component numbers > A command could not be completed because an exception occurred (i.e. a > crash; class java.lang.NullPointerException ). WARNING: there is a chance > this crash could have corrupted your data. Please check your data > carefully. If you save any files, you might best use Save As... in case > file saving doesn't work properly. > > Please send a report of this crash to the Mesquite server, to help us debug > it and improve Mesquite. None of your data will be sent, but your log file > up to this point will be sent. > 1 (Close without sending) > 2 (OK, Send and Force Quit) > 3 (OK, Send Report and Continue) > Enter number of component to select. > > (Crash) # > (Mesquite) # Dialog closed > > > > > - Curiously, when I change my classpaths.xml file so that > predicateHandlerMapping isn't commented out, the nexml module doesn't even > load and exporting as NeXml isn't an option. classpaths.xml: > > <?xml version="1.0"?> > <mesquite> > <classpath>../../MesquiteGSoC/Mesquite_Folder</classpath> > <classpath>predicateHandlerMapping.properties</classpath> > <!-- classpath>../../nexml/java</classpath--> > <!--classpath>../..nexml/java/src</classpath--> > > <!--classpath>../../teest/java/bin</classpath> < The test that > worked to bring up nexml option again, but crashed. Only needed this > classpath. --> > <!--classpath>../../nexmltest3/nexml/java/bin</classpath--> > <classpath>../../nexmltest/java/bin</classpath> > > </mesquite> > > > Log: > > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/dom4j-1.6.1.jar > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/JSci.zip > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/pal.zip > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/Jama-1.0.1.zip > Jar file added to classpath: /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/jars/iText.jar > Mesquite version 2.6+ (build 499) > Copyright (c) 1997-2009 W. Maddison and D. Maddison > The basic Mesquite package (class library and basic modules) is free > software; you can redistribute it and/or modify it under the terms of the > GNU Lesser General Public License. Mesquite is distributed in the hope > that it will be useful, but WITHOUT ANY WARRANTY. For details on license > and lack of warranty see the GNU Lesser General Public License by selecting > "Display License" from the Window menu or at www.gnu.org > > Principal Authors: Wayne Maddison & David Maddison > Development Team: Wayne Maddison, David Maddison, Peter Midford, Jeff Oliver > Development Team Alumnus: Danny Mandel > > > Wed Jun 10 16:30:03 EDT 2009 > Running under Java 1.6.0_13; virtual machine by Sun Microsystems Inc. on > Linux 2.6.28-13-generic (architecture: i386) > User: kasia > > Incorporated from /home/kasia/workspace/Mesquite Project/Mesquite_Folder/ > dom4j-1.6.1.jar JSci.zip pal.zip Jama-1.0.1.zip iText.jar > > > Mesquite directory: /home/kasia/workspace/Mesquite Project/Mesquite_Folder/ > Log file located in: /home/kasia/Mesquite_Support_Files > Prefs directory: /home/kasia/Mesquite_Support_Files/Mesquite_Prefs > > Modules loading from directory /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/mesquite/ > > ancstates basic categ charMatrices charts cont genesis io lists minimal > parsimony stochchar trees align assoc batchArch coalesce consensus correl > distance diverse dmanager mb meristic molec ornamental pairwise rhetenor > search tol treefarm iText jama jsci pal trunk > > Additional modules loaded from > /home/kasia/workspace/MesquiteGSoC/Mesquite_Folder > > > Additional modules loaded from /home/kasia/workspace/Mesquite > Project/Mesquite_Folder/predicateHandlerMapping.properties > > > 686 modules installed. > 1 prerelease substantive modules installed. > > Mesquite makes use of BrowserLauncher by Eric Albert, corejava.Format by > Horstmann & Cornell, and iText by Lowagie & Soares > > --------------------- > > > THIS IS A PRERELEASE (BETA) VERSION: Please do not publish results from this > version without permission of authors. > > Loading manual for searching..... manual ready. > Mesquite > openGeneral "Open_URL" > Opening external > at Wed Jun 10 16:31:08 EDT 2009 > Dialog box shown. Title: Open URL > > For console choice use component numbers > 1 <blank> > 2 (Cancel) > 3 (OK) > Enter number of component to select. > If component is a editable text, enter > both number of component and the text within it > (e.g. if you want to specify the text for component 1 to be "100.0", > enter "1 100.0" > > (Open URL) # > (Mesquite) # Dialog closed > Mesquite > openGeneral "Open_URL" > Opening external > at Wed Jun 10 16:31:25 EDT 2009 > Dialog box shown. Title: Open URL > > For console choice use component numbers > 1 <blank> > 2 (Cancel) > 3 (OK) > Enter number of component to select. > If component is a editable text, enter > both number of component and the text within it > (e.g. if you want to specify the text for component 1 to be "100.0", > enter "1 100.0" > > (Open URL) # > (Mesquite) # Dialog closed > Location: > http://nexml-dev.nescent.org/nexml/examples/translations/hyperlink.nex > > Reading NEXUS file hyperlink.nex > Reading block: TAXA > Reading block: TREES > Reading block: NOTES > Reading block: MESQUITE > File reading complete (file hyperlink.nex) > Basic File Coordinator > export > Dialog box shown. Title: Export format > > For console choice use component numbers > Export part or all of the information as a file of the following > format > -------------- > 1 List > 1 *Export NEXUS Tree File > 2 Export NEXUS Tree File from Tree Source > 3 Phylip (trees) > 4 Export Taxa Distance Matrix > -------------- > Exports NEXUS file with a tree block, and optionally a taxa block. > 2 (Cancel) > 3 (OK) > Enter number of component to select. > If component is a list or choice menu, enter > both number of component and number of item within it to choose > (e.g. if a list is component 1, and you want to select its item 2, enter "1 > 2" > > > (Export format) # > (Mesquite) # Dialog closed > > > Kasia > > > > Katherine "Kasia" Hayden > Bennington College, Class of 2011 > 312.576.8175 > kh...@be... > > > > -----Original Message----- > From: Rutger Vos [mailto:rut...@gm...] > Sent: Wed 6/10/2009 3:52 PM > To: Hayden, Katherine M. > Cc: Wayne Maddison; TreeBASE Developers; Enrico Pontelli; ju...@ig...; > nex...@li...; ph...@go... > Subject: Re: [Nexml-discuss] CDAO term inclusion community process > > Ok, so now that you have nexml as an export option, could you send the > log for when you're reading the hyperlink.xml file? > > On Wed, Jun 10, 2009 at 8:41 AM, Hayden, Katherine > M.<KH...@be...> wrote: >> Hi Rutger, >> >> I couldn't get NeXml as an export option with these new instructions, but >> when I made a test directory and used the old checkout url >> (https://nexml.svn.sourceforge.net/svnroot/nexml/trunk/nexml/java) the >> option to export as NeXml was back. Still trying to figure out the >> difference. >> >> Kasia >> >> >> >> Katherine "Kasia" Hayden >> Bennington College, Class of 2011 >> 312.576.8175 >> kh...@be... >> >> >> >> -----Original Message----- >> From: Rutger Vos [mailto:rut...@gm...] >> Sent: Wed 6/10/2009 7:07 AM >> To: Wayne Maddison >> Cc: Hayden, Katherine M.; TreeBASE Developers; Enrico Pontelli; >> ju...@ig...; nex...@li...; >> ph...@go... >> Subject: Re: [Nexml-discuss] CDAO term inclusion community process >> >> Hi, >> >> Wayne, thanks for chiming in - I changed the way the properties file >> is loaded a little bit (sorry I left the absolute paths in >> previously!). Kasia, could you try the following, >> >> - assuming $NEXMLTRUNK is your local equivalent for >> https://nexml.svn.sourceforge.net/svnroot/nexml/trunk/nexml/ >> - assuming $MESQUITE_FOLDER is your local equivalent for >> >> http://svn.mesquiteproject.org:8080/repository/mesquite/trunk/Mesquite%20Project/Mesquite_Folder/ >> >> * cd $NEXMLTRUNK/java >> * export CLASSPATH=$CLASSPATH:"$MESQUITE_FOLDER" >> * ant mesquite >> * pico "$MESQUITE_FOLDER/classpaths.xml" >> * add an entry in classpaths.xml: >> <classpath>$NEXMLTRUNK/java/bin/</classpath>, where $NEXMLTRUNK must >> be substituted for the real path (either relative or absolute) to the >> bin folder in which ant placed the compiled classes. Attached is how I >> have it, which works when you check the mesquite trunk and the full >> nexml code (trunk and branches) in the same folder (for me that's >> ~/Documents/workspace but it shouldn't matter) >> >> Now, when Mesquite starts up, could you copy and paste what happens in >> the log window when you read the local version of this file: >> $NEXMLTRUNK/examples/translations/hyperlink.xml >> >> Hope this helps! >> >> Rutger -- Dr. Rutger A. Vos Department of zoology University of British Columbia http://www.nexml.org http://rutgervos.blogspot.com |