[jira] [Commented] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142940#comment-13142940 ] Olivier Lamy commented on MTOMCAT-105: -- It looks the war generated by your project is not generated. Does your project produce a war file ? To trigger exec-war-only goal in the package phase, your execution block must be in build/plugins/plugin rather than in pluginManagement section. > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ
[jira] [Commented] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142995#comment-13142995 ] albert kam commented on MTOMCAT-105: Aha, i see ! Yes, it's just like you said, now the the goal is triggered when doing the package phase. Thank you ! This should be another question, but still i got error when trying to run it with java -jar mywar.jar -httpPort 8080 Caused by: com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/localhost/PrimefacesSetup/WEB-INF/faces-config.xml': jndi:/localhost/PrimefacesSetup/WEB-INF/faces-config.xml at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920) at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656) ... 10 more Caused by: java.io.FileNotFoundException: jndi:/localhost/PrimefacesSetup/WEB-INF/faces-config.xml at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnectio n.java:385) at com.sun.faces.config.ConfigManager$ParseTask.getInputStream(ConfigManager.java:1106) at com.sun.faces.config.ConfigManager$ParseTask.getDocument(ConfigManager.java:941) at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:911) ... 14 more Strange that it's looking in the naming, since i got the file in here (i check the file's existence after extracting the executable war) C:\Users\albert\workspace\PrimefacesSetup\target\PrimefacesSetup-0.0.1-SNAPSHOT-war-exec\PrimefacesSetup\WEB-INF\faces-config.xml And yup, it works fine in tomcat7:run .. Out of topic question : Do you have a mailing list or a group or forum where i can ask questions ? I feel bad about making issues without first discussing it. =) > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execu
[jira] [Commented] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143009#comment-13143009 ] Olivier Lamy commented on MTOMCAT-105: -- see http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/mail-lists.html Can I have a sample application to reproduce that ? > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.ref
[jira] [Updated] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] albert kam updated MTOMCAT-105: --- Attachment: BasicSetup.zip The simple app, whose executable war runs wrongly, with the error of java.io.FileNotFoundException: jndi:/localhost/BasicSetup/WEB-INF/faces-config.xml > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Attachments: BasicSetup.zip > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAc
[jira] [Issue Comment Edited] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143026#comment-13143026 ] albert kam edited comment on MTOMCAT-105 at 11/3/11 10:14 AM: -- Here is the simple app attachment, whose executable war runs wrongly, with the error of java.io.FileNotFoundException: jndi:/localhost/BasicSetup/WEB-INF/faces-config.xml was (Author: albert kam): Here is the simple app attachment, whose executable war runs wrongly, with the error of java.io.FileNotFoundException: jndi:/localhost/BasicSetup/WEB-INF/faces-config.xml Although im not sure where the file is located now >.< > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Attachments: BasicSetup.zip > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.Default
[jira] [Issue Comment Edited] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143026#comment-13143026 ] albert kam edited comment on MTOMCAT-105 at 11/3/11 10:14 AM: -- Here is the simple app attachment, whose executable war runs wrongly, with the error of java.io.FileNotFoundException: jndi:/localhost/BasicSetup/WEB-INF/faces-config.xml Although im not sure where the file is located now >.< was (Author: albert kam): The simple app, whose executable war runs wrongly, with the error of java.io.FileNotFoundException: jndi:/localhost/BasicSetup/WEB-INF/faces-config.xml > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Attachments: BasicSetup.zip > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.DefaultMaven.execute(Defaul
DO NOT REPLY [Bug 52127] java.lang.IncompatibleClassChangeError
https://issues.apache.org/bugzilla/show_bug.cgi?id=52127 Konstantin Kolinko changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #1 from Konstantin Kolinko 2011-11-03 13:59:12 UTC --- No, it is very unlikely that it is one. If you need more help, ask in proper places. As was already said many times, Bugzilla is not a support forum. http://tomcat.apache.org/bugreport.html#Bugzilla_is_not_a_support_forum Closing as INVALID. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197125 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/NioEndpoint.java
Author: kkolinko Date: Thu Nov 3 14:05:24 2011 New Revision: 1197125 URL: http://svn.apache.org/viewvc?rev=1197125&view=rev Log: Merged revisions r1196825 r1196827 from tomcat/trunk: Wrap and format long lines. No functional change. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Nov 3 14:05:24 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,1188303-1188305,1188399,1188822,118
svn commit: r1197158 - in /tomcat/trunk: java/org/apache/tomcat/util/net/AbstractEndpoint.java test/org/apache/catalina/startup/TomcatBaseTest.java
Author: kkolinko Date: Thu Nov 3 14:40:21 2011 New Revision: 1197158 URL: http://svn.apache.org/viewvc?rev=1197158&view=rev Log: Add new attribute to AbstractEndpoint and use it to speed up Tomcat tests. If the attribute "fastShutdown" is set on the endpoint, the usual wait of 1 sec during pause() is skipped. I think it needs to be added to http.xml/ajp.xml docs, but that will be a separate commit sometime later. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1197158&r1=1197157&r2=1197158&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Thu Nov 3 14:40:21 2011 @@ -112,6 +112,23 @@ public abstract class AbstractEndpoint { // - Properties +/** + * A flag that can be used to speed up Tomcat shutdown by testing + * environments where we control external connections to Tomcat. Set it to + * {@code true} if it is known that there are no active or pending + * connections and all requests have already been processed. The default + * value is {@code false}. + */ +private boolean fastShutdown = false; + +public void setFastShutdown(boolean fastShutdown) { +this.fastShutdown = fastShutdown; +} + +public boolean isFastShutdown() { +return fastShutdown; +} + private int maxConnections = 1; public void setMaxConnections(int maxCon) { this.maxConnections = maxCon; @@ -514,6 +531,11 @@ public abstract class AbstractEndpoint { public void pause() { if (running && !paused) { paused = true; +if (isFastShutdown()) { +// unlockAccept will also be called by stopInternal(), +// so when shutting down it can be skipped here. +return; +} unlockAccept(); // Heuristic: Sleep for a while to ensure pause of the endpoint try { Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1197158&r1=1197157&r2=1197158&view=diff == --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Thu Nov 3 14:40:21 2011 @@ -200,6 +200,10 @@ public abstract class TomcatBaseTest { @After public void tearDown() throws Exception { +// Speed up Tomcat shutdown +if (tomcat.connector != null) { +tomcat.connector.setProperty("fastShutdown", "true"); +} // Some tests may call tomcat.destroy(), some tests may just call // tomcat.stop(), some not call either method. Make sure that stop() & // destroy() are called as necessary. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [patch] Speed up Tomcat shutdown during test runs
2011/11/3 Konstantin Kolinko : > Hi! > > The patch: > http://people.apache.org/~kkolinko/patches/2011-11-03_tc8_fastShutdown.patch > > It saves 1 second for each Tomcat shutdown during tests, > by skipping a sleep in AbstractEndpoint.pause(). > > I think it is worth doing, but maybe there are other comments? > > > All tests for one connector run about 11,5 minutes for me with this patch. > Applied in http://svn.apache.org/viewvc?view=revision&revision=1197158 The buildbot results with testing (bio+nio) before: http://ci.apache.org/builders/tomcat-trunk/builds/2454/steps/compile_1 28 mins, 43 secs after the patch: http://ci.apache.org/builders/tomcat-trunk/builds/2455/steps/compile_1 18 mins, 50 secs That is even better than I anticipated. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Redeploy on context.xml changes (Was: Tagging 7.0.23)
On 02/11/2011 15:35, Konstantin Kolinko wrote: > 2011/11/2 : > Also s/redploy/redeploy/ in some Javadoc. Fixed for next iteration of the patch. > The removeWatchedResource() method in the patch is NOOP instead of > calling renamed method. Also fixed. > The following in StandardContext.java does not look backwards-compatible: > -fireContainerEvent("addWatchedResource", name); > +fireContainerEvent("addReloadResource", name); > and > - fireContainerEvent("removeWatchedResource", name); > +fireContainerEvent("removeReloadResource", name); > > Better keep the old name of "watched" and just add the new one of "redeploy". > In all places the "redeploy" list is new and parallel to the old "watched" > one. Fixed too. >> The one thing I don't like is that a change to conf/context.xml that >> breaks the file effectively kills the instance until the problem is >> fixed and the instance re-started. > > Looking at HostConfig.checkResources(DeployedApplication) note several > ExpandWar.delete() calls. The order is important there. If redeploy > resource #i is missing or updated it deletes all following redeploy > resources starting with #(i+1). > > With this behaviour it is better not to let a user to control this > "redeploy" list. Fair point. I'll remove them from the docs, the digester and JMX. > Regarding the original task of what happens when context.xml is > touched or edited: redeploying deletes the work dir, along with all > persisted sessions and all compiled JSPs. (ContextConfig.destroy() > triggered by Host.removeChild() does the deletion) > > It is an enormous price to pay for editing an AccessLogValve > configuration or whatever is important in context.xml. I'd prefer a > solution that does not delete the work dir. I do see where you are coming from here. There are times when it isn't necessary to clean out the work dir or the sessions. However, figuring out which is which is really tricky. I'm not even sure it is completely possible. We need to use redeploy else the Context configuration won't get re-read. I think the answer is to use parallel deployment if you don't want to lose sessions etc although that doesn't help with the work dir. There is always pre-compilation for that. I don't think a one-size-fits-all solution is possible here but I think we do have options that cover the key use cases. I'm still looking at: - recovery after fixing the broken file - not deploying an expanded dir if the context.xml in conf/Catalina/localhost is broken. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143326#comment-13143326 ] Olivier Lamy commented on MTOMCAT-105: -- can you try with enabling naming: {code:xml} true {code} > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Attachments: BasicSetup.zip > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccess
[Taglibs] Is anyone looking after taglibs?
The Jakarta TLP is about to retire to the attic; however the taglibs site still refers to non-existent jakarta pages for the downloads. A bug [1] was raised for this for this some while ago, but there appears to be no-one interested in fixing the issue. [1] https://issues.apache.org/bugzilla/show_bug.cgi?id=51382 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197261 - in /tomcat/trunk/test/org/apache/catalina/startup: LoggingBaseTest.java TomcatBaseTest.java
Author: kkolinko Date: Thu Nov 3 18:41:39 2011 New Revision: 1197261 URL: http://svn.apache.org/viewvc?rev=1197261&view=rev Log: Introduce a new class LoggingBaseTest and move the following features from TomcatBaseTest there: setting up logging, creating temporary directory, deleting files on tear down. This allows to use the same logging configuration in tests that do not use Tomcat. Added: tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java (with props) Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Added: tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java?rev=1197261&view=auto == --- tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java (added) +++ tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java Thu Nov 3 18:41:39 2011 @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina.startup; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.Assert.fail; + +import org.junit.After; +import org.junit.Before; + +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; + +/** + * Base class that provides logging support for test cases that respects the + * standard conf/logging.properties configuration file. + * + * + * It also provides support for cleaning up temporary files after shutdown. See + * {@link #addDeleteOnTearDown(File)}. + * + * + * Note that the logging configuration uses + * ${catalina.base} value and thus we take care about that property + * even if the tests do not use Tomcat. + */ +public abstract class LoggingBaseTest { + +protected Log log; + +private File tempDir; + +private List deleteOnTearDown = new ArrayList(); + +/** + * Helper method that returns the directory where Tomcat build resides. It + * is used to access resources that are part of default Tomcat deployment. + * E.g. the examples webapp. + */ +public File getBuildDirectory() { +return new File(System.getProperty("tomcat.test.tomcatbuild", +"output/build")); +} + +/** + * Helper method that returns the path of the temporary directory used by + * the test runs. The directory is configured during {@link #setUp()}. + * + * + * It is used as ${catalina.base} for the instance of Tomcat + * that is being started, but can be used to store other temporary files as + * well. Its work and webapps subdirectories are + * deleted at {@link #tearDown()}. If you have other files or directories + * that have to be deleted on cleanup, register them with + * {@link #addDeleteOnTearDown(File)}. + */ +public File getTemporaryDirectory() { +return tempDir; +} + +/** + * Schedule the given file or directory to be deleted during after-test + * cleanup. + * + * @param file + *File or directory + */ +public void addDeleteOnTearDown(File file) { +deleteOnTearDown.add(file); +} + +@Before +public void setUp() throws Exception { +// Create catalina.base directory +tempDir = new File(System.getProperty("tomcat.test.temp", "output/tmp")); +if (!tempDir.mkdirs() && !tempDir.isDirectory()) { +fail("Unable to create temporary directory for test"); +} + +System.setProperty("catalina.base", tempDir.getAbsolutePath()); + +// Configure logging +System.setProperty("java.util.logging.manager", +"org.apache.juli.ClassLoaderLogManager"); +System.setProperty("java.util.logging.config.file", new File( +getBuildDirectory(), "conf/logging.properties").toString()); + +// Get log instance after logging has been configured +log = LogFactory.getLog(getClass()); +} + +@After +public void tearDown() throws Exception { +for (File file : deleteOnTearDown) { +ExpandWar.delete(file); +
svn commit: r1197263 - /tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java
Author: kkolinko Date: Thu Nov 3 18:43:09 2011 New Revision: 1197263 URL: http://svn.apache.org/viewvc?rev=1197263&view=rev Log: Clean up code and use logging framework instead of System.out. Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java?rev=1197263&r1=1197262&r2=1197263&view=diff == --- tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java (original) +++ tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java Thu Nov 3 18:43:09 2011 @@ -25,45 +25,49 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.apache.catalina.startup.LoggingBaseTest; import org.apache.catalina.tribes.Channel; import org.apache.catalina.tribes.ChannelListener; import org.apache.catalina.tribes.ManagedChannel; import org.apache.catalina.tribes.Member; import org.apache.catalina.tribes.transport.ReplicationTransmitter; -public class TestGroupChannelSenderConnections { -private static int count = 2; +public class TestGroupChannelSenderConnections extends LoggingBaseTest { +private static final int count = 2; private ManagedChannel[] channels = new ManagedChannel[count]; private TestMsgListener[] listeners = new TestMsgListener[count]; @Before +@Override public void setUp() throws Exception { +super.setUp(); for (int i = 0; i < channels.length; i++) { channels[i] = new GroupChannel(); channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII")); listeners[i] = new TestMsgListener( ("Listener-" + (i + 1))); channels[i].addChannelListener(listeners[i]); channels[i].start(Channel.SND_RX_SEQ|Channel.SND_TX_SEQ); - } } -public void clear() { -// NOOP -} - public void sendMessages(long delay, long sleep) throws Exception { Member local = channels[0].getLocalMember(true); Member dest = channels[1].getLocalMember(true); int n = 3; -System.out.println("Sending " + n + " messages from [" + local.getName() + "] to [" + dest.getName() + "]"); +log.info("Sending " + n + " messages from [" + local.getName() ++ "] to [" + dest.getName() + "] with delay of " + delay ++ " ms between them."); for (int i = 0; i < n; i++) { -channels[0].send(new Member[] {dest}, new TestMsg(), 0); -if ( delay > 0 ) Thread.sleep(delay); +channels[0].send(new Member[] { dest }, new TestMsg(), 0); +if (delay > 0) { +Thread.sleep(delay); +} +} +log.info("Messages sent. Sleeping for " + (sleep / 1000) ++ " seconds to inspect connections"); +if (sleep > 0) { +Thread.sleep(sleep); } -System.out.println("Messages sent. Sleeping for "+(sleep/1000)+" seconds to inspect connections"); -if ( sleep > 0 ) Thread.sleep(sleep); - } @Test @@ -73,7 +77,7 @@ public class TestGroupChannelSenderConne @Test public void testKeepAliveCount() throws Exception { -System.out.println("Setting keep alive count to 0"); +log.info("Setting keep alive count to 0"); for (int i = 0; i < channels.length; i++) { ReplicationTransmitter t = (ReplicationTransmitter)channels[0].getChannelSender(); t.getTransport().setKeepAliveCount(0); @@ -83,7 +87,7 @@ public class TestGroupChannelSenderConne @Test public void testKeepAliveTime() throws Exception { -System.out.println("Setting keep alive count to 1 second"); +log.info("Setting keep alive count to 1 second"); for (int i = 0; i < channels.length; i++) { ReplicationTransmitter t = (ReplicationTransmitter)channels[0].getChannelSender(); t.getTransport().setKeepAliveTime(1000); @@ -92,17 +96,22 @@ public class TestGroupChannelSenderConne } @After +@Override public void tearDown() throws Exception { -for (int i = 0; i < channels.length; i++) { -channels[i].stop(Channel.DEFAULT); +try { +for (int i = 0; i < channels.length; i++) { +channels[i].stop(Channel.DEFAULT); +} +} finally { +super.tearDown(); } - } +// Test message. The message size is random. public static class TestMsg implements Serializable { private static final long serialVersionUID = 1L; -static Random r = new Random(); -
svn commit: r1197299 - /tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml
Author: markt Date: Thu Nov 3 20:36:48 2011 New Revision: 1197299 URL: http://svn.apache.org/viewvc?rev=1197299&view=rev Log: Correct descriptions Modified: tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml Modified: tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml?rev=1197299&r1=1197298&r2=1197299&view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml (original) +++ tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml Thu Nov 3 20:36:48 2011 @@ -313,7 +313,7 @@ type="org.apache.catalina.valves.RemoteAddrValve">
svn commit: r1197300 - /tomcat/trunk/java/org/apache/catalina/valves/RequestFilterValve.java
Author: markt Date: Thu Nov 3 20:37:26 2011 New Revision: 1197300 URL: http://svn.apache.org/viewvc?rev=1197300&view=rev Log: Ensure that subsequent attempts to start the Valves will not succeed until valid configuration is provided. Modified: tomcat/trunk/java/org/apache/catalina/valves/RequestFilterValve.java Modified: tomcat/trunk/java/org/apache/catalina/valves/RequestFilterValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/RequestFilterValve.java?rev=1197300&r1=1197299&r2=1197300&view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/RequestFilterValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/valves/RequestFilterValve.java Thu Nov 3 20:37:26 2011 @@ -73,6 +73,14 @@ public abstract class RequestFilterValve */ protected volatile Pattern allow = null; + +/** + * The current allow configuration value that may or may not compile into a + * valid {@link Pattern}. + */ +protected volatile String allowValue = null; + + /** * Helper variable to catch configuration errors. * It is true by default, but becomes false @@ -87,6 +95,14 @@ public abstract class RequestFilterValve */ protected volatile Pattern deny = null; + +/** + * The current deny configuration value that may or may not compile into a + * valid {@link Pattern}. + */ +protected volatile String denyValue = null; + + /** * Helper variable to catch configuration errors. * It is true by default, but becomes false @@ -104,12 +120,7 @@ public abstract class RequestFilterValve * Valve, if any; otherwise, return null. */ public String getAllow() { -// Use local copies for thread safety -Pattern allow = this.allow; -if (allow == null) { -return null; -} -return allow.toString(); +return allowValue; } @@ -122,10 +133,12 @@ public abstract class RequestFilterValve public void setAllow(String allow) { if (allow == null || allow.length() == 0) { this.allow = null; +allowValue = null; allowValid = true; } else { boolean success = false; try { +allowValue = allow; this.allow = Pattern.compile(allow); success = true; } finally { @@ -140,12 +153,7 @@ public abstract class RequestFilterValve * Valve, if any; otherwise, return null. */ public String getDeny() { -// Use local copies for thread safety -Pattern deny = this.deny; -if (deny == null) { -return null; -} -return deny.toString(); +return denyValue; } @@ -158,10 +166,12 @@ public abstract class RequestFilterValve public void setDeny(String deny) { if (deny == null || deny.length() == 0) { this.deny = null; +denyValue = null; denyValid = true; } else { boolean success = false; try { +denyValue = deny; this.deny = Pattern.compile(deny); success = true; } finally { @@ -203,6 +213,16 @@ public abstract class RequestFilterValve } +@Override +protected synchronized void startInternal() throws LifecycleException { +if (!allowValid || !denyValid) { +throw new LifecycleException( +sm.getString("requestFilterValve.configInvalid")); +} +super.startInternal(); +} + + /** * Perform the filtering that has been configured for this Valve, matching * against the specified request property. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197302 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/mbeans-descriptors.xml
Author: markt Date: Thu Nov 3 20:47:44 2011 New Revision: 1197302 URL: http://svn.apache.org/viewvc?rev=1197302&view=rev Log: Correct descriptions Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Nov 3 20:47:44 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,118
svn commit: r1197305 - /tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java
Author: kkolinko Date: Thu Nov 3 20:54:52 2011 New Revision: 1197305 URL: http://svn.apache.org/viewvc?rev=1197305&view=rev Log: Remove 15s wait after each test. I do not understand why that 15s wait with "inspect connections" message was there. Nothing was checked after the wait. Replaced it with a check of the count of received messages. Removed wait after sending the last message in the group of 3. This change saves (3 * 15 sec) + (1 sec + 2 sec) = 48 seconds. Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java?rev=1197305&r1=1197304&r2=1197305&view=diff == --- tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java (original) +++ tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelSenderConnections.java Thu Nov 3 20:54:52 2011 @@ -20,6 +20,9 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.Random; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.Assert.fail; import org.junit.After; import org.junit.Before; @@ -51,6 +54,7 @@ public class TestGroupChannelSenderConne } public void sendMessages(long delay, long sleep) throws Exception { +resetMessageCounters(); Member local = channels[0].getLocalMember(true); Member dest = channels[1].getLocalMember(true); int n = 3; @@ -59,14 +63,24 @@ public class TestGroupChannelSenderConne + " ms between them."); for (int i = 0; i < n; i++) { channels[0].send(new Member[] { dest }, new TestMsg(), 0); -if (delay > 0) { +boolean last = (i == n - 1); +if (!last && delay > 0) { Thread.sleep(delay); } } -log.info("Messages sent. Sleeping for " + (sleep / 1000) -+ " seconds to inspect connections"); -if (sleep > 0) { -Thread.sleep(sleep); +log.info("Messages sent. Waiting no more than " + (sleep / 1000) ++ " seconds for them to be received"); +long startTime = System.currentTimeMillis(); +int countReceived; +while ((countReceived = getReceivedMessageCount()) != n) { +long time = System.currentTimeMillis(); +if ((time - startTime) > sleep) { +fail("Only " + countReceived + " out of " + n ++ " messages have been received in " + (sleep / 1000) ++ " seconds"); +break; +} +Thread.sleep(100); } } @@ -107,6 +121,20 @@ public class TestGroupChannelSenderConne } } +private void resetMessageCounters() { +for (TestMsgListener listener: listeners) { +listener.reset(); +} +} + +private int getReceivedMessageCount() { +int count = 0; +for (TestMsgListener listener: listeners) { +count += listener.getReceivedCount(); +} +return count; +} + // Test message. The message size is random. public static class TestMsg implements Serializable { private static final long serialVersionUID = 1L; @@ -124,13 +152,23 @@ public class TestGroupChannelSenderConne } public class TestMsgListener implements ChannelListener { -public final String name; +private final String name; +private final AtomicInteger counter = new AtomicInteger(); public TestMsgListener(String name) { this.name = name; } +public void reset() { +counter.set(0); +} + +public int getReceivedCount() { +return counter.get(); +} + @Override public void messageReceived(Serializable msg, Member sender) { +counter.incrementAndGet(); log.info("["+name+"] Received message:"+msg+" from " + sender.getName()); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/2457 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1197300 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1197310 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/RequestFilterValve.java
Author: markt Date: Thu Nov 3 21:10:04 2011 New Revision: 1197310 URL: http://svn.apache.org/viewvc?rev=1197310&view=rev Log: Ensure that subsequent attempts to start the Valves will not succeed until valid configuration is provided. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RequestFilterValve.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Nov 3 21:10:04 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197299 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,11
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/2458 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1197305 Blamelist: kkolinko Build succeeded! sincerely, -The Buildbot
Re: svn commit: r1197310 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/valves/RequestFilterValve.java
2011/11/4 : > Author: markt > Date: Thu Nov 3 21:10:04 2011 > New Revision: 1197310 > > URL: http://svn.apache.org/viewvc?rev=1197310&view=rev > Log: > Ensure that subsequent attempts to start the Valves will not succeed until > valid configuration is provided. > > Modified: > tomcat/tc7.0.x/trunk/ (props changed) > > tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RequestFilterValve.java > > Modified: > tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RequestFilterValve.java > URL: > http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RequestFilterValve.java?rev=1197310&r1=1197309&r2=1197310&view=diff > == > --- > tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RequestFilterValve.java > (original) > +++ > tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/RequestFilterValve.java > Thu Nov 3 21:10:04 2011 > @@ -83,6 +83,14 @@ public abstract class RequestFilterValve > */ > protected volatile Pattern allow = null; > > + > + /** > + * The current allow configuration value that may or may not compile > into a > + * valid {@link Pattern}. > + */ > + protected volatile String allowValue = null; > + > + > /** > * Helper variable to catch configuration errors. > * It is true by default, but becomes false > @@ -97,6 +105,14 @@ public abstract class RequestFilterValve > */ > protected volatile Pattern deny = null; > > + > + /** > + * The current deny configuration value that may or may not compile into > a > + * valid {@link Pattern}. > + */ > + protected volatile String denyValue = null; > + > + > /** > * Helper variable to catch configuration errors. > * It is true by default, but becomes false > @@ -114,12 +130,7 @@ public abstract class RequestFilterValve > * Valve, if any; otherwise, return null. > */ > public String getAllow() { > - // Use local copies for thread safety > - Pattern allow = this.allow; > - if (allow == null) { > - return null; > - } > - return allow.toString(); > + return allowValue; > } > > > @@ -132,10 +143,12 @@ public abstract class RequestFilterValve > public void setAllow(String allow) { > if (allow == null || allow.length() == 0) { > this.allow = null; > + allowValue = null; > allowValid = true; > } else { > boolean success = false; > try { > + allowValue = allow; > this.allow = Pattern.compile(allow); > success = true; > } finally { > @@ -150,12 +163,7 @@ public abstract class RequestFilterValve > * Valve, if any; otherwise, return null. > */ > public String getDeny() { > - // Use local copies for thread safety > - Pattern deny = this.deny; > - if (deny == null) { > - return null; > - } > - return deny.toString(); > + return denyValue; > } > > > @@ -168,10 +176,12 @@ public abstract class RequestFilterValve > public void setDeny(String deny) { > if (deny == null || deny.length() == 0) { > this.deny = null; > + denyValue = null; > denyValid = true; > } else { > boolean success = false; > try { > + denyValue = deny; > this.deny = Pattern.compile(deny); > success = true; > } finally { > @@ -225,6 +235,16 @@ public abstract class RequestFilterValve > } > > > + @Override > + protected synchronized void startInternal() throws LifecycleException { > + if (!allowValid || !denyValid) { > + throw new LifecycleException( > + sm.getString("requestFilterValve.configInvalid")); > + } > + super.startInternal(); > + } > + > + > /** > * Perform the filtering that has been configured for this Valve, matching > * against the specified request property. Good. The 5.5 and 6.0 patches should have this feature already, because they do not have separate init method and do it in start() instead. The only difference is that you assign the string values before calling Pattern.compile(), while in 5.5/6.0 I do assignment only if compilation is successful. I think that this your assignment behaviour is better and I could update the 5.5/6.0 patches to align with it. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51872] request.getRemoteAddr() sometimes returning IP address from the previous request
https://issues.apache.org/bugzilla/show_bug.cgi?id=51872 Bart Hanlon changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #13 from Bart Hanlon 2011-11-03 22:38:12 UTC --- We are seeing the same issue when Tomcat 7.0.22 is under heavier load (in our case servicing >30 incoming POST requests per second). request.getRemoteAddr() is periodically (though not consistently) returning an IP address from the previous request. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51872] request.getRemoteAddr() sometimes returning IP address from the previous request
https://issues.apache.org/bugzilla/show_bug.cgi?id=51872 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Comment #14 from Mark Thomas 2011-11-03 22:41:37 UTC --- This issue has been fixed. There are multiple possible causes of the symptom described here and the vast majority of them are application bugs. Please follow-up on the users-mailing list. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197339 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Author: markt Date: Thu Nov 3 22:50:50 2011 New Revision: 1197339 URL: http://svn.apache.org/viewvc?rev=1197339&view=rev Log: Check cast is safe Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1197339&r1=1197338&r2=1197339&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Thu Nov 3 22:50:50 2011 @@ -660,7 +660,8 @@ public class ContextConfig String pathName = cn.getBaseName(); boolean unpackWARs = true; -if (host instanceof StandardHost) { +if (host instanceof StandardHost && +context instanceof StandardContext) { unpackWARs = ((StandardHost) host).isUnpackWARs() && ((StandardContext) context).getUnpackWAR() && (docBase.startsWith(host.getAppBaseFile().getPath())); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197340 - /tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
Author: markt Date: Thu Nov 3 22:51:30 2011 New Revision: 1197340 URL: http://svn.apache.org/viewvc?rev=1197340&view=rev Log: Use Container interface rather than an implementation of it. Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1197340&r1=1197339&r2=1197340&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Thu Nov 3 22:51:30 2011 @@ -51,7 +51,6 @@ import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleListener; -import org.apache.catalina.core.ContainerBase; import org.apache.catalina.core.StandardHost; import org.apache.catalina.util.ContextName; import org.apache.catalina.util.IOTools; @@ -1153,8 +1152,7 @@ public class HostConfig // Undeploy application if (log.isInfoEnabled()) log.info(sm.getString("hostConfig.undeploy", app.name)); -ContainerBase context = -(ContainerBase) host.findChild(app.name); +Container context = host.findChild(app.name); try { host.removeChild(context); } catch (Throwable t) { @@ -1204,8 +1202,7 @@ public class HostConfig // Undeploy application if (log.isInfoEnabled()) log.info(sm.getString("hostConfig.undeploy", app.name)); -ContainerBase context = -(ContainerBase) host.findChild(app.name); +Container context = host.findChild(app.name); try { host.removeChild(context); } catch (Throwable t) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197341 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/ContextConfig.java java/org/apache/catalina/startup/HostConfig.java
Author: markt Date: Thu Nov 3 22:53:18 2011 New Revision: 1197341 URL: http://svn.apache.org/viewvc?rev=1197341&view=rev Log: Casting clean-up Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Nov 3 22:53:18 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197299-1197300 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 755,1187775,1187827,1188301,1188303-1188305,
Re: Redeploy on context.xml changes (Was: Tagging 7.0.23)
On 03/11/2011 17:08, Mark Thomas wrote: > I'm still looking at: > - recovery after fixing the broken file > - not deploying an expanded dir if the context.xml in > conf/Catalina/localhost is broken. OK. Here is a patch for review. There are so many combinations deployment and ways to create a dodgy configuration that I have probably missed a couple of edge cases. The main idea with this patch is that a Context always gets added even if deployment fails. That allows fixes via JMX and prevents WAR/directory deployment after a failed descriptor deployment. If the context.xml can't be read, a new FailedContext object is used. This allows redeploy resources to be tracked but the Context cannot be started. A number of clean-up issues I spotted along the way have already been fixed. http://people.apache.org/~markt/patches/2011-11-03-redeploy-trunk-v2.patch Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197343 [1/3] - in /tomcat/trunk/test/org/apache/coyote/http11/filters: TesterFlushableGZIPOutputStream.java bug52121-part1 bug52121-part2
Author: markt Date: Thu Nov 3 23:05:46 2011 New Revision: 1197343 URL: http://svn.apache.org/viewvc?rev=1197343&view=rev Log: Test case for bug 52121 Added: tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java tomcat/trunk/test/org/apache/coyote/http11/filters/bug52121-part1 tomcat/trunk/test/org/apache/coyote/http11/filters/bug52121-part2 Added: tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java?rev=1197343&view=auto == --- tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java (added) +++ tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java Thu Nov 3 23:05:46 2011 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.coyote.http11.filters; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.zip.GZIPInputStream; + +import org.junit.Test; + +import org.apache.catalina.util.IOTools; + +/** + * Reproduces what current appears to be a JVM bug. Note: This test case is not + * part of the Standard test suite that is execute by ant test. + */ +public class TesterFlushableGZIPOutputStream { + +@Test +public void testBug52121() throws Exception { + +ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream(); +ByteArrayOutputStream sink = new ByteArrayOutputStream(); + +OutputStream output = new FlushableGZIPOutputStream(byteOutStream); + +ClassLoader cl = Thread.currentThread().getContextClassLoader(); + +InputStream input = cl.getResourceAsStream( +"org/apache/coyote/http11/filters/bug52121-part1"); +IOTools.flow(input, output); +input.close(); +output.flush(); + +input = cl.getResourceAsStream( +"org/apache/coyote/http11/filters/bug52121-part2"); +IOTools.flow(input, output); +input.close(); +output.flush(); + +output.close(); + +ByteArrayInputStream byteInStream = +new ByteArrayInputStream(byteOutStream.toByteArray()); + +GZIPInputStream inflaterStream = new GZIPInputStream(byteInStream); +IOTools.flow(inflaterStream, sink); +} +} - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52121] corrupt gzip output when compression=on in server.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=52121 --- Comment #2 from Mark Thomas 2011-11-03 23:14:00 UTC --- Many thanks for the excellent test case. It looks like it was very difficult to track down. We really do appreciate your efforts on this. I have converted the stand-alone reproduction JAR to a Tomcat test case. It isn't yet in the standard test suite as it currently always fails. I noticed that the following is sufficient to reproduce the issue: - send parts 19 to 28, flush, 29, flush, close I have therefore merged parts 19 to 28 for the test case. The failure is a CRC error. At this point this looks like a JVM bug. We don't normally address JVM bugs in the Tomcat codebase but if we can figure out exactly what causes this bug (it seems to be related to a very precise state) then we might be able to detect the state and prevent the flush that triggers the bug. Failing that, it should be possible to make use of the flushable GZIP filter configurable. As a workaround, you may be able to add an explicit flush() to the page(s) where this occurs. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52121] corrupt gzip output when compression=on in server.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=52121 --- Comment #3 from Konstantin Kolinko 2011-11-03 23:53:23 UTC --- Note that you can run the test by adding the following line to the build.properties file: test.entry=org.apache.coyote.http11.filters.TesterFlushableGZIPOutputStream Just for reference: If I run the test through Ant it fails in an odd way: [[[ Testsuite: org.apache.coyote.http11.filters.TesterFlushableGZIPOutputStream Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0,031 sec Testcase: testBug52121 took 0,016 sec Caused an ERROR null java.lang.NullPointerException at org.apache.catalina.util.IOTools.flow(IOTools.java:74) at org.apache.catalina.util.IOTools.flow(IOTools.java:85) at org.apache.coyote.http11.filters.TesterFlushableGZIPOutputStream.testBug52121(TesterFlushableGZIPOutputStream.java:47) ]]] I cannot explain this NPE. If I run it as JUnit test from with Eclipse IDE I get the IO error: [[[ java.io.IOException: Corrupt GZIP trailer at java.util.zip.GZIPInputStream.readTrailer(GZIPInputStream.java:203) at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:94) at java.io.FilterInputStream.read(FilterInputStream.java:90) at org.apache.catalina.util.IOTools.flow(IOTools.java:74) at org.apache.catalina.util.IOTools.flow(IOTools.java:85) at org.apache.coyote.http11.filters.TesterFlushableGZIPOutputStream.testBug52121(TesterFlushableGZIPOutputStream.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) ]]] The sources are trunk@1197344, both were run with jdk 6u29 (build 1.6.0_29-b11) on Windows XP 32-bit. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197382 - /tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java
Author: kkolinko Date: Fri Nov 4 01:29:44 2011 New Revision: 1197382 URL: http://svn.apache.org/viewvc?rev=1197382&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52121 FlushableGZIPOutputStream produces corrupted output on some input sequences The fix is to do not restore compression level right before the end of the stream. Restore it only before writing the next portion of data. Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java?rev=1197382&r1=1197381&r2=1197382&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/filters/FlushableGZIPOutputStream.java Fri Nov 4 01:29:44 2011 @@ -37,28 +37,39 @@ public class FlushableGZIPOutputStream e private static final byte[] EMPTYBYTEARRAY = new byte[0]; private boolean hasData = false; +private boolean needReenableCompression = false; /** * Here we make sure we have received data, so that the header has been for * sure written to the output stream already. */ @Override -public synchronized void write(byte[] bytes, int i, int i1) +public synchronized void write(byte[] bytes, int offset, int length) throws IOException { -super.write(bytes, i, i1); -hasData = true; +if (length > 0) { +prepareForOutput(); +super.write(bytes, offset, length); +} } @Override public synchronized void write(int i) throws IOException { +prepareForOutput(); super.write(i); -hasData = true; } @Override public synchronized void write(byte[] bytes) throws IOException { -super.write(bytes); +write(bytes, 0, bytes.length); +} + +private void prepareForOutput() throws IOException { hasData = true; +if (needReenableCompression) { +def.setLevel(Deflater.DEFAULT_COMPRESSION); +deflate(); +needReenableCompression = false; +} } @Override @@ -80,8 +91,8 @@ public class FlushableGZIPOutputStream e def.setLevel(Deflater.NO_COMPRESSION); deflate(); -def.setLevel(Deflater.DEFAULT_COMPRESSION); -deflate(); +// Cannot reenable compression now. Must wait for data. +needReenableCompression = true; out.flush(); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52121] corrupt gzip output when compression=on in server.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=52121 --- Comment #4 from Konstantin Kolinko 2011-11-04 01:35:22 UTC --- I think I fixed it with r1197382. Regarding the NPE when testing with Ant: it is a fault in the test case. The resources are not copied when compiling the test classes. Thus classloader.getResourceAsStream() does not find the resource and returns null. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1197386 - /tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java
Author: kkolinko Date: Fri Nov 4 01:44:15 2011 New Revision: 1197386 URL: http://svn.apache.org/viewvc?rev=1197386&view=rev Log: Fixed a bug in the test case: it could not find the resources because they are not copied when tests are compiled. Use a file stream, reading the resource from the sources like we do it with test webapps (webapp-2.3, webapp-2.4 etc.) Modified: tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java Modified: tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java?rev=1197386&r1=1197385&r2=1197386&view=diff == --- tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java (original) +++ tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java Fri Nov 4 01:44:15 2011 @@ -18,6 +18,8 @@ package org.apache.coyote.http11.filters import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; import java.io.InputStream; import java.io.OutputStream; import java.util.zip.GZIPInputStream; @@ -40,18 +42,23 @@ public class TesterFlushableGZIPOutputSt OutputStream output = new FlushableGZIPOutputStream(byteOutStream); -ClassLoader cl = Thread.currentThread().getContextClassLoader(); +File sourcesDir = new File("test/org/apache/coyote/http11/filters/"); +InputStream input; -InputStream input = cl.getResourceAsStream( -"org/apache/coyote/http11/filters/bug52121-part1"); -IOTools.flow(input, output); -input.close(); +input = new FileInputStream(new File(sourcesDir, "bug52121-part1")); +try { +IOTools.flow(input, output); +} finally { +input.close(); +} output.flush(); -input = cl.getResourceAsStream( -"org/apache/coyote/http11/filters/bug52121-part2"); -IOTools.flow(input, output); -input.close(); +input = new FileInputStream(new File(sourcesDir, "bug52121-part2")); +try { +IOTools.flow(input, output); +} finally { +input.close(); +} output.flush(); output.close(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-105) creating executable war failed
[ https://issues.apache.org/jira/browse/MTOMCAT-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143678#comment-13143678 ] albert kam commented on MTOMCAT-105: Thanks for the fast response ! I added that in the plugin configuration, still the same FNFE. And then i tried experimenting the 'useNaming', setting both of the config to true and false, but still the same FNFE. Just a wild guess from googling around if this has something to do with the classloader classpath where it couldnt see the content of the war that has the WEB-INF/faces-config.xml ? > creating executable war failed > -- > > Key: MTOMCAT-105 > URL: https://issues.apache.org/jira/browse/MTOMCAT-105 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 > Environment: C:\Users\albert\workspace\BasicSetup>mvn --version > Apache Maven 3.0.3 (r1075438; 2011-03-01 00:31:09+0700) > Maven home: C:\Users\albert\Desktop\myapps\apache-maven-3.0.3\bin\.. > Java version: 1.7.0, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "x86", family: "windows" >Reporter: albert kam >Assignee: Olivier Lamy >Priority: Critical > Labels: exec-war > Fix For: 2.0 > > Attachments: BasicSetup.zip > > Original Estimate: 0.05h > Remaining Estimate: 0.05h > > Just today on November 3rd, i tried out the tomcat7 maven plugin to try out > the executable war. > Following the configuration from the > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/executable-war-jar.html, > here's the output of my tomcat7:exec-war-only -X : > ... lot of lines removed ... > org.codehaus.plexus:plexus-archiver:jar:2.0.1:compile, > junit:junit:jar:4.9:compile, org.hamcrest:hamcrest-core:jar:1.1:compile, > org.codehaus.plexus:plexus-io:jar:2.0.1:compile] > [DEBUG] (f) project = MavenProject: > kam.albert.study:BasicSetup:0.0.1-SNAPSHOT @ > C:\Users\albert\workspace\BasicSetup\pom.xml > [DEBUG] (f) projectArtifact = kam.albert.study:BasicSetup:war:0.0.1-SNAPSHOT > [DEBUG] (f) remoteRepos = [ id: jvnet-nexus-releases > url: https://maven.java.net/content/repositories/releases/ >layout: default > snapshots: [enabled => true, update => daily] > releases: [enabled => true, update => daily] > ,id: central > url: http://repo1.maven.org/maven2 >layout: default > snapshots: [enabled => false, update => daily] > releases: [enabled => true, update => daily] > ] > [DEBUG] (f) serverXml = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf\server.xml > [DEBUG] (f) tomcatConfigurationFilesDirectory = > C:\Users\albert\workspace\BasicSetup\src\main\tomcatconf > [DEBUG] -- end configuration -- > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 0.827s > [INFO] Finished at: Thu Nov 03 13:06:40 ICT 2011 > [INFO] Final Memory: 6M/15M > [INFO] > > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > (default-cli) on project BasicSetup: Execution default-cli of goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only > failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) >
svn commit: r1197387 - in /tomcat/trunk/test/org/apache/coyote/http11/filters: TestFlushableGZIPOutputStream.java TesterFlushableGZIPOutputStream.java bug52121-part1 bug52121-part2
Author: kkolinko Date: Fri Nov 4 01:52:34 2011 New Revision: 1197387 URL: http://svn.apache.org/viewvc?rev=1197387&view=rev Log: Explicitly mark the two test data files as binary, as a reminder that they should not be treated as mere text. Rename the test class so that it is included into test suite runs. Added: tomcat/trunk/test/org/apache/coyote/http11/filters/TestFlushableGZIPOutputStream.java - copied, changed from r1197386, tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java Removed: tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java Modified: tomcat/trunk/test/org/apache/coyote/http11/filters/bug52121-part1 (props changed) tomcat/trunk/test/org/apache/coyote/http11/filters/bug52121-part2 (props changed) Copied: tomcat/trunk/test/org/apache/coyote/http11/filters/TestFlushableGZIPOutputStream.java (from r1197386, tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/filters/TestFlushableGZIPOutputStream.java?p2=tomcat/trunk/test/org/apache/coyote/http11/filters/TestFlushableGZIPOutputStream.java&p1=tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java&r1=1197386&r2=1197387&rev=1197387&view=diff == --- tomcat/trunk/test/org/apache/coyote/http11/filters/TesterFlushableGZIPOutputStream.java (original) +++ tomcat/trunk/test/org/apache/coyote/http11/filters/TestFlushableGZIPOutputStream.java Fri Nov 4 01:52:34 2011 @@ -32,7 +32,7 @@ import org.apache.catalina.util.IOTools; * Reproduces what current appears to be a JVM bug. Note: This test case is not * part of the Standard test suite that is execute by ant test. */ -public class TesterFlushableGZIPOutputStream { +public class TestFlushableGZIPOutputStream { @Test public void testBug52121() throws Exception { Propchange: tomcat/trunk/test/org/apache/coyote/http11/filters/bug52121-part1 -- svn:mime-type = application/octet-stream Propchange: tomcat/trunk/test/org/apache/coyote/http11/filters/bug52121-part2 -- svn:mime-type = application/octet-stream - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org