Where should the username/password be and what values.

 I looked at my tomcat conf/tomcat-users.xml file and it was empty. So I
populated it with the default values I found on Tomcat as follows and now it
gives me a different authentication error, which could happen due to many
reasons. Thanks for any suggestions!

[INFO] Cannot invoke Tomcat manager

Embedded error: Server returned HTTP response code: 403 for URL:
http://localhos
t:8080/manager/deploy?path=%2Fmyproject-1.0-SNAPSHOT&war=
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke Tomcat
man
ager        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal

<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>


Michael Horwitz wrote:
> 
> It looks like the plugin is failing to authenticate with the Tomcat
> manager
> application. Have you set the correct username and password in the plugin
> configuration?
> 
> Mike
> 
> On 5/9/07, nmall <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi,
>>
>> My tomcat server is up and running and when I do a mvn -e tomcat:deploy,
>> I
>> get the following error from maven. Any idea why. I have cargo settings
>> etc
>> in my pom.xml. Thanks for your help!
>>
>> [INFO] Generating war
>> c:\work\build\myproject\target\myproject-1.0-SNAPSHOT.war
>> [INFO] Building war:
>> c:\work\build\myproject\target\myproject-1.0-SNAPSHOT.war
>> [INFO] [tomcat:deploy]
>> [INFO] Deploying war to http://localhost:8080/myproject-1.0-SNAPSHOT
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Cannot invoke Tomcat manager
>>
>> Embedded error: Server returned HTTP response code: 401 for URL:
>> http://localhos
>> t:8080/manager/deploy?path=%2Fmyproject-1.0-SNAPSHOT&war=
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke
>> Tomcat
>> man
>> ager
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:564)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
>> Goal(DefaultLifecycleExecutor.java:493)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:463)
>>        at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
>> (DefaultLifecycleExecutor.java:311)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:278)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:143)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>        at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>
>>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke
>> Tomcat
>> manager
>>        at
>> org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalin
>> aMojo.java:140)
>>        at
>> org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarC
>> atalinaMojo.java:59)
>>        at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:443)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:539)
>>        ... 16 more
>> Caused by: java.io.IOException: Server returned HTTP response code: 401
>> for
>> URL:
>> http://localhost:8080/manager/deploy?path=%2Fmyproject-1.0-SNAPSHOT&war=
>>        at
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
>> nection.java:1174)
>>        at
>> org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:619)
>>
>>        at
>> org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:
>> 680)
>>        at
>> org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:302)
>> --
>> View this message in context:
>> http://www.nabble.com/Maven-Tomcat-deploy-401-error-tf3716595s2369.html#a10397158
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-Tomcat-deploy-401-error-tf3716595s2369.html#a10406296
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to