java.io.FileNotFoundException: URL [rsrc:tests/] cannot be resolved to absolute file path because it does not reside in the file system: rsrc:tests/

Spring JIRA | Miguel Goncalves | 4 years ago
  1. 0

    Project work's in Eclipse, but don't work in command line. Stack trace: Jun 23, 2012 1:49:00 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@670655dd: startup date [Sat Jun 23 13:49:00 WEST 2012]; root of context hierarchy Jun 23, 2012 1:49:00 PM org.springframework.core.io.support.PathMatchingResourcePatternResolver doFindPathMatchingFileResources WARNING: Cannot search for matching files underneath URL [rsrc:tests/] because it does not correspond to a directory in the file system java.io.FileNotFoundException: URL [rsrc:tests/] cannot be resolved to absolute file path because it does not reside in the file system: rsrc:tests/ at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:205) at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52) at org.springframework.core.io.UrlResource.getFile(UrlResource.java:169) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:526) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:347) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:266) at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1245) at org.springframework.context.support.GenericApplicationContext.getResources(GenericApplicationContext.java:226) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:228) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242) at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:124) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:214) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:149) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:135) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:260) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:203) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:617) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446) at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:73) at tests.controller.MainCtrl.main(MainCtrl.java:20) 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:616) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Jun 23, 2012 1:49:00 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1d2940b3: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,springConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy Exception in thread "main" java.lang.reflect.InvocationTargetException 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:616) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [tests.controller.MainCtrl] is defined: expected single bean but found 0: at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:271) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1101) at tests.controller.MainCtrl.main(MainCtrl.java:23) ... 5 more

    Spring JIRA | 4 years ago | Miguel Goncalves
    java.io.FileNotFoundException: URL [rsrc:tests/] cannot be resolved to absolute file path because it does not reside in the file system: rsrc:tests/
  2. 0

    Project work's in Eclipse, but don't work in command line. Stack trace: Jun 23, 2012 1:49:00 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@670655dd: startup date [Sat Jun 23 13:49:00 WEST 2012]; root of context hierarchy Jun 23, 2012 1:49:00 PM org.springframework.core.io.support.PathMatchingResourcePatternResolver doFindPathMatchingFileResources WARNING: Cannot search for matching files underneath URL [rsrc:tests/] because it does not correspond to a directory in the file system java.io.FileNotFoundException: URL [rsrc:tests/] cannot be resolved to absolute file path because it does not reside in the file system: rsrc:tests/ at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:205) at org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52) at org.springframework.core.io.UrlResource.getFile(UrlResource.java:169) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:526) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:347) at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:266) at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1245) at org.springframework.context.support.GenericApplicationContext.getResources(GenericApplicationContext.java:226) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:228) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242) at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:124) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:214) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:149) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:135) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:260) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:203) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:617) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446) at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:73) at tests.controller.MainCtrl.main(MainCtrl.java:20) 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:616) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Jun 23, 2012 1:49:00 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1d2940b3: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,springConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy Exception in thread "main" java.lang.reflect.InvocationTargetException 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:616) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [tests.controller.MainCtrl] is defined: expected single bean but found 0: at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:271) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1101) at tests.controller.MainCtrl.main(MainCtrl.java:23) ... 5 more

    Spring JIRA | 4 years ago | Miguel Goncalves
    java.io.FileNotFoundException: URL [rsrc:tests/] cannot be resolved to absolute file path because it does not reside in the file system: rsrc:tests/
  3. 0

    How to load Spring context xml from a jar file

    Stack Overflow | 4 years ago | Ye Huang
    java.io.FileNotFoundException: class path resource [webapps/my_app/WEB-INF/lib/path_inside_the_external_jar/] cannot be resolved to URL because it does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Autoscan fails when /es default dir is not in classpath (warn in logs)

    GitHub | 5 years ago | dadoonet
    java.io.FileNotFoundException: class path resource [esdoesnotexist/] cannot be resolved to URL because it does not exist
  6. 0

    Retrieve Resources[] by PathMatchingResourcePatternResolver

    Stack Overflow | 2 years ago | akfaz
    java.io.FileNotFoundException: class path resource [input/] cannot be resolved to URL because it does not exist

  1. Mark 3 times, last 5 months ago
  2. eilonreshef 1 times, last 9 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    URL [rsrc:tests/] cannot be resolved to absolute file path because it does not reside in the file system: rsrc:tests/

    at org.springframework.util.ResourceUtils.getFile()
  2. Spring Core
    PathMatchingResourcePatternResolver.getResources
    1. org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:205)
    2. org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52)
    3. org.springframework.core.io.UrlResource.getFile(UrlResource.java:169)
    4. org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:526)
    5. org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:347)
    6. org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:266)
    6 frames
  3. Spring Context
    AnnotationConfigApplicationContext.<init>
    1. org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1245)
    2. org.springframework.context.support.GenericApplicationContext.getResources(GenericApplicationContext.java:226)
    3. org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:228)
    4. org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
    5. org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:124)
    6. org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:214)
    7. org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:149)
    8. org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:135)
    9. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:260)
    10. org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:203)
    11. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:617)
    12. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446)
    13. org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:73)
    13 frames
  4. tests.controller
    MainCtrl.main
    1. tests.controller.MainCtrl.main(MainCtrl.java:20)
    1 frame
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:616)
    4 frames
  6. org.eclipse.jdt
    JarRsrcLoader.main
    1. org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
    1 frame