Arquillian and Tomcat6

I have two questions regarding Arquillian and Tomcat:

-We arquillian tests fail with the following error message:

org.jboss.jsfunit.example.hellojsf.HelloJSFTest Elapsed time: 0 sec. & L; <<ERROR! org.jboss.arquillian.container.spi.ConfigurationException: Failed to connect to Tomcat manager. The server command (/ deploy? Path =% 2Ftest) failed with responseCode (401) and responseMessage (Non-Autorisé). Please make sure that you provide the correct credentials for the user who can access the Tomcat expression manager. These credentials can be specified in the Arkil container configuration as the "user" and "pass" properties. The user must have the appripriate role specified in the tomcat-users.xml file.

The FYI my arquillian.xml file is as follows:

<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"> <engine> <property name="deploymentExportPath">target/</property> <property name="jmxPort">8099</property> <property name="user">admin</property> <property name="pass">admin75</property> </engine> <defaultProtocol type="Servlet 2.5" /> <container qualifier="tomcat-remote"> <configuration> <property name="jmxPort">8099</property> <property name="user">admin</property> <property name="pass">admin75</property> </configuration> </container> </arquillian> 

I am trying to adapt a sample application for tomcat 6. Can anyone help?

-When will Arkillian support tomcat 7?

Hello,

J.

cat-users.xml:

 <tomcat-users> <role rolename="manager"/> <role rolename="tomcat"/> <role rolename="admin"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="admin" password="admin75" roles="manager,admin"/> </tomcat-users> 
+4
source share
1 answer

This message

Unable to connect to Tomcat manager. The server command (/ deploy? Path =% 2Ftest) failed with responseCode (401) and responseMessage (Non-Autorisé).

indicates that one of the following conditions is true:

  • The tomcat-users.xml used by your Tomcat installation does not have the admin user (specified by you in arquillian.xml ),
  • or the admin user is not tied to the manager role in Tomcat 6 or the manager-script role in Tomcat 7.

When will Arkillian support tomcat 7?

Arquillian supports Tomcat 7 as an embedded or managed container. The documentation is not updated (at the moment), but the configuration parameters more or less coincide with the built-in and managed equivalents in Tomcat 6. Artifact identifier for

  • managed instance of Tomcat 7 org.jboss.arquillian.container:arquillian-tomcat-managed-7 .
  • built-in instance of Tomcat 7 org.jboss.arquillian.container:arquillian-tomcat-embedded-7 .

To date, 1.0.0.CR2 is the latest stable version. You can use 1.0.0.Final-SNAPSHOT if you want to work with development 1.0.0.Final-SNAPSHOT .


In addition, you can omit several redundant properties from your arquillian.xml file. A cleaner configuration would look like this:

 <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"> <engine> <property name="deploymentExportPath">target/</property> </engine> <container qualifier="tomcat-remote"> <configuration> <property name="jmxPort">8099</property> <property name="user">admin</property> <property name="pass">admin75</property> </configuration> </container> </arquillian> 
+2
source

Source: https://habr.com/ru/post/1379913/


All Articles