[
https://issues.apache.org/jira/browse/MTOMCAT-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13829980#comment-13829980
]
Laurent GARCIA commented on MTOMCAT-238:
----------------------------------------
Same problem here, and in any configuration.
If you look at the code you will see that the staic context is added twice in
AbstractRunMojo.createStaticContext() :
{code:java}
Context staticContext = container.addContext( staticContextPath,
staticContextDocbase );
{code}
which will execute the code in Tomcat.java (tomcat-embed-core-7.0.47.jar)
{code:java}
addContext {
...
if (host == null) {
getHost().addChild(ctx);
} else {
host.addChild(ctx);
}
}
{code}
And then in AbstractRunMojo.createStaticContext() :
{code:java}
host.addChild( staticContext );
{code}
My guess is that the last line shouldn't be there.
With tomcat6-maven-plugin, everything works.
If you can patch it, I'll be very grateful :-)
> Parameter staticContextDocbase cant be used
> -------------------------------------------
>
> Key: MTOMCAT-238
> URL: https://issues.apache.org/jira/browse/MTOMCAT-238
> Project: Apache Tomcat Maven Plugin
> Issue Type: Bug
> Components: tomcat6, tomcat7
> Affects Versions: 2.0-beta-1, 2.1
> Reporter: Michal Franc
> Assignee: Olivier Lamy (*$^¨%`£)
> Fix For: moreinfo
>
>
> Attribute staticContextDocbase leads to IllegalArgumentException
> org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo#createStaticContext
> is context created from container and at the and added again to server which
> leads to java.lang.IllegalArgumentException: addChild: Child name '/' is not
> unique
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]