1 Reply Latest reply on Feb 4, 2013 5:32 AM by vata2999

    Tomcat 7 Managed command

    vata2999

      Hi,

       

      I'm trying to run Arquillian on Tomcat 7  and this is my arquillian.xml file

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <arquillian xmlns="http://jboss.org/schema/arquillian"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="
              http://jboss.org/schema/arquillian
              http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
      
      
      
          <container qualifier="tomcat" default="true">
                 <configuration>
                     <property name="unpackArchive">true</property>
                     <property name="catalinaHome">D:\Pourhadi\boshraProjects\apache-tomcat-7.0.28</property>
                     <property name="user">omid</property>
                     <property name="pass">omid</property>
                     <property name="urlCharset">UTF-8</property>
                     <property name="javaHome">C:\Program Files\Java\jdk1.7.0_04</property>
                     <property name="serverConfig">server.xml</property>
                 </configuration>
             </container>
      
      </arquillian>
      

       

      tomcat-user file

       

       

      <tomcat-users>
      
        <role rolename="tomcat"/>
        <role rolename="role1"/>
        <user username="tomcat" password="tomcat" roles="tomcat"/>
        <user username="omid" password="omid" roles="tomcat,role1,manager-gui,admin-gui,admin-script"/>
        <user username="role1" password="tomcat" roles="role1"/>
      
      </tomcat-users>
      

       

      test file :

       

       

      @RunWith(Arquillian.class)
      @SpringConfiguration("applicationContext.xml")
      public class GreeterTest {
      
          @Deployment
          public static JavaArchive createTestArchive()
          {
              return ShrinkWrap.create(JavaArchive.class).addClasses(Greeter.class).addAsResource("applicationContext.xml");
          }
      
          @Autowired
          Greeter greeter;
      
          @Test
          public void should_create_greeting()
          {
              Assert.assertNotNull(greeter);
          }
      }
      

       

      but I get this exception :

       

       

      org.jboss.arquillian.container.spi.ConfigurationException: Unable to connect to Tomcat manager. The server command (/text/list) 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.
      

       

      which is irrelevant what is this command (/text/list) ?

       

      PS : how can I tell Arquillian that I don't want to use container ?