[ 
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(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:601)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
> default-cli of goal 
> org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:exec-war-only 
> failed.
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>       ... 19 more
> Caused by: java.lang.NullPointerException
>       at java.io.FileInputStream.<init>(FileInputStream.java:134)
>       at 
> org.apache.tomcat.maven.plugin.tomcat7.run.AbstractExecWarMojo.execute(AbstractExecWarMojo.java:287)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>       ... 20 more
> [ERROR] 
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
> The full message can be found at http://pastebin.com/yreULuvY
> And my pom :
> <plugin>
> <groupId>org.apache.tomcat.maven</groupId>
> <artifactId>tomcat7-maven-plugin</artifactId>
> <version>2.0-SNAPSHOT</version>
> <executions>
>   <execution>
>       <id>tomcat7-run</id>
>       <goals>
>         <goal>exec-war-only</goal>
>       </goals>
>       <phase>package</phase>
>       <configuration>
>         <path>/</path>
>         
> <tomcatConfigurationFilesDirectory>src/main/webapp/WEB-INF</tomcatConfigurationFilesDirectory>
>       </configuration>
>   </execution>
> </executions>
> </plugin>
> The full pom can be found at : http://pastebin.com/6y2nPVBK
> From my test, the package phase doesnt seem to trigger the exec-war-only goal 
> in my "mvn package" execution.
> And in my "mvn tomcat7:exec-war-only", it doesnt seem to read my 
> tomcatConfigurationFilesDirectory property.
> Perhaps im missing something ?
> Thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to