[jsword-devel] Concurrency issue?

Chris Burrell chris at burrell.me.uk
Sun Feb 27 15:37:32 MST 2011


The code I'm running into issues with is here. It could well be I'm
mis-using the library?
final SAXEventProvider osissep = bookData.getSAXEventProvider();
            TransformingSAXEventProvider htmlsep = null;
            htmlsep = (TransformingSAXEventProvider) new Converter() {

                public SAXEventProvider convert(final SAXEventProvider
provider) throws TransformerException {
                    try {
                        // for now, we just assume that we'll only have one
option, but this may change later
                        // TODO, we can probably cache the resource
                        final TransformingSAXEventProvider tsep = new
TransformingSAXEventProvider(getClass()

.getResource(requiredTransformation.iterator().next().getFile()).toURI(),
                                osissep);

                        // set parameters here
                        setOptions(tsep, options, version, reference);
                        setupInterlinearOptions(tsep, interlinearVersion,
reference);
                        return tsep;
                    } catch (final URISyntaxException e) {
                        throw new StepInternalException("Failed to load
resource correctly", e);
                    }
                }

            }.convert(osissep);


On 27 February 2011 16:52, Chris Burrell <chris at burrell.me.uk> wrote:

> Hello...
>
> I was just wondering if someone has come across this issue before?
>
> I have two panes loading two passages (1 ESV, 1 KJV). I am getting the
> following issue fairly frequently. (this is different to the issue I raised
> quite a while ago, in that the one before was corruption in the book reading
> driver).
>
> Caused by: java.lang.IllegalStateException: Root element not set
> at org.jdom.Document.getRootElement(Document.java:218)
>  at
> org.crosswire.jsword.book.filter.osis.OSISFilter.parse(OSISFilter.java:149)
> at
> org.crosswire.jsword.book.filter.osis.OSISFilter.toOSIS(OSISFilter.java:74)
>  at
> org.crosswire.jsword.book.basic.AbstractPassageBook.getOsisIterator(AbstractPassageBook.java:90)
> at org.crosswire.jsword.book.BookData.getOsisContent(BookData.java:157)
>  at org.crosswire.jsword.book.BookData.getOsisFragment(BookData.java:100)
> at
> org.crosswire.jsword.book.BookData.getSAXEventProvider(BookData.java:113)
>  at
> com.tyndalehouse.step.core.service.impl.JSwordServiceImpl.getOsisText(JSwordServiceImpl.java:131)
> at
> com.tyndalehouse.step.core.service.impl.BibleInformationServiceImpl.getPassageText(BibleInformationServiceImpl.java:57)
>  at
> com.tyndalehouse.step.rest.controllers.BibleController.getBibleText(BibleController.java:101)
> at
> com.tyndalehouse.step.rest.controllers.BibleController.getBibleText(BibleController.java:60)
>  ... 28 more
>
> Also DM, have you started looking at JS-109? Just wondering...
> Chris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20110227/ec426d82/attachment.html>


More information about the jsword-devel mailing list