After running war:inplace, you'll want to delete src/main/WEB-INF/lib
and src/main/WEB-INF/classes/struts.xml - and that's it. Deleting more
will likely result in the error below since the Jetty and Tomcat
plugins are not aware of the warpath plugin.
Matt
On 5/10/07, nmall <[EMAIL PROTECTED]> wrote:
Yes, I do have the FilterDispatcher in my web.xml ( look below). I also have
struts as my web frameworkin my pom.xml. Still getting the same error (
reproduced below) and it just generates it so many times it gets my window
hung.
pom.xml:
<properties>
<copyright.year>2007</copyright.year>
<dao.framework>hibernate</dao.framework>
<web.framework>struts</web.framework>
web.xml:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
ERror:
2007-05-10 12:09:37.671::WARN: failed struts-cleanup
java.lang.ClassNotFoundException:
org.apache.struts2.dispatcher.ActionContextCle
anUp
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
oader.java:195)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:255)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:274)
at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.
java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:358)
at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:320)
at org.mortbay.util.Loader.loadClass(Loader.java:92)
mraible wrote:
>
> You must have a FilterDispatcher in your web.xml for this to happen.
> Did you start with Struts as your web framework?
>
> Matt
>
> On 5/10/07, nmall <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I did as you suggested - mvn tomcat:run-war. But now I get a different
>> error about struts ( i don't even have struts in this project yet). It
>> gives
>> the same (following) error when I do mvn jetty:run-war as well . Where do
>> I
>> need to get the struts dispatcher from?> Thanks so much for your help!
>>
>> INFO] Building war:
>> c:\work\build\myproject\target\myproject-1.0-SNAPSHOT.war
>> INFO] [tomcat:run-war]
>> INFO] Using existing Tomcat server configuration at
>> c:\work\build\myproject\tar
>> et/tomcat
>> INFO] Starting tomcat server
>> INFO] Starting Servlet Engine: Apache Tomcat/5.5.15
>> INFO] XML validation disabled
>> ERROR] Exception starting filter struts2
>> ava.lang.ClassNotFoundException:
>> org.apache.struts2.dispatcher.FilterDispatcher
>>
>> at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
>> er.java:1352)
>> at
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
>> er.java:1198)
>> at
>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio
>> FilterConfig.java:209)
>> at
>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica
>> ionFilterConfig.java:304)
>> at
>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFi
>> terConfig.java:77)
>> at
>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.
>> ava:3598)
>> at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
>>
>>
>>
>>
>> mraible wrote:
>> >
>> > If you're using the Tomcat plugin, you'll need to configure it's
>> > settings w/in that plugin. It has nothing to do with Cargo. I'd
>> > suggest using "tomcat:run-war" or "tomcat:run" rather than deploying
>> > it to an existing server. If you'd like to deploy to an existing
>> > server, just use Cargo and change your configuration from downloading
>> > to using a <home> variable. If you look, there should be a comment
>> > that tells you how to do this.
>> >
>> > Matt
>> >
>> > On 5/9/07, nmall <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Where is the port set to 8080 when deploying thru' maven. I changed my
>> >> Tomcat
>> >> port to 8081 however, though I specified 8081 in the cargo plugin as
>> >> below,
>> >> it is still trying to connect on 8080 and therefore getting a
>> connection
>> >> refused. Thanks for your suggestions!
>> >>
>> >> [INFO] Deploying war to http://localhost:8080/myproject-1.0-SNAPSHOT
>> >>
>> >>
>> >> <!-- Cargo settings -->
>> >> <cargo.container>tomcat6x</cargo.container>
>> >>
>> <cargo.container.home>${env.CATALINA_HOME}</cargo.container.home>
>> >>
>> >>
>>
<cargo.container.url>http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.23/bin/apache-tomcat-5.5.23.zip</cargo.container.url>
>> >> <cargo.host>localhost</cargo.host>
>> >> <cargo.port>8081</cargo.port>
>> >> <cargo.wait>false</cargo.wait>
>> >> 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#a10406605
>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > http://raibledesigns.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#a10414199
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> http://raibledesigns.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#a10416680
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]