<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>Hi Martin,<br></div><div><br></div><div>I got jsword to compile. Where I am stuck is an example of returning styled text for a reference. The APIExamples.java compiles, but then throws:<br></div><div><br></div><div>The plain text of Gen 1:1 is In the beginning God created the heaven and the earth .<br></div><div>Exception in thread "main" java.lang.NullPointerException<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.crosswire.jsword.util.ConverterFactory.getConverter(ConverterFactory.java:51)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.selfdidactic.sword.App.readStyledText(App.java:162)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.selfdidactic.sword.App.main(App.java:462)<br></div><div><br></div><div><br></div><div>the code in question:<br></div><div><br></div><div>&nbsp;&nbsp;&nbsp; public String readStyledText(String bookInitials, String reference, int maxKeyCount) throws NoSuchKeyException, BookException, TransformerException,<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SAXException<br></div><div>&nbsp;&nbsp;&nbsp; {<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Book book = getBook(bookInitials);<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SAXEventProvider osissep = getOSIS(bookInitials, reference, maxKeyCount);<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (osissep == null) {<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return "";<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br></div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Converter styler = ConverterFactory.getConverter();<br></div><div><br></div><div>I figured if I could at least get bibledesktop to compile and work, I could use that as my reference point, but alas, I cannot find bibledesktop code that will compile.<br></div><div><br></div><div class="zmail_extra"><div id="1"><div><br></div><div>---- On Sat, 07 Jan 2017 16:41:26 -0500&nbsp;<b>Martin Denham &lt;mjdenham@gmail.com&gt;</b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><div><div dir="ltr"><div>Hi Tim,<br></div><div><br></div><div>From memory I believe there were issues with the tests if you did not have some modules like KJV installed.<br></div><div><br></div><div>However, I am not the best person to answer as I have not worked on JSword for quite a long time.<br></div><div><br></div><div>Martin<br></div></div><div><div><br></div><div><div>On 7 January 2017 at 21:25, Tim Hawes <span>&lt;<a href="mailto:trhawes@althusius.net" target="_blank">trhawes@althusius.net</a>&gt;</span> wrote:<br></div><div id="zmail_block"><br></div></div><div><br></div></div><div>_______________________________________________<br></div><div>jsword-devel mailing list <br></div><div><a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a> <br></div><div><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a> <br></div></div><blockquote style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;"><div><u></u><br></div><div><div style="font-size: 10.0pt;font-family: Verdana , Arial , Helvetica , sans-serif;"><div><br></div><div>Can anyone point me to working code?<br></div><div><br></div><div>Please see my previous attached emails to this list for details. Thank you.<br></div><div><div><div><br></div><div>---- On Sun, 01 Jan 2017 15:19:52 -0500&nbsp;<b>Tim Hawes &lt;<a href="mailto:trhawes@althusius.net" target="_blank">trhawes@althusius.net</a>&gt;</b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1.0px solid rgb(204,204,204);padding-left: 6.0px;margin: 0 0 0 5.0px;"><div><div><span><div style="font-size: 10.0pt;font-family: Verdana , Arial , Helvetica , sans-serif;"><div>Well, I found the SVN repo, and checked out everything under trunk. Jsword compiles, but the APIExamples still fail to run with the same null pointer exception. Looking to bibledesktop as a potential running example that uses jsword, but it fails to compile (missing dependency in the crosswire maven repo).<br></div><div><br></div><div>I am just looking for some working examples that I can begin working with. Can someone point me in the right direction?<br></div><div><br></div><div><div><div><br></div><div>---- On Mon, 26 Dec 2016 12:01:13 -0500&nbsp;<b>Tim Hawes &lt;<a href="mailto:trhawes@althusius.net" target="_blank">trhawes@althusius.net</a>&gt;</b> wrote ----<br></div></div><div><br></div><div><br></div></div><div><br></div></div></span><br></div><div><div><div>_______________________________________________ <br></div><div>jsword-devel mailing list <br></div><div><a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a> <br></div><div><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a> <br></div></div></div></div><div><div><blockquote style="border-left: 1.0px solid rgb(204,204,204);padding-left: 6.0px;margin: 0 0 0 5.0px;"><div><div style="font-size: 10.0pt;font-family: Verdana , Arial , Helvetica , sans-serif;"><div>I am currently trying to get my head around the JSword source. My Java knowledge is not extensive, and in fact, I am working on a Clojure wrapper on the JSword Java source.<br></div><div><br></div><div><br></div><div>The latest JSword code in the git repo fails to build with this message:<br></div><div><br></div><div>Results :<br></div><div><br></div><div>Failed tests:<br></div><div>&nbsp; DwrBridgeMissingAssetsTest.testIndexed:75<br></div><div>&nbsp; DwrBridgeMissingAssetsTest.testSearch:83 expected:&lt;[Exo 5:4, 6:13, 26-27, 7:19, 8:5, 16, 12:1, 16:6, 32:1, Num 14:2, 26:59, 33:1, Jos 24:5, 1Sa 12:6, 8, Mic 6:4, Act 7:40]&gt; but was:&lt;[]&gt;<br></div><div>Tests in error:<br></div><div>&nbsp; LuceneIndexManagerTest.testInstalledVersionEqualToLatestVersion:73-&gt;createOrUpgradeIndex:56 » NoClassDefFound<br></div><div>&nbsp; LuceneIndexManagerTest.testInstalledVersionMetadataFileNotExisting:96 ExceptionInInitializer<br></div><div>&nbsp; FileVersificationMappingTest.testVersifications:71 » NullPointer<br></div><div><br></div><div>Tests run: 769, Failures: 2, Errors: 3, Skipped: 13<br></div><div><br></div><div>If I checkout the JSword 2.1 release, it compiles fine. However, when I compile APIExamples.java and try to run it, I get:<br></div><div><br></div><div>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".<br></div><div>SLF4J: Defaulting to no-operation (NOP) logger implementation<br></div><div>SLF4J: See <a href="http://www.slf4j.org/codes.html#StaticLoggerBinder" target="_blank">http://www.slf4j.org/codes.html#StaticLoggerBinder</a> for further details.<br></div><div>The plain text of Gen 1:1 is In the beginning God created the heaven and the earth .<br></div><div>Exception in thread "main" java.lang.NullPointerException<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.crosswire.jsword.util.ConverterFactory.getConverter(ConverterFactory.java:51)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.selfdidactic.sword.App.readStyledText(App.java:162)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.selfdidactic.sword.App.main(App.java:462)<br></div><div><br></div><div><br></div><div>the code in question:<br></div><div><br></div><div>&nbsp;&nbsp;&nbsp; public String readStyledText(String bookInitials, String reference, int maxKeyCount) throws NoSuchKeyException, BookException, TransformerException,<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SAXException<br></div><div>&nbsp;&nbsp;&nbsp; {<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Book book = getBook(bookInitials);<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SAXEventProvider osissep = getOSIS(bookInitials, reference, maxKeyCount);<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (osissep == null) {<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return "";<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br></div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Converter styler = ConverterFactory.getConverter();<br></div><div><br></div><div>Any insight on this?<br></div></div><div>_______________________________________________ <br></div><div>jsword-devel mailing list <br></div><div><a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a> <br></div><div><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a> <br></div></div></blockquote></div></div></blockquote></div><div><br></div></div></div><div><br></div><div>_______________________________________________<br></div><div>jsword-devel mailing list<br></div><div><a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a><br></div><div><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br></div><div><br></div></blockquote></blockquote></div><div><br></div></div></body></html>