[jboss-jira] [JBoss JIRA] (WFLY-12865) .CLI command to write attribute is giving a StackOverflow Exception

Jonathan Vila Lopez (Jira) issues at jboss.org
Thu Dec 12 06:00:00 EST 2019


    [ https://issues.redhat.com/browse/WFLY-12865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824351#comment-13824351 ] 

Jonathan Vila Lopez commented on WFLY-12865:
--------------------------------------------

WORKAROUND / FIX : 
With the help of [~yersan]and [~jamezp] it finally worked following these steps :
1. Add *reload* at the end of each command cli script
{code}
/subsystem=undertow/configuration=handler/file=windup-web-redirect:add(path=${jboss.home.dir}/windup-web-redirect)
/subsystem=undertow/server=default-server/host=default-host/location=\//:write-attribute(name=handler,value=windup-web-redirect)
command-timeout set 15000
reload
{code}
2. Add fork=true to the wildfly-maven-plugin
3. Add serverArgs=--admin-only to the wildfly-maven-plugin
4. Use latest (20191212) version of wildfly-maven-plugin : 2.0.2.Final

{code}
                     <execution>
                        <id>start-wildfly</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>start</goal>
                            <goal>execute-commands</goal>
                        </goals>
                        <configuration>
                            <fork>true</fork>
                            <jbossHome>${project.build.directory}/${wildfly.directory}</jbossHome>
                            <serverConfig>standalone-full.xml</serverConfig>
                            <stdout>${project.build.directory}/jboss.stdout</stdout>
                            <systemProperties>
                                <windup.data.dir>${jboss.server.data.dir}/h2/windup-web</windup.data.dir>
                            </systemProperties>
                            <serverArgs>
                                <serverArg>--admin-only</serverArg>
                            </serverArgs>
                            <scripts>
                                <script>${project.build.directory}/${wildfly.directory}/bin/adapter-install.cli</script>
                                <script>src/main/cli/setup-eap.cli</script>
                                <script>src/main/cli/adding-redirect.cli</script>
                            </scripts>
                            <startupTimeout>300</startupTimeout>
                        </configuration>
                    </execution>
{code}



> .CLI command to write attribute is giving a StackOverflow Exception
> -------------------------------------------------------------------
>
>                 Key: WFLY-12865
>                 URL: https://issues.redhat.com/browse/WFLY-12865
>             Project: WildFly
>          Issue Type: Bug
>          Components: Management, Web (Undertow)
>    Affects Versions: 18.0.1.Final
>            Reporter: Jonathan Vila Lopez
>            Assignee: Yeray Borges
>            Priority: Blocker
>             Fix For: 19.0.0.Beta1
>
>
> In the RHAMT team we are trying to migrate the application from WF 15 to WF 18.
> As part of the build the process starts WF and execute few .cli commands .
>  I get a StackOverflowError in a command :
> {code:java}
> /subsystem=undertow/server=default-server/host=default-host/location=\//:write-attribute(name=handler,value=windup-web-redirect)
> Error 
>  Command execution failed for command '/subsystem=undertow/server=default-server/host=default-host/location=\//:write-attribute(name=handler,value=windup-web-redirect)'. {
> [ERROR]     "outcome" => "failed",
> [ERROR]     "failure-description" => "java.lang.StackOverflowError:null"
> [ERROR] }
> ^[[0m^[[31m17:48:42,651 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0403: Unexpected failure during execution of the following operation(s): [{
>     "address" => [
>         ("subsystem" => "undertow"),
>         ("server" => "default-server"),
>         ("host" => "default-host"),
>         ("location" => "/")
>     ],
>     "operation" => "write-attribute",
>     "name" => "handler",
>     "value" => "windup-web-redirect",
>     "operation-headers" => {
>         "caller-type" => "user",
>         "access-mechanism" => "NATIVE"
>     }
> }]: java.lang.StackOverflowError
>         at org.jboss.as.controller.CapabilityRegistry.getDependentCapabilityStatus(CapabilityRegistry.java:418)
>         at org.jboss.as.controller.CapabilityRegistry.getCapabilityStatus(CapabilityRegistry.java:392)
>         at org.jboss.as.controller.CapabilityRegistry.getDependentCapabilityStatus(CapabilityRegistry.java:426)
>         at org.jboss.as.controller.CapabilityRegistry.getCapabilityStatus(CapabilityRegistry.java:392)
>         at org.jboss.as.controller.CapabilityRegistry.getDependentCapabilityStatus(CapabilityRegistry.java:426)
>         at org.jboss.as.controller.CapabilityRegistry.getCapabilityStatus(CapabilityRegistry.java:392)
>         at org.jboss.as.controller.CapabilityRegistry.getDependentCapabilityStatus(CapabilityRegistry.java:426)
> {code}
> If I connect to WF 18, using jboss-cli.sh and this is the result of the read command :
> {code}
> [standalone at localhost:9990 /] /subsystem=undertow/server=default-server/host=default-host/location=\//:read-attribute(name=handler)
> {
>     "outcome" => "success",
>     "result" => "welcome-content",
>     "response-headers" => {"process-state" => "restart-required"}
> }
> {code}
> But if I do the write command :
> {code}
> [standalone at localhost:9990 /] /subsystem=undertow/server=default-server/host=default-host/location=\//:write-attribute(name=handler,value=windup-web-redirect)
> {
>     "outcome" => "failed",
>     "failure-description" => "java.lang.StackOverflowError:null"
> }
> {code}
> Even if I try to write the same value as I get from the read command it gives the same error.
> If I try to use *add* instead of *write-attribute*, I get a resource duplicated error.
> *This is stopping our current migration of RHAMT 4.3.0 to WF 18*



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list