Menu

#12 StringIndexOutOfBoundsException for DeadLock.xml on startup

v1.0_(example)
open
nobody
5
2017-02-09
2017-01-31
No

When I start up the asemon_logger logger for Sybase ASE 15.5 server, it all works except for one error:

2017/01/31 09:59:26.287 main - parseMetricFile : (/home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DeadLock.xml) java.lang.StringIndexOutOfBoundsException: String index out of range: -13
java.lang.StringIndexOutOfBoundsException: String index out of range: -13
at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:935)
at java.lang.StringBuffer.substring(StringBuffer.java:480)
at asemon_logger.MetricDescriptor.parseArchiveMDA(MetricDescriptor.java:219)
at asemon_logger.MetricDescriptor.parseMetricFile(MetricDescriptor.java:389)
at asemon_logger.MetricDescriptor.loadMetricFile(MetricDescriptor.java:481)
at asemon_logger.Config.loadMetricdescriptor(Config.java:500)
at asemon_logger.Asemon_logger.main(Asemon_logger.java:530)

I've attached the corresponding Deadlock.xml file being used.

Unfortunately, the error message doesn't specify what string or what line has the problem in the XML file.

Thanks in advance
Ben Slade
Bethesda MD, USA

1 Attachments

Related

Support Requests: #12

Discussion

  • Jean-Paul Martin

    Hi Benjamin,
    I don't see any diff between your Deadlock.xml.txt file and mine (V3.0.4) except it is in DOS format (CR/LF at end of lines, rather than LF) May be it is just due to the .txt you sent me, and the original file is in UNIX format (did you just renamed the file ?) Can you check ? All config files must be in UNIX format.

    What is your Java version ?
    What is your asemon_logger version ?

    Best regards
    JPM

     
    • Anonymous

      Anonymous - 2017-02-03

      The original DeadLock.xml is regular ascii text with normal Linux LF line
      endings. Yes, I renamed the file when I sent it to you to prevent
      intelligent tools from trying to parse the XML.

      My Java version is 1.8.0_121

      This is not critical/urgent. It's just frustrating to me that the Java
      libraries aren't able to give some hint of what was out of range.

      If it would be helpful, I could add some println statements just
      before MetricDescriptor.java, line 219 (but I have to figure out how to
      recompile the .java files)

      Ben Slade
      Bethesda MD, USA

      On Tue, Jan 31, 2017 at 10:24 AM, Jean-Paul Martin jpm-jpm@users.sf.net
      wrote:

      Hi Benjamin,
      I don't see any diff between your Deadlock.xml.txt file and mine (V3.0.4)
      except it is in DOS format (CR/LF at end of lines, rather than LF) May be
      it is just due to the .txt you sent me, and the original file is in UNIX
      format (did you just renamed the file ?) Can you check ? All config files
      must be in UNIX format.

      What is your Java version ?
      What is your asemon_logger version ?

      Best regards
      JPM


      Status: open
      Group: v1.0_(example)
      Labels: DeadLock.xml
      Created: Tue Jan 31, 2017 03:03 PM UTC by Benjamin Slade
      Last Updated: Tue Jan 31, 2017 03:03 PM UTC
      Owner: nobody
      Attachments:

      When I start up the asemon_logger logger for Sybase ASE 15.5 server, it
      all works except for one error:

      2017/01/31 09:59:26.287 main - parseMetricFile : (/home/sybasesa/scripts/
      sybase/sladebe/asemon_logger/conf/DeadLock.xml) java.lang.
      StringIndexOutOfBoundsException: String index out of range: -13
      java.lang.StringIndexOutOfBoundsException: String index out of range: -13
      at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:
      935)
      at java.lang.StringBuffer.substring(StringBuffer.java:480)
      at asemon_logger.MetricDescriptor.parseArchiveMDA(
      MetricDescriptor.java:219)
      at asemon_logger.MetricDescriptor.parseMetricFile(
      MetricDescriptor.java:389)
      at asemon_logger.MetricDescriptor.loadMetricFile(
      MetricDescriptor.java:481)
      at asemon_logger.Config.loadMetricdescriptor(Config.java:500)
      at asemon_logger.Asemon_logger.main(Asemon_logger.java:530)

      I've attached the corresponding Deadlock.xml file being used.

      Unfortunately, the error message doesn't specify what string or what line
      has the problem in the XML file.

      Thanks in advance
      Ben Slade
      Bethesda MD, USA


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/asemon/support-requests/12/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #12

  • Jean-Paul Martin

    Hi,
    I recompiled and tested with jdk 1.8.0_121. I have no error.
    Download V3.0.4a and test if you still have error
    You can activate debug 105 (asemon_logger ... -d 105) You'll get string before row 219
    Anyway you can try rebuild asemon wiith the script "build.bat " or "build.sh"

    Best regards
    JPM

     
    • Anonymous

      Anonymous - 2017-02-06

      I've downloaded/extraced v3.0.4a. When I run build.sh, I get the error
      (directory names edited for privacy):

      myhost[5:27pm] ~mylogin/asemon_logger> ./build.sh

      javac: directory not found: ../build/classes

      Usage: javac <options>

      use -help for a list of possible options

      ./build.sh[12]: cd: ~mylogin/asemon_logger/build/classes: [No such file or

      directory]

      java.io.FileNotFoundException: ../../dist/Asemon_logger.jar (No such file

      or directory)

          at java.io.FileOutputStream.open0(Native Method)
      
          at java.io.FileOutputStream.open(FileOutputStream.java:270)
      
          at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
      
          at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
      
          at sun.tools.jar.Main.run(Main.java:195)
      
          at sun.tools.jar.Main.main(Main.java:1288)
      

      So it looks like "../build/classes asemon_logger/*.java" isn't included
      with the download.

      Ben Slade
      Kensington, MD

      On Mon, Feb 6, 2017 at 3:49 AM, Jean-Paul Martin jpm-jpm@users.sf.net
      wrote:

      Hi,
      I recompiled and tested with jdk 1.8.0_121. I have no error.
      Download V3.0.4a and test if you still have error
      You can activate debug 105 (asemon_logger ... -d 105) You'll get string
      before row 219
      Anyway you can try rebuild asemon wiith the script "build.bat " or
      "build.sh"

      Best regards
      JPM


      Status: open
      Group: v1.0_(example)
      Labels: DeadLock.xml
      Created: Tue Jan 31, 2017 03:03 PM UTC by Benjamin Slade
      Last Updated: Tue Jan 31, 2017 03:24 PM UTC
      Owner: nobody
      Attachments:

      When I start up the asemon_logger logger for Sybase ASE 15.5 server, it
      all works except for one error:

      2017/01/31 09:59:26.287 main - parseMetricFile : (/home/sybasesa/scripts/
      sybase/sladebe/asemon_logger/conf/DeadLock.xml) java.lang.
      StringIndexOutOfBoundsException: String index out of range: -13
      java.lang.StringIndexOutOfBoundsException: String index out of range: -13
      at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:
      935)
      at java.lang.StringBuffer.substring(StringBuffer.java:480)
      at asemon_logger.MetricDescriptor.parseArchiveMDA(
      MetricDescriptor.java:219)
      at asemon_logger.MetricDescriptor.parseMetricFile(
      MetricDescriptor.java:389)
      at asemon_logger.MetricDescriptor.loadMetricFile(
      MetricDescriptor.java:481)
      at asemon_logger.Config.loadMetricdescriptor(Config.java:500)
      at asemon_logger.Asemon_logger.main(Asemon_logger.java:530)

      I've attached the corresponding Deadlock.xml file being used.

      Unfortunately, the error message doesn't specify what string or what line
      has the problem in the XML file.

      Thanks in advance
      Ben Slade
      Bethesda MD, USA


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/asemon/support-requests/12/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #12

  • Jean-Paul Martin

    Ok, directories "build" and "build/classes" must be created before runing build.sh, and the final library must be name "Asemon_logger_V3.jar" rather than "Asemon_logger.jar"
    Find attached a new version of the build.sh containing these changes
    Regards
    JPM

     
    • Anonymous

      Anonymous - 2017-02-08

      Got it to compile, and ran it with the -d 105" debug option.. but it looks
      like the contents of "ct" were empty (null or zero length string?).

      I verified this by putting delimiting slash characters before and after the
      printing of "aArchive_table.createTable" in the DBG105 debug line
      (MetricDescriptor.java line 220).

      Here's the output, including some debug output before and after because it
      looks like some threading is doing multiple things at the same time:

      2017/02/08 14:26:38.468 main - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/CnxWaits.xml

      2017/02/08 14:26:38.468 SYBTEST_16K_CnxActiv - Start thread.

      2017/02/08 14:26:38.469 main - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_CnxWaits (

       Timestamp datetime not null,
      
       Interval int not null,
      
       Kpid int not null,
      
       Spid int not null,
      
       WaitEventID smallint not null,
      
       Waits int null,
      
       WaitTime int null
      

      ) lock datarows

      2017/02/08 14:26:38.469 main - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_CnxWaits (

       Timestamp datetime not null,
      
       Interval int not null,
      
       Kpid int not null,
      
       Spid int not null,
      
       WaitEventID smallint not null,
      
       Waits int null,
      
       WaitTime int null
      

      )

      2017/02/08 14:26:38.469 main - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DataCache_switch.xml

      2017/02/08 14:26:38.470 main - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DataCache.xml

      2017/02/08 14:26:38.471 main - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_DataCache (

       Timestamp datetime not null,
      
       Interval int not null,
      
       CacheName varchar(30) null,
      
       CacheSearches int null,
      
       PhysicalReads int null,
      
       LogicalReads int null,
      
       PhysicalWrites int null,
      
       Stalls int null
      

      ) lock datapages

      2017/02/08 14:26:38.472 main - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_DataCache (

       Timestamp datetime not null,
      
       Interval int not null,
      
       CacheName varchar(30) null,
      
       CacheSearches int null,
      
       PhysicalReads int null,
      
       LogicalReads int null,
      
       PhysicalWrites int null,
      
       Stalls int null
      

      )

      2017/02/08 14:26:38.472 SYBTEST_16K_CnxWaits - Start thread.

      2017/02/08 14:26:38.474 SYBTEST_16K_CnxWaits - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/CnxWaits.xml

      2017/02/08 14:26:38.474 main - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DeadLock_switch.xml

      2017/02/08 14:26:38.475 main - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DeadLock.xml

      2017/02/08 14:26:38.476 main - DEBUG - parseArchiveMDA.

      ct = // -- Note, slashes added by me as output
      delimiters. Ben Slade

      2017/02/08 14:26:38.477 main - parseMetricFile :

      (/home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DeadLock.xml)
      java.lang.StringIndexOutOfBoundsException: String index out of range: -13

      java.lang.StringIndexOutOfBoundsException: String index out of range: -13

          at
      

      java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:935)

          at java.lang.StringBuffer.substring(StringBuffer.java:480)
      
          at
      

      asemon_logger.MetricDescriptor.parseArchiveMDA(MetricDescriptor.java:221)

          at
      

      asemon_logger.MetricDescriptor.parseMetricFile(MetricDescriptor.java:393)

          at
      

      asemon_logger.MetricDescriptor.loadMetricFile(MetricDescriptor.java:485)

          at asemon_logger.Config.loadMetricdescriptor(Config.java:500)
      
          at asemon_logger.Asemon_logger.main(Asemon_logger.java:531)
      

      2017/02/08 14:26:38.477 main - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DevIO_switch.xml

      2017/02/08 14:26:38.479 main - DEBUG - parseMetricFile.

      fname =
      /home/sybasesa/scripts/sybase/sladebe/asemon_logger/conf/DevIO_V15.xml

      2017/02/08 14:26:38.480 main - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_DevIO (

       Timestamp datetime not null,
      
       Interval int not null,
      
       LogicalName varchar(100) null,
      
       TotIO numeric(14,0) null,
      
       Reads int null,
      
       APFReads int null,
      
       Writes int null,
      
       DevSemaphoreRequests int null,
      
       DevSemaphoreWaits int null,
      
       IOTime int null
      

      ) lock datapages

      2017/02/08 14:26:38.480 main - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_DevIO (

       Timestamp datetime not null,
      
       Interval int not null,
      
       LogicalName varchar(100) null,
      
       TotIO numeric(14,0) null,
      
       Reads int null,
      
       APFReads int null,
      
       Writes int null,
      
       DevSemaphoreRequests int null,
      
       DevSemaphoreWaits int null,
      
       IOTime int null
      

      )

      2017/02/08 14:26:38.480 SYBTEST_16K_DataCache - Start thread.

      2017/02/08 14:26:38.480 SYBTEST_16K_CnxWaits - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_CnxWaits (

       Timestamp datetime not null,
      
       Interval int not null,
      
       Kpid int not null,
      
       Spid int not null,
      
       WaitEventID smallint not null,
      
       Waits int null,
      
       WaitTime int null
      

      ) lock datarows

      2017/02/08 14:26:38.481 SYBTEST_16K_CnxWaits - DEBUG - parseArchiveMDA.

      ct = create table ?SERVERNAME?_CnxWaits (

       Timestamp datetime not null,
      
       Interval int not null,
      
       Kpid int not null,
      
       Spid int not null,
      
       WaitEventID smallint not null,
      
       Waits int null,
      
       WaitTime int null
      

      )

      On Tue, Feb 7, 2017 at 5:56 AM, Jean-Paul Martin jpm-jpm@users.sf.net
      wrote:

      Ok, directories "build" and "build/classes" must be created before runing
      build.sh, and the final library must be name "Asemon_logger_V3.jar" rather
      than "Asemon_logger.jar"
      Find attached a new version of the build.sh containing these changes
      Regards
      JPM

      Attachments:


      Status: open
      Group: v1.0_(example)
      Labels: DeadLock.xml
      Created: Tue Jan 31, 2017 03:03 PM UTC by Benjamin Slade
      Last Updated: Mon Feb 06, 2017 08:49 AM UTC
      Owner: nobody
      Attachments:

      When I start up the asemon_logger logger for Sybase ASE 15.5 server, it
      all works except for one error:

      2017/01/31 09:59:26.287 main - parseMetricFile : (/home/sybasesa/scripts/
      sybase/sladebe/asemon_logger/conf/DeadLock.xml) java.lang.
      StringIndexOutOfBoundsException: String index out of range: -13
      java.lang.StringIndexOutOfBoundsException: String index out of range: -13
      at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:
      935)
      at java.lang.StringBuffer.substring(StringBuffer.java:480)
      at asemon_logger.MetricDescriptor.parseArchiveMDA(
      MetricDescriptor.java:219)
      at asemon_logger.MetricDescriptor.parseMetricFile(
      MetricDescriptor.java:389)
      at asemon_logger.MetricDescriptor.loadMetricFile(
      MetricDescriptor.java:481)
      at asemon_logger.Config.loadMetricdescriptor(Config.java:500)
      at asemon_logger.Asemon_logger.main(Asemon_logger.java:530)

      I've attached the corresponding Deadlock.xml file being used.

      Unfortunately, the error message doesn't specify what string or what line
      has the problem in the XML file.

      Thanks in advance
      Ben Slade
      Bethesda MD, USA


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/asemon/support-requests/12/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #12

  • Jean-Paul Martin

    Ok, I found the problem : the "DeadLock.xml" file is bad !!!

    I didn't see the problem before because I test asemon mostly with ASE 15.7 and 16 and no longer with previous versions. It seems you are using a ASE version older than 15.7 and in that case the "DeadLock.xml" file is used rather than "DeadLock_V157.xml".

    In "DeadLock.xml" I left a bad sequence of xml tags which produce the error when it is loaded.

    So, find attached the correct version on "DeadLock.xml"
    Thanks for signaling this error
    Best regards
    JPM

     
    • Anonymous

      Anonymous - 2017-02-09

      That was it! Thanks very much for all your help.

      FYI, we'll be upgrading to ASE 16 later in the year.

      Ben Slade
      Senior DBA @ NCBI.NLM.NIH.gov
      Bethesda, MD USA

      On Thu, Feb 9, 2017 at 4:39 AM, Jean-Paul Martin jpm-jpm@users.sf.net
      wrote:

      Ok, I found the problem : the "DeadLock.xml" file is bad !!!

      I didn't see the problem before because I test asemon mostly with ASE 15.7
      and 16 and no longer with previous versions. It seems you are using a ASE
      version older than 15.7 and in that case the "DeadLock.xml" file is used
      rather than "DeadLock_V157.xml".

      In "DeadLock.xml" I left a bad sequence of xml tags which produce the
      error when it is loaded.

      So, find attached the correct version on "DeadLock.xml"
      Thanks for signaling this error
      Best regards
      JPM

      Attachments:


      Status: open
      Group: v1.0_(example)
      Labels: DeadLock.xml
      Created: Tue Jan 31, 2017 03:03 PM UTC by Benjamin Slade
      Last Updated: Tue Feb 07, 2017 10:56 AM UTC
      Owner: nobody
      Attachments:

      When I start up the asemon_logger logger for Sybase ASE 15.5 server, it
      all works except for one error:

      2017/01/31 09:59:26.287 main - parseMetricFile : (/home/sybasesa/scripts/
      sybase/sladebe/asemon_logger/conf/DeadLock.xml) java.lang.
      StringIndexOutOfBoundsException: String index out of range: -13
      java.lang.StringIndexOutOfBoundsException: String index out of range: -13
      at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:
      935)
      at java.lang.StringBuffer.substring(StringBuffer.java:480)
      at asemon_logger.MetricDescriptor.parseArchiveMDA(
      MetricDescriptor.java:219)
      at asemon_logger.MetricDescriptor.parseMetricFile(
      MetricDescriptor.java:389)
      at asemon_logger.MetricDescriptor.loadMetricFile(
      MetricDescriptor.java:481)
      at asemon_logger.Config.loadMetricdescriptor(Config.java:500)
      at asemon_logger.Asemon_logger.main(Asemon_logger.java:530)

      I've attached the corresponding Deadlock.xml file being used.

      Unfortunately, the error message doesn't specify what string or what line
      has the problem in the XML file.

      Thanks in advance
      Ben Slade
      Bethesda MD, USA


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/asemon/support-requests/12/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #12

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.