Cryptic jetty-maven-plugin error message 'ERROR: PWC6117: File "null" not found'

17,066

Solution 1

Make sure your ModelAndView-s are mapped properly in your controller:

return new ModelAndView("WEB-INF/jsps/main");

Solution 2

In my case, above solution @tftd provided did not work so I commented out defaultHandler property, then error log disappeared.

<bean id="classNameControllerMappings"
      class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping">
    <property name="caseSensitive" value="true" />
    <property name="order" value="2" />
    <!--property name="defaultHandler">
        <bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
    </property-->
</bean>
Share:
17,066
carlspring
Author by

carlspring

I am a Senior Build, Release and Deployment Engineering contractor (with some seven years in the field). I am also a Senior Java Developer (with well over ten years behind me). I am into source control management, tooling, continuous integration, research and development and other odd things most developers wouldn't want to get into. :) I am active in the Open Source community, by hosting several of my own projects, as well as discussing or contributing fixes for various OSS projects. I believe in OSS and that contributing to the online society via either free tools or advice on various problems will not only strengthen one's own knowledge, but also help others advance as well.

Updated on June 05, 2022

Comments

  • carlspring
    carlspring about 2 years

    I have a Maven Webapp producing a WAR file. I've just upgraded my Jetty plugin to the 7.4.2.v20110526 (from 6.x). I have the following set up:

            <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>
    

    For some unclear to me reason, I keep getting the cryptic error message below:

    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
    

    There is no exception, however I cannot log in to the webapp.

    However, if I grab the produced war file and deploy it into a clean Jetty installation, it works perfectly. What's the deal here...? I mean, this used to work with the 6.x plugin. No code changes whatsoever.

    The contents of the exploded directory are exactly the same as the ones in the war file - I checked -- there are no missing files or any obvious differences.

    This is a Spring Web project.

    Any ideas? Has anybody seen this before?

    Many thanks in advance!

  • tftd
    tftd over 11 years
    That should be in your controller.