5 Replies Latest reply on Apr 14, 2015 3:03 AM by Frank Langelage

    org.jboss.as.threads subsystem no longer available, how to change existing 3rd party software using this module?

    Frank Langelage Master

      Since upgrade to WildFly Core 1.0.0.Beta1 the org.jboss.as.threads subsystem is no longer available for WildFly 9 in standalone mode:

      25.03. 22:56:43,975 INFO  [org.jboss.as#start] WFLYSRV0049: WildFly Full 9.0.0.Alpha2-SNAPSHOT (WildFly Core 1.0.0.Beta1) starting

      25.03. 22:56:48,057 ERROR [org.jboss.as.server#boot] WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration

              at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.server.ServerService.boot(ServerService.java:347) [wildfly-server-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80-ea]

      Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.threads

              at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:155) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:433) [wildfly-server-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:144) [wildfly-server-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:106) [wildfly-server-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.2.0.Beta1.jar:1.2.0.Beta1]

              at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.2.0.Beta1.jar:1.2.0.Beta1]

              at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              ... 3 more

      Caused by: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException: WFLYCTL0309: Legacy extension 'org.jboss.as.threads' is not supported on servers running this version. The extension is only supported for use by hosts running a previous release in a mixed-version managed domain

              at java.util.concurrent.FutureTask.report(FutureTask.java:122) [rt.jar:1.7.0_80-ea]

              at java.util.concurrent.FutureTask.get(FutureTask.java:188) [rt.jar:1.7.0_80-ea]

              at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:147) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              ... 9 more

      Caused by: java.lang.UnsupportedOperationException: WFLYCTL0309: Legacy extension 'org.jboss.as.threads' is not supported on servers running this version. The extension is only supported for use by hosts running a previous release in a mixed-version managed domain

              at org.jboss.as.controller.extension.AbstractLegacyExtension.initializeParsers(AbstractLegacyExtension.java:81) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.controller.parsing.ExtensionXml.loadModule(ExtensionXml.java:183) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.controller.parsing.ExtensionXml.access$000(ExtensionXml.java:69) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:127) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at org.jboss.as.controller.parsing.ExtensionXml$1.call(ExtensionXml.java:124) [wildfly-controller-1.0.0.Beta1.jar:1.0.0.Beta1]

              at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_80-ea]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80-ea]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80-ea]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80-ea]

              at org.jboss.threads.JBossThread.run(JBossThread.java:320) [jboss-threads-2.2.0.Final.jar:2.2.0.Final]

       

      25.03. 22:56:48,087 FATAL [org.jboss.as.server#boot] WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

       

      I'm using a BPM software called Camunda. Their jboss/wildfly module still depends on the threads subsystem. See http://docs.camunda.org/latest/guides/installation-guide/jboss/#bpm-platform-install-the-platform-on-a-vanilla-wildfly.

      The relevant sources using org.jboss.threads are camunda-bpm-platform/JobExecutorAdd.java at master · camunda/camunda-bpm-platform · GitHub and camunda-bpm-platform/MscExecutorService.java at master · camunda/camunda-bpm-platform · GitHub.

      What would be the simpliest way to change this and get rid of the dependency to this module?

        • 1. Re: org.jboss.as.threads subsystem no longer available, how to change existing 3rd party software using this module?
          Tomaz Cerar Master

          Hey,

           

          threads subsystem was scheduled for removal and as such "internally" deprecated from 7.x times

          this is the jira for removal [WFLY-462] Eliminate the threads subsystem - JBoss Issue Tracker

           

          threads subsystem is bit particular and it is not completely going away anytime soon, but that means that module & code of the subsystem will stay and continue to be used in various parts of the server, but not as a subsystem.

           

          So all code that was using threads subsystem, by configuring thread pools in standalone.xml and then injecting it into their own msc service needs to be modified, to include resources of threads subsystem as part of their own subsystem.

          This means that configuration is not in /subsystem=threads/some-pool-type=my-pool but in resource tree of consuming subsystem like /subsystem=mysubsystem/some-pool-type=mypool

          as the resource definition used is same as before, all services will get installed the same way.

           

          I will take a look at what camuda guys are doing, to see what is the best way to fix this.

          • 2. Re: org.jboss.as.threads subsystem no longer available, how to change existing 3rd party software using this module?
            Frank Langelage Master

            Tomaz,

             

            removed the threads subsystem from standalone.xml and moved it's content into the camunda subsystem.

                <subsystem xmlns="urn:org.camunda.bpm.jboss:1.1">
                    <process-engines>
                        <process-engine name="default" default="true">
                            <datasource>java:jboss/datasources/DefaultDS</datasource>
                            <history-level>full</history-level>
                            <properties>
                                <property name="jobExecutorAcquisitionName">default</property>
                                <property name="isAutoSchemaUpdate">true</property>
                                <property name="authorizationEnabled">true</property>
                                <property name="jobExecutorDeploymentAware">true</property>
                            </properties>
                            <plugins>
                                <!-- plugin enabling Process Application event listener support -->
                                <plugin>
                                    <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
                                </plugin>
                                <!-- plugin enabling integration of camunda Spin -->
                                <plugin>
                                    <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
                                </plugin>
                                <!-- plugin enabling connect support -->
                                <plugin>
                                    <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
                                </plugin>
                            </plugins>
                        </process-engine>
                    </process-engines>
                    <job-executor>
                        <bounded-queue-thread-pool name="job-executor-tp" allow-core-timeout="true">
                            <core-threads count="3" />
                            <queue-length count="3" />
                            <max-threads count="10" />
                            <keepalive-time time="10" unit="seconds" />
                        </bounded-queue-thread-pool>
                        <thread-pool-name>job-executor-tp</thread-pool-name>
                        <job-acquisitions>
                            <job-acquisition name="default">
                                <acquisition-strategy>SEQUENTIAL</acquisition-strategy>
                                <properties>
                                    <property name="lockTimeInMillis">300000</property>
                                    <property name="waitTimeInMillis">5000</property>
                                    <property name="maxJobsPerAcquisition">3</property>
                                </properties>
                            </job-acquisition>
                        </job-acquisitions>
                    </job-executor>
                </subsystem>

            Then I made 2 changes to camunda-bpm-platform/BpmPlatformParser.java at master · camunda/camunda-bpm-platform · GitHub

            42a43

            > import org.jboss.as.threads.ThreadsParser;

            302a304,309

            >             case BOUNDED_QUEUE_THREAD_POOL: {

            >               org.jboss.as.threads.Namespace ns = org.jboss.as.threads.Namespace.THREADS_1_1;

            >               Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());

            >               ThreadsParser.getInstance().parseBoundedQueueThreadPool(reader, readerNS.getUriString(), ns, addJobExecutor, list, ModelConstants.BOUNDED_QUEUE_THREAD_POOL, ModelConstants.JOB_EXECUTOR_TP);

            >               break;

            >             }

             

            475a484,490

            >

            >       for (Property prop : property.getValue().asPropertyList()) {

            >         if (ModelConstants.BOUNDED_QUEUE_THREAD_POOL.equals(prop.getName()) && prop.getValue().isDefined() && prop.getValue().asPropertyList().size() != 0) {

            >           ThreadsParser.getInstance().writeBoundedQueueThreadPool(writer, prop.getValue().asProperty(), Element.BOUNDED_QUEUE_THREAD_POOL.getLocalName(), false);

            >         }

            >       }

            >

             

            But I get a startup failure

            13:50:21,796 INFO  [org.jboss.modules] (main) JBoss Modules version 1.4.2.Final

            13:50:23,752 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.4.Final

            13:50:24,134 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 9.0.0.CR1-SNAPSHOT (WildFly Core 1.0.0.Beta4) starting

            13:50:30,044 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration

                    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131) [wildfly-controller-1.0.0.Beta4.jar:1.0.0.Beta4]

                    at org.jboss.as.server.ServerService.boot(ServerService.java:347) [wildfly-server-1.0.0.Beta4.jar:1.0.0.Beta4]

                    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271) [wildfly-controller-1.0.0.Beta4.jar:1.0.0.Beta4]

                    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80-ea]

            Caused by: java.lang.IllegalArgumentException

                    at org.jboss.dmr.ModelValue.addChild(ModelValue.java:128) [jboss-dmr-1.3.0.Beta2.jar:1.3.0.Beta2]

                    at org.jboss.dmr.ModelNode.add(ModelNode.java:1239) [jboss-dmr-1.3.0.Beta2.jar:1.3.0.Beta2]

                    at org.jboss.dmr.ModelNode.add(ModelNode.java:1171) [jboss-dmr-1.3.0.Beta2.jar:1.3.0.Beta2]

                    at org.jboss.as.threads.ThreadsParser.parseBoundedQueueThreadPool1_1(ThreadsParser.java:421)

                    at org.jboss.as.threads.ThreadsParser.parseBoundedQueueThreadPool(ThreadsParser.java:267)

                    at org.camunda.bpm.container.impl.jboss.extension.BpmPlatformParser.parseJobExecutor(BpmPlatformParser.java:307)

                    at org.camunda.bpm.container.impl.jboss.extension.BpmPlatformParser.readElement(BpmPlatformParser.java:81)

                    at org.camunda.bpm.container.impl.jboss.extension.BpmPlatformParser.readElement(BpmPlatformParser.java:52)

                    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.2.0.Beta1.jar:1.2.0.Beta1]

                    at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.2.0.Beta1.jar:1.2.0.Beta1]

                    at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:1199) [wildfly-server-1.0.0.Beta4.jar:1.0.0.Beta4]

                    at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:457) [wildfly-server-1.0.0.Beta4.jar:1.0.0.Beta4]

                    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:144) [wildfly-server-1.0.0.Beta4.jar:1.0.0.Beta4]

                    at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:106) [wildfly-server-1.0.0.Beta4.jar:1.0.0.Beta4]

                    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.2.0.Beta1.jar:1.2.0.Beta1]

                    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.2.0.Beta1.jar:1.2.0.Beta1]

                    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123) [wildfly-controller-1.0.0.Beta4.jar:1.0.0.Beta4]

                    ... 3 more

             

            So there seems to be something wrong with ModelNode addJobExecutor but I could not find out what.

            • 3. Re: org.jboss.as.threads subsystem no longer available, how to change existing 3rd party software using this module?
              Tomaz Cerar Master

              I tried to build camuda but it failed to resolve jdbc dependencies at the time, then I got distracted by some other work and forgot about it

               

              do you maybe have your branch / fork somewhere where i can take a look?

              • 4. Re: org.jboss.as.threads subsystem no longer available, how to change existing 3rd party software using this module?
                Frank Langelage Master

                My fork of camunda including the new wildfly9 distro is at https://github.com/langfr/camunda-bpm-platform.

                mvn clean install -P distro-serverless,distro-wildfly9

                If successful folder camunda-bpm-platform/distro/wildfly9/distro/target will contain a file camunda-bpm-wildfly9-7.3.0-SNAPSHOT.zip.

                unzip this somewhere and execute start-camunda.bat / start-camunda.sh.