1 Reply Latest reply on Feb 13, 2013 10:30 AM by maverickdrools

    Arquillian + Tomcat Container Configuration

    maverickdrools Newbie

      org.jboss.arquillian.container.spi.ConfigurationException: Unable to connect to Tomcat manager. The server command (/deploy?path=%2Fb1dcf55e-db71-4243-a79f-5797cce0a8b7) failed with responseCode (403) and responseMessage (Forbidden).

       

       

      Please make sure that you provided correct credentials to an user which is able to access Tomcat manager application.

      These credentials can be specified in the Arquillian container configuration as "user" and "pass" properties.

      The user must have appripriate role specified in tomcat-users.xml file.

       

       

      How can we configure the credentials for Arquillian container? I wish to change the default configuration (which I don't know about) and successfully connect to the server.

       

      Thanks

        • 1. Re: Arquillian + Tomcat Container Configuration
          maverickdrools Newbie

          Got this thing resolved by editing arquillian.xml for my project. Now, its going a little further and trying to establish a connection with the Tomcat 6 Server. Throws an exception:

           

          java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic dG9tY2F0OnRvbWNhdA==

           

           

                    at sun.net.www.protocol.http.HttpURLConnection.checkMessageHeader(HttpURLConnection.java:433)

                    at sun.net.www.protocol.http.HttpURLConnection.isExternalMessageHeaderAllowed(HttpURLConnection.java:399)

                    at sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:2375)

                    at org.jboss.arquillian.container.tomcat.CommonTomcatManager.execute(CommonTomcatManager.java:210)

                    at org.jboss.arquillian.container.tomcat.CommonTomcatManager.deploy(CommonTomcatManager.java:94)

                    at org.jboss.arquillian.container.tomcat.remote_6.TomcatRemoteContainer.deploy(TomcatRemoteContainer.java:119)

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

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

                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)

                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                    at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                    at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                    at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)

                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)

                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)

                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)

                    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                    at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)

                    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    at java.lang.reflect.Method.invoke(Method.java:597)

                    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

                    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

                    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

                    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)

                    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)

                    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

                    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

                    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

                    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

                    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

           

          My arquliian.xml looks like:

           

          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

          <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian"

                      xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

           

           

            <engine>

              <property name="maxTestClassesBeforeRestart">1</property>

          </engine>

           

            <defaultProtocol type="Servlet 3.0" />

           

            <container qualifier="tomcat" default="true">

              <configuration>

                <!--&lt;!&ndash; Keep in sync with /guvnor-webapp/pom.xml &ndash;&gt;-->

                <property name="catalinaHome">target/apache-tomcat-6.0.33/</property>

                <!--&lt;!&ndash; Keep in sync with /guvnor-webapp/src/test/conf/tomcat6/tomcat-users.xml &ndash;&gt;-->

                <property name="user">tomcat</property>

                <property name="pass">tomcat</property>

              </configuration>

            </container>

           

          </arquillian>

           

          Any ideas what might be going wrong?

           

          Thanks