[jsword-devel] JSword APIExample errors

Tim Hawes trhawes at althusius.net
Mon Dec 26 10:01:13 MST 2016


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.





The latest JSword code in the git repo fails to build with this message:



Results :



Failed tests:

  DwrBridgeMissingAssetsTest.testIndexed:75

  DwrBridgeMissingAssetsTest.testSearch:83 expected:<[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]> but was:<[]>

Tests in error:

  LuceneIndexManagerTest.testInstalledVersionEqualToLatestVersion:73->createOrUpgradeIndex:56 » NoClassDefFound

  LuceneIndexManagerTest.testInstalledVersionMetadataFileNotExisting:96 ExceptionInInitializer

  FileVersificationMappingTest.testVersifications:71 » NullPointer



Tests run: 769, Failures: 2, Errors: 3, Skipped: 13



If I checkout the JSword 2.1 release, it compiles fine. However, when I compile APIExamples.java and try to run it, I get:



SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

The plain text of Gen 1:1 is In the beginning God created the heaven and the earth .

Exception in thread "main" java.lang.NullPointerException

        at org.crosswire.jsword.util.ConverterFactory.getConverter(ConverterFactory.java:51)

        at com.selfdidactic.sword.App.readStyledText(App.java:162)

        at com.selfdidactic.sword.App.main(App.java:462)





the code in question:



    public String readStyledText(String bookInitials, String reference, int maxKeyCount) throws NoSuchKeyException, BookException, TransformerException,

            SAXException

    {

        Book book = getBook(bookInitials);

        SAXEventProvider osissep = getOSIS(bookInitials, reference, maxKeyCount);

        if (osissep == null) {

            return "";

        }



        Converter styler = ConverterFactory.getConverter();



Any insight on this?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20161226/5d821060/attachment.html>


More information about the jsword-devel mailing list