Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-412

More than one underscore symbol in server group name causes StringIndexOutOfBoundsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.0
    • None
    • None
    • None
    • All

    • Hide
      • 1. Edit the "domain.xml" file and change the "main-server-group" name as "main_server_group"
      • 2. Edit the "host.xml" file and then edit the "main-server-group" name as "main_server_group"
      • 3. Then start the domain controller using domain.sh script
      • 4. Login to Management Console [1] and then try to "Start Group" and "Stop Group" from the console, As soon as this operation is performed then the above kind of exception can be noticed.
        [1] http://localhost:9990/console/App.html#topology
      Show
      1. Edit the "domain.xml" file and change the "main-server-group" name as "main_server_group" 2. Edit the "host.xml" file and then edit the "main-server-group" name as "main_server_group" 3. Then start the domain controller using domain.sh script 4. Login to Management Console [1] and then try to "Start Group" and "Stop Group" from the console, As soon as this operation is performed then the above kind of exception can be noticed. [1] http://localhost:9990/console/App.html#topology
    • Workaround Exists
    • Hide

      Use the CLI command to start or stop Group when it contains more than one underscore in the group name.

      [domain@localhost:9990 /] /server-group=main_server_group:start-servers
      [domain@localhost:9990 /] /server-group=main_server_group:stop-servers
      
      Show
      Use the CLI command to start or stop Group when it contains more than one underscore in the group name. [domain@localhost:9990 /] /server-group=main_server_group:start-servers [domain@localhost:9990 /] /server-group=main_server_group:stop-servers

      When the "main-server-group" name is changes to "main_server_group" (Notice that there are more than one underscore used in the name) then it is noticed that while clicking on the "Restart Group" (or Stop Group) link on the console causes the following error:

      [Host Controller] 22:59:51,082 ERROR [io.undertow.request] (XNIO-1 task-1) Undertow request failed HttpServerExchange{ POST /management}: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      [Host Controller] 	at java.lang.String.charAt(String.java:658) [rt.jar:1.7.0_51]
      [Host Controller] 	at org.jboss.as.controller.PathElement.<init>(PathElement.java:102) [wildfly-controller-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at org.jboss.as.controller.PathAddress.pathAddress(PathAddress.java:98) [wildfly-controller-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at org.jboss.as.domain.http.server.DomainApiHandler.sendPreparedResponse(DomainApiHandler.java:296) [wildfly-domain-http-interface-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:165) [wildfly-domain-http-interface-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$1.run(SubjectDoAsHandler.java:72) [wildfly-domain-http-interface-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$1.run(SubjectDoAsHandler.java:68) [wildfly-domain-http-interface-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_51]
      [Host Controller] 	at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_51]
      [Host Controller] 	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94) [wildfly-controller-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:68) [wildfly-domain-http-interface-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:63) [wildfly-domain-http-interface-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:50) [undertow-core-1.1.0.Beta1.jar:1.1.0.Beta1]
      [Host Controller] 	at org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:83) [wildfly-domain-http-interface-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]
      [Host Controller] 	at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.1.0.Beta1.jar:1.1.0.Beta1]
      [Host Controller] 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:195) [undertow-core-1.1.0.Beta1.jar:1.1.0.Beta1]
      [Host Controller] 	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:733) [undertow-core-1.1.0.Beta1.jar:1.1.0.Beta1]
      [Host Controller] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
      [Host Controller] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
      [Host Controller] 	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
      

              hpehl@redhat.com Harald Pehl
              jaysensharma Jay SenSharma (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: