Spring bean import with wildcard * does not work in JBoss EAP 6

Solution Verified - Updated -

Issue

  • Spring beans import from a descriptor loaded using a web context does not work with an exception.
  • We are trying to port a JEE 6 application from Oracle WebLogic 12c to JBoss EAP 6 but does not deploy.
  • When we try to run our application with beans:import with wildcard below, we got following Errors:
<beans:import resource="/test/*.xml" />
<beans:import resource="/test1/*.xml" />
21:07:25,099 WARN  [org.springframework.core.io.support.PathMatchingResourcePatternResolver] (ServerService Thread Pool -- 78) Cannot search for matching files underneath URL [jndi:/.../.../WEB-INF/.../.../] because it does not correspond to a directory in the file system: java.io.FileNotFoundException: URL [jndi:/.../.../WEB-INF/.../.../] cannot be resolved to absolute file path because it does not reside in the file system: jndi:/.../.../WEB-INF/.../.../
    at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:210) [spring-core-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52) [spring-core-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    at org.springframework.core.io.UrlResource.getFile(UrlResource.java:211) [spring-core-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:529) [spring-core-3.2.17.RELEASE.jar:3.2.17.RELEASE]

21:07:25,106 WARN  [org.springframework.core.io.support.PathMatchingResourcePatternResolver] (ServerService Thread Pool -- 78) Cannot search for matching files underneath URL [jndi:/.../.../WEB-INF/.../.../] because it does not correspond to a directory in the file system: java.io.FileNotFoundException: URL [jndi:/.../.../WEB-INF/.../.../] cannot be resolved to absolute file path because it does not reside in the file system: jndi:/.../.../WEB-INF/.../.../
    at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:210) [spring-core-3.2.17.RELEASE.jar:3.2.17.RELEASE]
    at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52) [spring-core-3.2.17.RELEASE.jar:3.2.17.RELEASE]

  • Is this a bug? without wildcard everything works fine.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.4.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content