[jsword-devel] Help with APIExamples

Tim Hawes trhawes at althusius.net
Thu Dec 21 05:22:52 MST 2017

Thank you so much for looking into this! But, no, I don't think that's it. If I comment out the call to readStyledText(), I get this exception instead:

Exception in thread "main" java.util.MissingResourceException: Cannot find resource: xsl/cswing/simple.xsl

        at org.crosswire.common.util.ResourceUtil.getResource(ResourceUtil.java:75)

        at org.crosswire.common.util.ResourceUtil.getResource(ResourceUtil.java:57)

        at com.selfdidactic.APIExamples.searchAndShow(APIExamples.java:286)

        at com.selfdidactic.APIExamples.main(APIExamples.java:465)

That error does go away when I add that stylesheet from bibledesktop. So that should probably still be moved to jsword. But is seemingly unrelated to the NullPointerException I am getting when I call readStyledText() in the APIExamples.java

I've searched for other references for ConverterFactory.getConverter() in bibledesktop. I can see where it is being called, but am clueless why it seems to work for bibledesktop and not for the API examples.

---- On Wed, 20 Dec 2017 23:20:54 -0500 DM Smith <dmsmith at crosswire.org> wrote ----

I’ll check it out. I think that JSword’s example uses the xslt from BibleDesktop. I’ve been working on that. 

I should move it into JSword. 

— DM Smith

On Dec 20, 2017, at 7:54 PM, Tim Hawes <trhawes at althusius.net> wrote:


jsword-devel mailing list

jsword-devel at crosswire.org



jsword-devel mailing list 

jsword-devel at crosswire.org 


When trying to run the APIExamples.java for JSword, it throws this exception:

Exception in thread "main" java.lang.NullPointerException

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

at com.selfdidactic.APIExamples.readStyledText(APIExamples.java:163)

at com.selfdidactic.APIExamples.main(APIExamples.java:461)

It is happening in the readStyledText method where...

Converter styler = ConverterFactory.getConverter();

Has JSword changed without updating the API examples?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20171221/651ddd65/attachment.html>

More information about the jsword-devel mailing list