tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilberto C Andrade (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MTOMCAT-128) The plugin ignores and/or parses web.xml incorrectally when using tomcatWebXml option
Date Fri, 01 Feb 2013 15:04:13 GMT

    [ https://issues.apache.org/jira/browse/MTOMCAT-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13568777#comment-13568777
] 

Gilberto C Andrade commented on MTOMCAT-128:
--------------------------------------------

I've update maven to 3.0.4. But ...
It seems that the fix didn't no effect:

gilberto.andrade@A37710:~/dev/netbeans-config/reca$ mvn clean tomcat7:run
[INFO] Scanning for projects...
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-maven-plugin/2.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-maven-plugin/2.1-SNAPSHOT/maven-metadata.xml
(790 B at 0.3 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-maven-plugin/2.1-SNAPSHOT/tomcat7-maven-plugin-2.1-20130131.210909-32.pom
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-maven-plugin/2.1-SNAPSHOT/tomcat7-maven-plugin-2.1-20130131.210909-32.pom
(12 KB at 10.6 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat-maven-plugin/2.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat-maven-plugin/2.1-SNAPSHOT/maven-metadata.xml
(827 B at 0.8 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat-maven-plugin/2.1-SNAPSHOT/tomcat-maven-plugin-2.1-20130131.210904-33.pom
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat-maven-plugin/2.1-SNAPSHOT/tomcat-maven-plugin-2.1-20130131.210904-33.pom
(31 KB at 28.8 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-maven-plugin/2.1-SNAPSHOT/tomcat7-maven-plugin-2.1-20130131.210909-32.jar
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-maven-plugin/2.1-SNAPSHOT/tomcat7-maven-plugin-2.1-20130131.210909-32.jar
(103 KB at 51.8 KB/sec)
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Recadastramento de Servidores Civis e Militares 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ reca ---
[INFO] Deleting /home/gilberto.andrade/dev/netbeans-config/reca/target
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.1-SNAPSHOT:run (default-cli) @ reca >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ reca ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO] Copying 13 resources
[INFO] Copying 1 resource to /home/gilberto.andrade/dev/netbeans-config/reca/target/reca/WEB-INF/
[INFO] Copying 34 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ reca ---
[INFO] Compiling 99 source files to /home/gilberto.andrade/dev/netbeans-config/reca/target/reca/WEB-INF/classes
[WARNING] bootstrap class path not set in conjunction with -source 1.5
/home/gilberto.andrade/dev/netbeans-config/reca/src/main/java/br/gov/to/secad/seg/view/DeleteUser.java:[70,18]
[deprecation] AttributeModifier(String,boolean,IModel<?>) in AttributeModifier has been
deprecated
[WARNING] /home/gilberto.andrade/dev/netbeans-config/reca/src/main/java/br/gov/to/secad/seg/view/DeleteUser.java:[90,17]
[deprecation] AttributeModifier(String,boolean,IModel<?>) in AttributeModifier has been
deprecated
[WARNING] /home/gilberto.andrade/dev/netbeans-config/reca/src/main/java/br/gov/to/secad/seg/view/FindByServidor.java:[80,22]
[deprecation] addComponent(Component...) in AjaxRequestTarget has been deprecated
[WARNING] /home/gilberto.andrade/dev/netbeans-config/reca/src/main/java/br/gov/to/secad/seg/view/FindByServidor.java:[104,22]
[deprecation] addComponent(Component...) in AjaxRequestTarget has been deprecated
[WARNING] /home/gilberto.andrade/dev/netbeans-config/reca/src/main/java/br/gov/to/secad/seg/view/FindByServidor.java:[105,22]
[deprecation] addComponent(Component...) in AjaxRequestTarget has been deprecated
[WARNING] /home/gilberto.andrade/dev/netbeans-config/reca/src/main/java/br/gov/to/secad/seg/view/FindByServidor.java:[107,26]
[deprecation] addComponent(Component...) in AjaxRequestTarget has been deprecated
[WARNING] /home/gilberto.andrade/dev/netbeans-config/reca/src/main/java/br/gov/to/secad/seg/view/FindByServidor.java:[114,22]
[deprecation] addComponent(Component...) in AjaxRequestTarget has been deprecated
[INFO] 
[INFO] --- jasperreports-maven-plugin:1.0-beta-2:compile-reports (jrc) @ reca ---
Downloading: http://repository.apache.org/content/repositories/snapshots/commons-beanutils/commons-beanutils/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/commons-beanutils/commons-beanutils/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/commons-beanutils/commons-beanutils/maven-metadata.xml
(330 B at 0.3 KB/sec)
Downloading: http://snapshots.repository.codehaus.org/commons-beanutils/commons-beanutils/1.8.4-SNAPSHOT/maven-metadata.xml
Downloading: http://repository.apache.org/content/repositories/snapshots/commons-beanutils/commons-beanutils/1.8.4-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/commons-beanutils/commons-beanutils/1.8.4-SNAPSHOT/maven-metadata.xml
(2 KB at 1.0 KB/sec)
Downloading: http://snapshots.repository.codehaus.org/commons-collections/commons-collections/maven-metadata.xml
Downloading: http://repository.apache.org/content/repositories/snapshots/commons-collections/commons-collections/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/commons-collections/commons-collections/maven-metadata.xml
(330 B at 0.3 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/commons-collections/commons-collections/4.0-SNAPSHOT/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/commons-collections/commons-collections/4.0-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/commons-collections/commons-collections/4.0-SNAPSHOT/maven-metadata.xml
(3 KB at 2.4 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/commons-digester/commons-digester/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/commons-digester/commons-digester/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/commons-logging/commons-logging/maven-metadata.xml
Downloading: http://repository.apache.org/content/repositories/snapshots/commons-logging/commons-logging/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/commons-logging/commons-logging/maven-metadata.xml
(364 B at 0.2 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/commons-logging/commons-logging/1.1.2-SNAPSHOT/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/commons-logging/commons-logging/1.1.2-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/commons-logging/commons-logging/1.1.2-SNAPSHOT/maven-metadata.xml
(3 KB at 2.0 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/itext/itext/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/itext/itext/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/jfree/jcommon/maven-metadata.xml
Downloading: http://repository.apache.org/content/repositories/snapshots/jfree/jcommon/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/jfree/jfreechart/maven-metadata.xml
Downloading: http://repository.apache.org/content/repositories/snapshots/jfree/jfreechart/maven-metadata.xml
Downloading: http://repository.apache.org/content/repositories/snapshots/eclipse/jdtcore/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/eclipse/jdtcore/maven-metadata.xml
[INFO] Nothing to compile - all Jasper reports are up to date
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.1-SNAPSHOT:run (default-cli) @ reca <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.1-SNAPSHOT:run (default-cli) @ reca ---
Downloading: http://10.121.0.20/nexus/content/groups/public/org/eclipse/jdt/core/compiler/ecj/4.2.1/ecj-4.2.1.pom
Downloaded: http://10.121.0.20/nexus/content/groups/public/org/eclipse/jdt/core/compiler/ecj/4.2.1/ecj-4.2.1.pom
(2 KB at 0.1 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/common-tomcat-maven-plugin/2.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/common-tomcat-maven-plugin/2.1-SNAPSHOT/maven-metadata.xml
(796 B at 0.5 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/common-tomcat-maven-plugin/2.1-SNAPSHOT/common-tomcat-maven-plugin-2.1-20130131.210902-33.pom
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/common-tomcat-maven-plugin/2.1-SNAPSHOT/common-tomcat-maven-plugin-2.1-20130131.210902-33.pom
(5 KB at 4.2 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-war-runner/2.1-SNAPSHOT/maven-metadata.xml
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-war-runner/2.1-SNAPSHOT/maven-metadata.xml
(788 B at 0.7 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-war-runner/2.1-SNAPSHOT/tomcat7-war-runner-2.1-20130131.210910-33.pom
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-war-runner/2.1-SNAPSHOT/tomcat7-war-runner-2.1-20130131.210910-33.pom
(4 KB at 3.5 KB/sec)
Downloading: http://10.121.0.20/nexus/content/groups/public/org/eclipse/jdt/core/compiler/ecj/4.2.1/ecj-4.2.1.jar
Downloaded: http://10.121.0.20/nexus/content/groups/public/org/eclipse/jdt/core/compiler/ecj/4.2.1/ecj-4.2.1.jar
(1755 KB at 77.2 KB/sec)
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/common-tomcat-maven-plugin/2.1-SNAPSHOT/common-tomcat-maven-plugin-2.1-20130131.210902-33.jar
Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-war-runner/2.1-SNAPSHOT/tomcat7-war-runner-2.1-20130131.210910-33.jar
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/tomcat7-war-runner/2.1-SNAPSHOT/tomcat7-war-runner-2.1-20130131.210910-33.jar
(24 KB at 12.1 KB/sec)
Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/tomcat/maven/common-tomcat-maven-plugin/2.1-SNAPSHOT/common-tomcat-maven-plugin-2.1-20130131.210902-33.jar
(38 KB at 17.0 KB/sec)
[INFO] Running war on http://localhost:8080/reca
[INFO] Creating Tomcat server configuration at /home/gilberto.andrade/dev/netbeans-config/reca/target/tomcat
[INFO] create webapp with contextPath: /reca
Feb 01, 2013 11:43:15 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Feb 01, 2013 11:43:15 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Feb 01, 2013 11:43:15 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.35
Feb 01, 2013 11:43:18 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
11:43:20,423  INFO WebXmlFile:243 - web.xml: url mapping found for filter with name RECA:
[/*]
Feb 01, 2013 11:43:20 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter RECA
java.lang.IllegalArgumentException: Invalid configuration type: '${wicket.MODE}'.  Must be
"development" or "deployment".
        at org.apache.wicket.protocol.http.WebApplication.getConfigurationType(WebApplication.java:667)
        at org.apache.wicket.Application.configure(Application.java:297)
        at org.apache.wicket.protocol.http.WebApplication.internalInit(WebApplication.java:610)
        at org.apache.wicket.Application.initApplication(Application.java:804)
        at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
        at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4656)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5312)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

Feb 01, 2013 11:43:20 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
Feb 01, 2013 11:43:20 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/reca] startup failed due to previous errors
Feb 01, 2013 11:43:20 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Feb 01, 2013 11:43:20 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/reca] registered the JDBC driver [org.postgresql.Driver] but
failed to unregister it when the web application was stopped. To prevent a memory leak, the
JDBC Driver has been forcibly unregistered.
Feb 01, 2013 11:43:20 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]

                
> The plugin ignores and/or parses web.xml incorrectally when using tomcatWebXml option
> -------------------------------------------------------------------------------------
>
>                 Key: MTOMCAT-128
>                 URL: https://issues.apache.org/jira/browse/MTOMCAT-128
>             Project: Apache Tomcat Maven Plugin
>          Issue Type: Bug
>          Components: tomcat6, tomcat7
>    Affects Versions: 2.0-beta-1
>         Environment: openSUSE 12.1 32Bits
>            Reporter: Gilberto C Andrade
>            Assignee: Olivier Lamy (*$^¨%`£)
>            Priority: Trivial
>             Fix For: 2.1
>
>
> In our project(jpa-spring-wicket) we need to filter the web.xml file, changing some placeholder
and putting it (the web.xml) in ${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml.
> Using tomcat6-maven-plugin it find the correct file, but fail when parsing it:
> <quote>
> Caused by: java.lang.IllegalArgumentException: Duplicate context initialization parameter
contextConfigLocation
> 	at org.apache.catalina.core.StandardContext.addParameter(StandardContext.java:2661)
> 	... 52 more
> Mar 16, 2012 11:49:12 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
> SEVERE: Parse error in application web.xml file at jndi:/localhost/a2p/WEB-INF/web.xml
> org.xml.sax.SAXParseException; systemId: jndi:/localhost/a2p/WEB-INF/web.xml; lineNumber:
15; columnNumber: 21; Error at (15, 21: Duplicate context initialization parameter contextConfigLocation
> 	at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2806)
> </quote>
> Using tomcat7-maven-plugin it find the correct file, but ignores it so using the original
file which contain the ${placeholder}. Thus not initializing the application:
> <quote>
> INFO  - ContextLoader              - Root WebApplicationContext: initialization completed
in 7808 ms
> INFO  - WebXmlFile                 - web.xml: url mapping found for filter with name
A2P: [/*]
> Mar 16, 2012 12:08:16 PM org.apache.catalina.core.StandardContext filterStart
> SEVERE: Exception starting filter A2P
> java.lang.IllegalArgumentException: Invalid configuration type: '${wicket.MODE}'.  Must
be "development" or "deployment".
> 	at org.apache.wicket.protocol.http.WebApplication.getConfigurationType(WebApplication.java:670)
> 	at org.apache.wicket.Application.configure(Application.java:297)
> 	at org.apache.wicket.protocol.http.WebApplication.internalInit(WebApplication.java:613)
> 	at org.apache.wicket.Application.initApplication(Application.java:806)
> 	at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:346)
> 	at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:286)
> 	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
> 	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
> </quote> 
> The plugin configuration:
> <quote>
>           <plugin>
>                 <groupId>org.apache.tomcat.maven</groupId>
>                 <artifactId>tomcat7-maven-plugin</artifactId>
>                 <version>2.0-beta-1</version>
>                 <configuration>
>                     <contextPath>${project.build.finalName}</contextPath>
>                     <tomcatWebXml>${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml</tomcatWebXml>
>                 </configuration>
>             </plugin>
> </quote>
> I have the jetty plugin setup as well and working, so I would try with tomcat but without
success until now.
> Regards

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message