Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jan 2011
    Location
    Redhill
    Posts
    9

    ArrayIndexOutOfBoundsException while loading adapters.xml

    Hello,

    I am encountering an exception that seems to be coming from Lightstreamer at startup, when the data adapters are being loaded.

    I have checked adapters.xml with xmllint, and it is valid. I have also removed extra spaces as I seem to remember there were issues with that (like tag not ending on the same line).

    I have some of the demo adapters installed and my own metadata adapter (1) and adapters (3).

    My idea is that it has to do with the order things are happening in at startup (which seems to be different), because some of the time LS would startup without error, at other times there are 2 exceptions thrown, the arrayOutOfBounds exception's index is sometimes different.

    Any hint of what I might do about this?

    If you want to have a look at adapters.xml let me know. I wouldn't like to post it here, because it has jdbc auth info (a rather long jdbc string) in it (and if I remove it the problem might not be reproducible.)

    Below is the log from LS.out:

    Code:
    03.Mar.11 13:50:05,337 < INFO> Started HTML Adaptor for JMX on port 6666
    03.Mar.11 13:50:05,437 < INFO> Started JMXMP Connector for JMX on port 9999
    03.Mar.11 13:50:05,658 < INFO> Loading Metadata Adapter CHAT
    03.Mar.11 13:50:05,663 < INFO> Loading Data Adapter CHAT.CHAT_ROOM
    03.Mar.11 13:50:05,664 < INFO> Loading Metadata Adapter FOI
    03.Mar.11 13:50:05,666 < INFO> Loading Data Adapter FOI.FOI_TEST
    03.Mar.11 13:50:05,669 < INFO> Loading Data Adapter FOI.FOI_ADAPTER2
    03.Mar.11 13:50:05,672 < INFO> Loading Data Adapter FOI.FOI_ADAPTER
    03.Mar.11 13:50:05,674 < INFO> Loading Metadata Adapter PORTFOLIODEMO
    03.Mar.11 13:50:05,677 < INFO> Loading Data Adapter PORTFOLIODEMO.PORTFOLIO_ADAPTER
    03.Mar.11 13:50:05,741 < INFO> FOITestDataAdapter ready
    03.Mar.11 13:50:05,741 < INFO> Finished loading Data Adapter FOI.FOI_TEST
    03.Mar.11 13:50:05,774 < INFO> PortfolioDataAdapter ready
    03.Mar.11 13:50:05,775 < INFO> Finished loading Data Adapter PORTFOLIODEMO.PORTFOLIO_ADAPTER
    03.Mar.11 13:50:05,780 < INFO> PortfolioMetadataAdapter ready
    03.Mar.11 13:50:05,812 < INFO> Finished loading Metadata Adapter PORTFOLIODEMO
    03.Mar.11 13:50:05,877 < INFO> ChatMetadataAdapter ready
    03.Mar.11 13:50:05,878 < INFO> Finished loading Metadata Adapter CHAT
    03.Mar.11 13:50:05,895 <ERROR> Data adapter FOI.FOI_ADAPTER init error
    java.lang.ArrayIndexOutOfBoundsException: 16 >= 0
    	at java.util.Vector.elementAt(Vector.java:427)
    	at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.getNodeValueString(DeferredDocumentImpl.java:1167)
    	at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.getNodeValueString(DeferredDocumentImpl.java:1120)
    	at com.sun.org.apache.xerces.internal.dom.DeferredTextImpl.synchronizeData(DeferredTextImpl.java:93)
    	at com.sun.org.apache.xerces.internal.dom.CharacterDataImpl.getData(CharacterDataImpl.java:160)
    	at com.lightstreamer.h.g.a(g.java)
    	at com.lightstreamer.k.z.a(z.java)
    	at com.lightstreamer.k.z.a(z.java)
    	at com.lightstreamer.k.z.b(z.java)
    	at com.lightstreamer.k.m.a(m.java)
    	at com.lightstreamer.h.b.run(b.java)
    03.Mar.11 13:50:05,905 < INFO> ChatDataAdapter ready
    03.Mar.11 13:50:05,978 < INFO> Finished loading Data Adapter CHAT.CHAT_ROOM
    03.Mar.11 13:50:05,990 <ERROR> Error while loading the Adapters
    java.lang.ArrayIndexOutOfBoundsException: 16 >= 0
    	at java.util.Vector.elementAt(Vector.java:427)
    	at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.getNodeValueString(DeferredDocumentImpl.java:1167)
    	at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.getNodeValueString(DeferredDocumentImpl.java:1120)
    	at com.sun.org.apache.xerces.internal.dom.DeferredTextImpl.synchronizeData(DeferredTextImpl.java:93)
    	at com.sun.org.apache.xerces.internal.dom.CharacterDataImpl.getData(CharacterDataImpl.java:160)
    	at com.lightstreamer.h.g.a(g.java)
    	at com.lightstreamer.k.z.a(z.java)
    	at com.lightstreamer.k.z.a(z.java)
    	at com.lightstreamer.k.z.b(z.java)
    	at com.lightstreamer.k.m.a(m.java)
    	at com.lightstreamer.h.b.run(b.java)
    03.Mar.11 13:50:06,013 <FATAL> Adapters initialization failed
    03.Mar.11 13:50:06,013 < INFO> Exiting.....
    03.Mar.11 13:50:07,032 < INFO> FOIMetaDataAdapter ready
    03.Mar.11 13:50:07,033 < INFO> Finished loading Metadata Adapter FOI
    03.Mar.11 13:50:07,296 < INFO> Record number:36
    03.Mar.11 13:50:07,300 < INFO> Column number:10
    03.Mar.11 13:50:07,310 < INFO> FOIDEparturesDataAdapter ready
    03.Mar.11 13:50:07,310 < INFO> Finished loading Data Adapter FOI.FOI_ADAPTER2
    Thanks for your help,
    Emese, a fan of Lightstreamer

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    This is something really new for us.
    The exceptions lie in the underlying xerces libraries and it is difficult for us to figure out what could be happening.

    You say that the behavior is not always the same and may depend on the way things happen.
    In fact, the Adapters are loaded in parallel, hence concurrent use of the xerces library code is possible.

    So yes, please, show us your adapters.xml file through a private message.
    Which version of the java runtime are you using?

  3. #3
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    Ok, we have found out that the DOM interface does not require thread safe implementations, so the bug is in LS Server.
    Probably, your jdbc string is so long that it exploits thread unsafety in the xerces library.
    We will fix the issue in the next release.

    For the moment, could we ask you to resort to an external file for supplying your string? The element in "adapters.xml" could just point to the file.
    Sorry for letting you down.

  4. #4
    Member
    Join Date
    Jan 2011
    Location
    Redhill
    Posts
    9
    Hi Dario

    You guys are amazing Indeed my jdbc string was rather long. I have rewritten the whole database stuff to use a db connection manager, and I am loading the settings from a properties file, no exceptions thrown since then.

    Thanks for the quick reply, keep up the good work!

 

 

Similar Threads

  1. adapters.xml
    By Pradeep Chahal in forum Adapter SDKs
    Replies: 1
    Last Post: April 26th, 2010, 03:50 PM
  2. speed up initial loading
    By rd2008 in forum General
    Replies: 1
    Last Post: November 20th, 2008, 10:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 09:54 AM.