我有一个产生WAR文件的Maven Webapp。 我刚刚将我的Jetty插件升级到7.4.2.v20110526(从6.x开始)。我有以下设置:Cryptic jetty-maven-plugin错误信息'ERROR:PWC6117:File“null”not found'
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.4.2.v20110526</version>
<executions>
<execution>
<id>jetty-run</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<connectors>
<connector implementation="${connector}">
<port>80</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<webAppConfig>
<contextPath>/foo</contextPath>
</webAppConfig>
<webappDirectory>${project.build.directory}/foo</webappDirectory>
<scanIntervalSeconds>10</scanIntervalSeconds>
<systemProperties>
<systemProperty>
<name>logback.configurationFile</name>
<value>file:${basedir}/target/${project.artifactId}-${project.version}/WEB-INF/classes/logback.xml</value>
</systemProperty>
</systemProperties>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.13</version>
</dependency>
</dependencies>
</plugin>
对于一些不清楚我的理由,我不断收到下面的神秘的错误消息:
2011-07-07 11:51:16.431:WARN::Aliased resource: file:/java/foo/branches/stable/modules/foo-web/src/main/webapp/WEB-INF/jsps/main.jsp~=file:/java/foo/branches/stable/modules/foo-web/src/main/webapp/WEB-INF/jsps/main.jsp
2011-07-07 11:51:16.507:WARN::Aliased resource: file:/java/foo/branches/stable/modules/foo-web/src/main/webapp/WEB-INF/jsps/main.jsp~=file:/java/foo/branches/stable/modules/foo-web/src/main/webapp/WEB-INF/jsps/main.jsp
ERROR: PWC6117: File "null" not found
没有例外,但是我不能登录到Web应用程序。
但是,如果我抓住生成的war文件并将其部署到一个干净的Jetty安装中,它就可以很好地工作。这里有什么交易......?我的意思是,这用于与6.x插件一起使用。没有任何代码改变。
爆炸目录的内容与war文件中的内容完全相同 - 我检查过 - 没有缺失文件或任何明显的差异。
这是一个Spring Web项目。
任何想法?有没有人看过这个?
非常感谢提前!
谢谢!这解决了它。 – carlspring
你把它放在哪里? –
这应该在你的控制器中。 – tftd