java.io.FileNotFoundException: class path resource [com/mydomain/mypackage/MyClass.class] cannot be opened because it does not exist

SpringSource Issue Tracker | Ian Brandt | 2 years ago
  1. 0

    During a build I'll see about 50 of these for various different classes from different modules of my multi-module Maven project: {noformat} This is a continuation of log file /Users/ibrandt/Documents/workspace/.metadata/.bak_3.log Created Time: 2014-07-17 10:49:24.029 org.springframework.ide.eclipse.core Error Thu Jul 17 10:53:31 PDT 2014 Internal Error java.io.FileNotFoundException: class path resource [com/mydomain/mypackage/MyClass.class] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158) at org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:67) at org.springframework.ide.eclipse.core.type.asm.CachingClassReaderFactory.getClassReader(CachingClassReaderFactory.java:61) at org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:63) at org.springframework.ide.eclipse.core.java.classreading.JdtConnectedMetadataReader.<init>(JdtConnectedMetadataReader.java:42) at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:53) at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38) at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:73) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:274) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:87) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:752) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:745) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcessExternal(BeansConfig.java:679) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.readConfig(BeansConfig.java:537) at org.springframework.ide.eclipse.beans.core.internal.model.AbstractBeansConfig.getBeans(AbstractBeansConfig.java:280) at org.springframework.ide.eclipse.beans.core.internal.model.validation.BeansConfigReloadingProjectContributionEventListener.start(BeansConfigReloadingProjectContributionEventListener.java:110) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$1.execute(SpringProjectContributionManager.java:112) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$9.run(SpringProjectContributionManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.execute(SpringProjectContributionManager.java:294) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.build(SpringProjectContributionManager.java:110) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) {noformat} This started when I upgraded to STS 3.6.0.RELEASE. I did not see these in 3.5.1.RELEASE. The upgrade was a complete reinstall with a fresh workspace. This stack trace is similar to that in STS-3219. I verified that none of my spring enabled projects have the springbuilder before the javabuilder in the .project file. I'm noticing that with 3.6.1 a clean build involves many Spring Problems appearing in the Problems view. They eventually all go away by the time the build completes. Again this didn't happen in 3.5.1. It's almost as if the order in which things are being built is off. Perhaps this could relate to interim missing resources? Other than clogging up the Error Log view I'm not noticing any fallout from these errors.

    SpringSource Issue Tracker | 2 years ago | Ian Brandt
    java.io.FileNotFoundException: class path resource [com/mydomain/mypackage/MyClass.class] cannot be opened because it does not exist
  2. 0

    During a build I'll see about 50 of these for various different classes from different modules of my multi-module Maven project: {noformat} This is a continuation of log file /Users/ibrandt/Documents/workspace/.metadata/.bak_3.log Created Time: 2014-07-17 10:49:24.029 org.springframework.ide.eclipse.core Error Thu Jul 17 10:53:31 PDT 2014 Internal Error java.io.FileNotFoundException: class path resource [com/mydomain/mypackage/MyClass.class] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158) at org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:67) at org.springframework.ide.eclipse.core.type.asm.CachingClassReaderFactory.getClassReader(CachingClassReaderFactory.java:61) at org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:63) at org.springframework.ide.eclipse.core.java.classreading.JdtConnectedMetadataReader.<init>(JdtConnectedMetadataReader.java:42) at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:53) at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38) at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:73) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:274) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:87) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:752) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:745) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcessExternal(BeansConfig.java:679) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.readConfig(BeansConfig.java:537) at org.springframework.ide.eclipse.beans.core.internal.model.AbstractBeansConfig.getBeans(AbstractBeansConfig.java:280) at org.springframework.ide.eclipse.beans.core.internal.model.validation.BeansConfigReloadingProjectContributionEventListener.start(BeansConfigReloadingProjectContributionEventListener.java:110) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$1.execute(SpringProjectContributionManager.java:112) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$9.run(SpringProjectContributionManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.execute(SpringProjectContributionManager.java:294) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.build(SpringProjectContributionManager.java:110) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) {noformat} This started when I upgraded to STS 3.6.0.RELEASE. I did not see these in 3.5.1.RELEASE. The upgrade was a complete reinstall with a fresh workspace. This stack trace is similar to that in STS-3219. I verified that none of my spring enabled projects have the springbuilder before the javabuilder in the .project file. I'm noticing that with 3.6.1 a clean build involves many Spring Problems appearing in the Problems view. They eventually all go away by the time the build completes. Again this didn't happen in 3.5.1. It's almost as if the order in which things are being built is off. Perhaps this could relate to interim missing resources? Other than clogging up the Error Log view I'm not noticing any fallout from these errors.

    SpringSource Issue Tracker | 2 years ago | Ian Brandt
    java.io.FileNotFoundException: class path resource [com/mydomain/mypackage/MyClass.class] cannot be opened because it does not exist
  3. 0

    ContextConfiguration in SpringTest not loaded

    Stack Overflow | 3 years ago | Stefan Beike
    java.lang.IllegalStateException: Failed to load ApplicationContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IOException parsing XML document from class path resource - HTTP Status 500 - Servlet.init()

    Stack Overflow | 3 years ago | Matt McGrath
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring/file-watcher.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/file-watcher.xml] cannot be opened because it does not exist
  6. 0

    spring loading context files with maven project

    Stack Overflow | 5 years ago | kasim
    java.io.FileNotFoundException: class path resource [com/home/app/Home-ctx.xml] cannot be opened because it does not exist
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

    class path resource [com/mydomain/mypackage/MyClass.class] cannot be opened because it does not exist

    at org.springframework.core.io.ClassPathResource.getInputStream()
  2. Spring Core
    ClassPathResource.getInputStream
    1. org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
    1 frame
  3. org.springframework.ide
    CachingJdtMetadataReaderFactory.getMetadataReader
    1. org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:67)
    2. org.springframework.ide.eclipse.core.type.asm.CachingClassReaderFactory.getClassReader(CachingClassReaderFactory.java:61)
    3. org.springframework.ide.eclipse.core.type.asm.SimpleClassReaderFactory.getClassReader(SimpleClassReaderFactory.java:63)
    4. org.springframework.ide.eclipse.core.java.classreading.JdtConnectedMetadataReader.<init>(JdtConnectedMetadataReader.java:42)
    5. org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:53)
    6. org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38)
    6 frames
  4. Spring Context
    ConfigurationClassPostProcessor.processConfigBeanDefinitions
    1. org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:73)
    2. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:274)
    2 frames
  5. org.springframework.ide
    BeansConfig$4.run
    1. org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:87)
    2. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:752)
    2 frames
  6. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  7. org.springframework.ide
    SpringProjectContributionManager$9.run
    1. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:745)
    2. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcessExternal(BeansConfig.java:679)
    3. org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.readConfig(BeansConfig.java:537)
    4. org.springframework.ide.eclipse.beans.core.internal.model.AbstractBeansConfig.getBeans(AbstractBeansConfig.java:280)
    5. org.springframework.ide.eclipse.beans.core.internal.model.validation.BeansConfigReloadingProjectContributionEventListener.start(BeansConfigReloadingProjectContributionEventListener.java:110)
    6. org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$1.execute(SpringProjectContributionManager.java:112)
    7. org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$9.run(SpringProjectContributionManager.java:291)
    7 frames
  8. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  9. org.springframework.ide
    SpringProjectContributionManager.build
    1. org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.execute(SpringProjectContributionManager.java:294)
    2. org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.build(SpringProjectContributionManager.java:110)
    2 frames
  10. Core Resource Management
    BuildManager$2.run
    1. org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    1 frame
  11. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  12. Core Resource Management
    BuildManager$1.run
    1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    2. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    3. org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    3 frames
  13. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  14. Core Resource Management
    AutoBuildJob.run
    1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    2. org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    3. org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    4. org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    5. org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    5 frames
  15. Eclipse Jobs
    Worker.run
    1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    1 frame