Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14107

[GSS](7.1.z) StringIndexOutOfBoundsException if config file with wrong name is present in 'standalone_xml_history/snapshot' folder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.2.CR1, 7.1.2.GA
    • 7.1.0.GA
    • Management
    • None
    • Workaround Exists
    • Hide

      File names in the snapshot folder must start with the pattern yyyyMMdd-HHmmssSSS.

      Show
      File names in the snapshot folder must start with the pattern yyyyMMdd-HHmmssSSS .
    • Hide
      • unzip wildfly-11.0.0.Final.zip
      • mkdir -p standalone/configuration/standalone_xml_history/snapshot/
      • cp standalone/configuration/standalone.xml standalone/configuration/standalone_xml_history/snapshot/
      • bash bin/standalone.sh -c standalone.xml
      Show
      unzip wildfly-11.0.0.Final.zip mkdir -p standalone/configuration/standalone_xml_history/snapshot/ cp standalone/configuration/standalone.xml standalone/configuration/standalone_xml_history/snapshot/ bash bin/standalone.sh -c standalone.xml

      In case a file not named as yyyyMMdd-HHmmssSSSname.xml is present in the snapshot folder, the server start abort with a StringIndexOutOfBoundsException.

      wildfly-11.0.0.Final $ ./bin/standalone.sh --admin-only -c standalone.xml
      =========================================================================
      
        JBoss Bootstrap Environment
      
        JBOSS_HOME: /home/jbaesner/wildfly-nightly/wildfly-11.0.0.Final
      
        JAVA: java
      
        JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
      
      =========================================================================
      
      12:21:09,710 INFO  [org.jboss.modules] (main) JBoss Modules version 1.6.1.Final
      java.lang.StringIndexOutOfBoundsException: String index out of range: -4
      	at java.lang.String.substring(String.java:1931)
      	at org.jboss.as.controller.persistence.ConfigurationFile.findMainFileFromSnapshotPrefix(ConfigurationFile.java:403)
      	at org.jboss.as.controller.persistence.ConfigurationFile.determineMainFile(ConfigurationFile.java:312)
      	at org.jboss.as.controller.persistence.ConfigurationFile.<init>(ConfigurationFile.java:176)
      	at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:454)
      	at org.jboss.as.server.Main.determineEnvironment(Main.java:339)
      	at org.jboss.as.server.Main.main(Main.java:95)
      	at org.jboss.modules.Module.run(Module.java:344)
      	at org.jboss.modules.Main.main(Main.java:525)
      12:21:10,047 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1
      

            dtikhomi@redhat.com Dmitrii Tikhomirov
            rhn-support-jbaesner Joerg Baesner
            Petr Adamec Petr Adamec
            Petr Adamec Petr Adamec
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: