PathMatchingResourcePatternResolver Cannot search for matching files underneath URL because it does not correspond to a directory in the file system

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

PathMatchingResourcePatternResolver Cannot search for matching files underneath URL because it does not correspond to a directory in the file system

demecarv
This post has NOT been accepted by the mailing list yet.
Hi everybody. This is my first time in this malling list.
I had a previous application without maven running correctly without any Wannings. Then, in Spring Tool Suite, I conveted it to Maven project and settled every dependency. The project is running correctly from user perspective but I am seeing some Warnings and a error when debuging it. I am not sure if it is related to Maven but it suddenly appeared after converted to Maven.

The error log:

[11/26/14 14:25:36:169 CST] 0000002b springframework.web.context.support.XmlWebApplicationContext I Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Wed Nov 26 14:25:36 CST 2014]; parent: Root WebApplicationContext
[11/26/14 14:25:36:169 CST] 0000002b rg.springframework.beans.factory.xml.XmlBeanDefinitionReader I Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml]
[11/26/14 14:25:37:060 CST] 0000002b ramework.core.io.support.PathMatchingResourcePatternResolver W Cannot search for matching files underneath URL [bundleresource://96.fwk1553324600/] because it does not correspond to a directory in the file system
java.io.FileNotFoundException: URL [bundleresource://96.fwk1553324600/] cannot be resolved to absolute file path because it does not reside in the file system: bundleresource://96.fwk1553324600/
        at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:212)
        at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52)
        at org.springframework.core.io.UrlResource.getFile(UrlResource.java:212)
        at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources

The Warnings:

[AUDIT   ] CWWKZ0001I: Application MHE_original started in 2.565 seconds.

[WARNING ] Cannot search for matching files underneath URL [bundleresource://100.fwk4347180/] because it does not correspond to a directory in the file system

URL [bundleresource://100.fwk4347180/] cannot be resolved to absolute file path because it does not reside in the file system: bundleresource://100.fwk4347180/

[WARNING ] Cannot search for matching files underneath URL [bundleresource://99.fwk4347180/] because it does not correspond to a directory in the file system

URL [bundleresource://99.fwk4347180/] cannot be resolved to absolute file path because it does not reside in the file system: bundleresource://99.fwk4347180/

[WARNING ] Skipping [C:\STS\ws\MHE_original\WebContent\WEB-INF\lib\db2java.jar] because it does not denote a directory

[WARNING ] Skipping [C:\STS\ws\MHE_original\WebContent\WEB-INF\lib\jeapCore-03.02.1.2.jar] because it does not denote a directory

[WARNING ] Skipping [C:\STS\ws\MHE_original\WebContent\WEB-INF\lib\upload.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\apache\httpcomponents\httpclient\4.1.1\httpclient-4.1.1.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\apache\httpcomponents\httpcore\4.1\httpcore-4.1.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.12\jackson-mapper-asl-1.9.12.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.12\jackson-core-asl-1.9.12.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-core\3.0.5.RELEASE\spring-core-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-asm\3.0.5.RELEASE\spring-asm-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-web\3.0.5.RELEASE\spring-web-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-beans\3.0.5.RELEASE\spring-beans-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-webmvc\3.0.5.RELEASE\spring-webmvc-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-context-support\3.0.5.RELEASE\spring-context-support-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-expression\3.0.5.RELEASE\spring-expression-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-context\3.0.5.RELEASE\spring-context-3.0.5.RELEASE.jar] because it does not denote a directory

[WARNING ] Skipping [C:\Users\e049447\.m2\repository\org\springframework\spring-aop\3.0.5.RELEASE\spring-aop-3.0.5.RELEASE.jar] because it does not denote a directory

Pom.xml

<modelVersion>4.0.0</modelVersion>
  <groupId>MHE_original</groupId>
  <artifactId>MHE_original</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
       <name>MHE Maven Webapp</name>
       <url>http://maven.apache.org</url>
       <properties>
              <spring.version>4.1.2.RELEASE</spring.version>
              <java-version>1.6</java-version>
              <org.aspectj-version>1.7.4</org.aspectj-version>
              <org.slf4j-version>1.7.5</org.slf4j-version>
              <jackson.databind-version>2.2.3</jackson.databind-version>
       </properties>
      <dependencies>
              <dependency>
                     <groupId>org.apache.httpcomponents</groupId>
                     <artifactId>httpclient</artifactId>
                     <version>4.1.1</version>
              </dependency>
              <dependency>
                     <groupId>javax.servlet</groupId>
                     <artifactId>servlet-api</artifactId>
                     <version>2.5</version>
              </dependency>
              <dependency>
                  <groupId>org.codehaus.jackson</groupId>
                  <artifactId>jackson-mapper-asl</artifactId>
                  <version>1.9.12</version>
              </dependency>
              <dependency>
                     <groupId>org.springframework</groupId>
                     <artifactId>spring-core</artifactId>
                     <version>${spring.version}</version>
              </dependency>
              <dependency>
                     <groupId>org.springframework</groupId>
                     <artifactId>spring-web</artifactId>
                     <version>${spring.version}</version>
              </dependency>
              <dependency>
                     <groupId>org.springframework</groupId>
                     <artifactId>spring-webmvc</artifactId>
                     <version>${spring.version}</version>
              </dependency>
              <dependency>
                     <groupId>org.springframework</groupId>
                     <artifactId>spring-context</artifactId>
                     <version>${spring.version}</version>
              </dependency>
       </dependencies>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <warSourceDirectory>WebContent</warSourceDirectory>
        </configuration>
      </plugin>
    </plugins>
  </build>