java.io.FileNotFoundException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Downloaded and unpacked "spring-osgi-1.1.3-with-dependencies.zip", went to "src/samples", issued "mvn -P equinox clean install" and got a series of failures in SimpleServiceBundleTest: ... ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.springframework.osgi.samples.simpleservice.test.SimpleServiceBundleTest Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.141 sec <<< FAILURE! testOSGiStartedOk(org.springframework.osgi.samples.simpleservice.test.SimpleServiceBundleTest) Time elapsed: 0.937 sec <<< ERROR! java.io.FileNotFoundException: C:\Documents and Settings\ray\.m2\repository\org\aopalliance\com.springsource.org.aopalliance\1.0.0\com.springsource.org.aopalliance-1.0.0.jar (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108) at org.springframework.osgi.test.AbstractOsgiTests.installBundle(AbstractOsgiTests.java:323) at org.springframework.osgi.test.AbstractOsgiTests.startup(AbstractOsgiTests.java:253) at org.springframework.osgi.test.AbstractOsgiTests.prepareTestExecution(AbstractOsgiTests.java:374) at org.springframework.osgi.test.AbstractOsgiTests.runBare(AbstractOsgiTests.java:203) at org.springframework.osgi.test.AbstractOsgiTests$1.protect(AbstractOsgiTests.java:184) at junit.framework.TestResult.runProtected(TestResult.java:124) at org.springframework.osgi.test.AbstractOsgiTests.run(AbstractOsgiTests.java:181) ... Fixing them was just a matter of adding a few dependencies to "samples/simple-service/simple-service-integration-test": <dependency> <groupId>org.aopalliance</groupId> <artifactId>com.springsource.org.aopalliance</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.osgi</groupId> <artifactId>spring-osgi-annotation</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.osgi</groupId> <artifactId>spring-osgi-extender</artifactId> <scope>test</scope> </dependency>
    via by Ray Davis,
  • Downloaded and unpacked "spring-osgi-1.1.3-with-dependencies.zip", went to "src/samples", issued "mvn -P equinox clean install" and got a series of failures in SimpleServiceBundleTest: ... ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.springframework.osgi.samples.simpleservice.test.SimpleServiceBundleTest Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.141 sec <<< FAILURE! testOSGiStartedOk(org.springframework.osgi.samples.simpleservice.test.SimpleServiceBundleTest) Time elapsed: 0.937 sec <<< ERROR! java.io.FileNotFoundException: C:\Documents and Settings\ray\.m2\repository\org\aopalliance\com.springsource.org.aopalliance\1.0.0\com.springsource.org.aopalliance-1.0.0.jar (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108) at org.springframework.osgi.test.AbstractOsgiTests.installBundle(AbstractOsgiTests.java:323) at org.springframework.osgi.test.AbstractOsgiTests.startup(AbstractOsgiTests.java:253) at org.springframework.osgi.test.AbstractOsgiTests.prepareTestExecution(AbstractOsgiTests.java:374) at org.springframework.osgi.test.AbstractOsgiTests.runBare(AbstractOsgiTests.java:203) at org.springframework.osgi.test.AbstractOsgiTests$1.protect(AbstractOsgiTests.java:184) at junit.framework.TestResult.runProtected(TestResult.java:124) at org.springframework.osgi.test.AbstractOsgiTests.run(AbstractOsgiTests.java:181) ... Fixing them was just a matter of adding a few dependencies to "samples/simple-service/simple-service-integration-test": <dependency> <groupId>org.aopalliance</groupId> <artifactId>com.springsource.org.aopalliance</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.osgi</groupId> <artifactId>spring-osgi-annotation</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.osgi</groupId> <artifactId>spring-osgi-extender</artifactId> <scope>test</scope> </dependency>
    via by Ray Davis,
  • JDK 6 build fails (again)
    via by Mario Scalas,
  • build error
    via by Wouter,
  • graph-builder.xml problems
    via GitHub by mkarakum
    ,
  • I have four context xml files, and if I leave them in the WEB-INF directory, one of them is loaded and the next one is not - it can't find the file because it's now looking in another directory - the bin directory off of CATALINA_HOME. I can't get my app to load unless I put the context XML files in that directory as well. Maybe I just have something misconfigured... Here's some of the stack: 2004-07-20 08:52:52 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2004-07-20 08:52:52 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2004-07-20 08:52:52 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2004-07-20 08:52:53 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2004-07-20 08:52:53 StandardContext[/servlets-examples]SessionListener: contextInitialized() 2004-07-20 08:52:58 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2004-07-20 08:52:58 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2004-07-20 08:52:58 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2004-07-20 08:52:58 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2004-07-20 09:43:35 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2004-07-20 09:43:36 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2004-07-20 09:43:36 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2004-07-20 09:43:36 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2004-07-20 09:43:36 StandardContext[/servlets-examples]SessionListener: contextInitialized() 2004-07-20 09:43:52 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2004-07-20 09:43:52 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2004-07-20 09:43:52 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2004-07-20 09:43:52 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2004-07-20 09:54:27 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2004-07-20 09:54:29 StandardContext[/wait]Initializing WebApplicationContext for servlet 'wait' 2004-07-20 09:54:30 StandardContext[/wait]StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registrantWizardForm' defined in resource [/WEB-INF/wait-servlet.xml] of ServletContext: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\jakarta-tomcat-5.0.27\bin\wait-applicationContext.xml]; nested exception is java.io.FileNotFoundException: wait-applicationContext.xml (The system cannot find the file specified) org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [C:\jakarta-tomcat-5.0.27\bin\wait-applicationContext.xml]; nested exception is java.io.FileNotFoundException: wait-applicationContext.xml (The system cannot find the file specified) java.io.FileNotFoundException: wait-applicationContext.xml (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:57) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:125) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:125) at org.springframework.context.support.AbstractXmlApplicationContext.refreshBeanFactory(AbstractXmlApplicationContext.java:65) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:226) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:60) at org.pcaob.dms.wait.web.RegistrantWizardFormController.<init>(RegistrantWizardFormController.java:135) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:46) at org.springframework.beans.BeanWrapperImpl.<init>(BeanWrapperImpl.java:171) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:217) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:399) at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:161) at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext(SimpleUrlHandlerMapping.java:96) at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:79) at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:65) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:138) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:177) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:183) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:268) at org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:281) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:229) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:199) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:102) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:617) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:968) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
    via by John Kwon,
  • FileSystemXmlApplicationContext ctx = new FileSystemXmlApplicationContext( "/tmp/context.xml" ); produces the exception below. '//tmp/context.xml' (double-slash) is a workaround to this problem. Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from file [/home/tom/tmp/context.xml]; nested exception is java.io.FileNotFoundException: tmp/context.xml (No such file or directory) java.io.FileNotFoundException: tmp/context.xml (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:85) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:152) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:124) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:140) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:103) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:71) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:87) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:267) at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:82)
    via by tom quas,
    • java.io.FileNotFoundException: C:\Documents and Settings\ray\.m2\repository\org\aopalliance\com.springsource.org.aopalliance\1.0.0\com.springsource.org.aopalliance-1.0.0.jar (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:108) at org.springframework.osgi.test.AbstractOsgiTests.installBundle(AbstractOsgiTests.java:323) at org.springframework.osgi.test.AbstractOsgiTests.startup(AbstractOsgiTests.java:253) at org.springframework.osgi.test.AbstractOsgiTests.prepareTestExecution(AbstractOsgiTests.java:374) at org.springframework.osgi.test.AbstractOsgiTests.runBare(AbstractOsgiTests.java:203) at org.springframework.osgi.test.AbstractOsgiTests$1.protect(AbstractOsgiTests.java:184) at junit.framework.TestResult.runProtected(TestResult.java:124) at org.springframework.osgi.test.AbstractOsgiTests.run(AbstractOsgiTests.java:181)

    Users with the same issue

    batwalrus76
    2 times, last one,
    Unknown visitor1 times, last one,
    krisztian.puska
    54 times, last one,
    jstrayer
    1 times, last one,
    jf-ast
    2 times, last one,
    179 more bugmates