1 2 Previous Next 16 Replies Latest reply on Apr 4, 2012 7:21 AM by u j

    java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create

    u j Novice

      Trying to run a test, I get

       

      java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create(Ljava/net/InetAddress;ILjavax/security/auth/callback/CallbackHandler;)Lorg/jboss/as/controller/client/ModelControllerClient;

          at org.jboss.as.arquillian.container.CommonDeployableContainer.start(CommonDeployableContainer.java:67)

          at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:198)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)

          at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)

      ...

      on Eclipse.

       

      Relevant pom extracts:

       

      <properties>

          <arquillian.version>1.0.0.CR7</arquillian.version>

          <jboss.version>7.1.0.CR1</jboss.version>

      </properties>

       

      <dependencyManagement>

          <dependencies>

              <dependency>

                  <groupId>org.jboss.arquillian</groupId>

                  <artifactId>arquillian-bom</artifactId>

                  <version>${arquillian.version}</version>

                  <scope>import</scope>

                  <type>pom</type>

              </dependency>

          </dependencies>

      </dependencyManagement>

       

      <dependency>

          <groupId>org.jboss.as</groupId>

          <artifactId>jboss-as-arquillian-container-remote</artifactId>

          <version>${jboss.version}</version>

          <scope>test</scope>

      </dependency>

      <dependency>

          <groupId>junit</groupId>

          <artifactId>junit</artifactId>

          <version>4.8.2</version>

          <scope>test</scope>

      </dependency>

      <dependency>

          <groupId>org.jboss.arquillian.junit</groupId>

          <artifactId>arquillian-junit-container</artifactId>

          <scope>test</scope>

      </dependency>

       

      When I open jboss-as-arquillian-common-7.1.0.CR1.jar, class CommonDeployableContainer, I find at the line 67

       

      ModelControllerClient modelControllerClient = ModelControllerClient.Factory.create(

                      containerConfig.getManagementAddress(),

                      containerConfig.getManagementPort(),

                      getCallbackHandler());

       

      which does not correspond to the signature in the exception!

       

      Any idea?

       

      Thanks!

        • 2. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
          u j Novice

          If I run

          mvn test

          , I get in the surefire report:

           

          org.jboss.arquillian.container.spi.client.container.DeploymentException: Could not deploy to container

              at org.jboss.as.arquillian.container.ArchiveDeployer.deploy(ArchiveDeployer.java:68)

              at org.jboss.as.arquillian.container.CommonDeployableContainer.deploy(CommonDeployableContainer.java:113)

              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:156)

              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:123)

          ...

          Caused by: java.lang.RuntimeException: java.net.ConnectException: JBAS012144: Could not connect to remote://127.0.0.1:9999. The connection timed out

              at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:118)

              at org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:47)

              at org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79)

              at org.jboss.as.arquillian.container.ArchiveDeployer.executeDeploymentPlan(ArchiveDeployer.java:84)

              at org.jboss.as.arquillian.container.ArchiveDeployer.deploy(ArchiveDeployer.java:58)

              ... 94 more

          Caused by: java.net.ConnectException: JBAS012144: Could not connect to remote://127.0.0.1:9999. The connection timed out

              at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:166)

              at org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy$Establishing.getChannel(ManagementClientChannelStrategy.java:155)

              at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getChannel(RemotingModelControllerClient.java:98)

              at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:256)

           

          In the console:

           

          org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /junit/extensions/TestDecorator.class

                  at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:296)

                  at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:252)

                  at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:247)

                  at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:111)

                  at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:116)

                  at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:116)

                  at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:101)

                  at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:51)

                  at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:125)

                  at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:119)

                  at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:130)

                  at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:122)

                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                  at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                  at java.lang.Thread.run(Thread.java:662)

          Caused by: java.io.IOException: Pipe closed

                  at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)

                  at java.io.PipedInputStream.receive(PipedInputStream.java:210)

                  at java.io.PipedOutputStream.write(PipedOutputStream.java:132)

                  at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:155)

                  at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:196)

                  at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:88)

                  at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:41)

                  at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:287)

                  at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:248)

                  at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:248)

           

          Doesn't mvn need the management login credentials? In eclipse they are set in the app server configuration panel.

           

          Thanks

          • 3. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
            u j Novice

            I installed jboss 7.1.1.final and used

             

            <dependency>

              <groupId>org.jboss.as</groupId>

              <artifactId>jboss-as-arquillian-container-remote</artifactId>

              <version>7.1.0.Beta1b</version>

            </dependency>

             

            but get the same errors.

            The server is up and running, of course.

            I didn't change any ports.

            Strange ...

             

            Thanks

            • 4. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
              u j Novice

              Some progress:

              I changed to

               

              <jboss.version>7.1.1.Final</jboss.version>

               

              and added

               

              <dependency>

                  <groupId>org.jboss.as</groupId>

                  <artifactId>jboss-as-controller-client</artifactId>

                  <version>${jboss.version}</version>

                  <scope>test</scope>

              </dependency>

               

              Now I get

               

              java.lang.NoClassDefFoundError: org/jboss/as/protocol/mgmt/ManagementOperationHandler

              ...

               

              Indeed, jboss-as-protocol-7.1.1.Final.jar does not contain that class.

               

              Some updated documentation would be helpful.

               

              Thanks

              • 7. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
                u j Novice

                Hi,

                 

                when I add

                 

                <dependency>

                    <groupId>org.jboss.as</groupId>

                    <artifactId>jboss-as-protocol</artifactId>

                    <version>7.0.2.Final</version>

                    <scope>test</scope>

                </dependency>

                 

                in Eclipse I don't get the error anymore. Note that the version is different from 7.1.1.Final. Could this be a bug?

                 

                But instead I get:

                 

                27-mar-2012 9:36:39 org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call

                ADVERTENCIA: Exception encountered during export of archive

                org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset to output: /junit/extensions/TestDecorator.class

                    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.handle(StreamExporterDelegateBase.java:296)

                    at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:252)

                    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:247)

                    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:111)

                    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:116)

                    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:116)

                    at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:101)

                    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:51)

                    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:125)

                    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:119)

                    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:130)

                    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:122)

                    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                    at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                    at java.lang.Thread.run(Thread.java:662)

                Caused by: java.io.IOException: Pipe closed

                    at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)

                    at java.io.PipedInputStream.receive(PipedInputStream.java:210)

                    at java.io.PipedOutputStream.write(PipedOutputStream.java:132)

                    at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:155)

                    at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:196)

                    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:88)

                    at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:41)

                    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:287)

                    at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:248)

                    at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:248)

                    ... 15 more

                 

                On the jboss console appears:

                10:01:32,668 ERROR [org.jboss.remoting.remote.connection] (Remoting "xxx:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Se ha forzado la interrupción de una conexión existente por el host remoto

                 

                Any idea why this happens?

                 

                Thanks!

                • 8. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
                  Aslak Knutsen Master

                  the only thing you should need is:

                   

                   

                  <dependency>
                    <groupId>org.jboss.as</groupId>
                    <artifactId>jboss-as-arquillian-container-remote</artifactId>
                    <version>7.1.1.Final</version>
                  </dependency>
                  

                   

                  Download https://repository.jboss.org/nexus/content/groups/public/org/jboss/as/jboss-as-dist/7.1.1.Final/jboss-as-dist-7.1.1.Final.zip

                  extract, cd jboss*/bin and ./standalone.sh

                   

                  Then run the test..

                  • 9. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
                    u j Novice

                    I tried the server you indicated, without changing anything of its configuration, but get exactly the same errors.

                    • 10. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
                      Aslak Knutsen Master

                      have you tried cleaning your maven repo ?

                       

                      rm -rf ~/.m2/repo/org/jboss/as

                      • 11. Re: java.lang.NoSuchMethodError: org.jboss.as.controller.client.ModelControllerClient$Factory.create
                        u j Novice

                        I did, but doesn't help.

                        I attach the effective pom, maybe you can see a problem there.

                         

                        Thanks!

                        1 2 Previous Next