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.

  • Problems with Sales Invoice
    via openbravo by nsaleh
    ,
  • Netbeans 6.8, JPA/Hibernate, Ant, MySQL
    via by Unknown author,
  • Netbeans 6.8, JPA/Hibernate, Ant, MySQL
    via by Unknown author,
  • Test errors
    via by fors...@mail.com,
  • When try to add an *new* file via maven {{configfiles}} that not exists in the target location / the default server configuration (installs directory), then an exception ({{CargoException}} / {{java.io.FileNotFoundException}}) is thrown (because the one tryes to load the file from the target location). But if if the file already exists in the target location, then every thing works fine. {code:title=Exception (mvn install -X} [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.1:start (start-container) on project cfmt: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.1:start failed: Failed to copy source file [c:\eclipseWS_RalphCFMA\cfmt/src/test/serverresources/context.xml] to [c:\eclipseWS_RalphCFMA\cfmt\target\cargo\configurations\tomcat6x/conf/Catalina/localhost/context.xml] with FilterChain: c:\eclipseWS_RalphCFMA\cfmt\target\cargo\configurations\tomcat6x\conf\Ca talina\localhost\context.xml (Das System kann den angegebenen Pfad nicht finden) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.1:start (start-container) on project cfmt: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.1:start failed: Failed to copy source file [c:\eclipseWS_RalphCFMA\cfmt/src/test/serverresources/context.xml] to [c:\eclipseWS_RalphCFMA\cfmt\target\cargo\configurations\tomcat6x/conf/Catalina/localhost/context.xml] with FilterChain at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.1:start failed: Failed to copy source file [c:\eclipseWS_RalphCFMA\cfmt/src/test/serverresources/context.xml] to [c:\eclipseWS_RalphCFMA\cfmt\target\cargo\configurations\tomcat6x/conf/Catalina/localhost/context.xml] with FilterChain at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:116) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.codehaus.cargo.util.CargoException: Failed to copy source file [c:\eclipseWS_RalphCFMA\cfmt/src/test/serverresources/context.xml] to [c:\eclipseWS_RalphCFMA\cfmt\target\cargo\configurations\tomcat6x/conf/Catalina/localhost/context.xml] with FilterChain at org.codehaus.cargo.util.DefaultFileHandler.copyFile(DefaultFileHandler.java:186) at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.configureFiles(AbstractStandaloneLocalConfiguration.java:251) at org.codehaus.cargo.container.spi.configuration.AbstractStandaloneLocalConfiguration.configure(AbstractStandaloneLocalConfiguration.java:79) at org.codehaus.cargo.container.spi.configuration.builder.AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder.configure(AbstractStandaloneLocalConfigurationWithXMLConfigurationBuilder.java:123) at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:159) at org.codehaus.cargo.maven2.AbstractContainerStartMojo.doExecute(AbstractContainerStartMojo.java:55) at org.codehaus.cargo.maven2.ContainerStartMojo.doExecute(ContainerStartMojo.java:52) at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:278) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) ... 20 more Caused by: java.io.FileNotFoundException: c:\eclipseWS_RalphCFMA\cfmt\target\cargo\configurations\tomcat6x\conf\Catalina\localhost\context.xml (Das System kann den angegebenen Pfad nicht finden) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:70) at java.io.FileWriter.<init>(FileWriter.java:46) at org.codehaus.cargo.util.DefaultFileHandler.newWriter(DefaultFileHandler.java:668) at org.codehaus.cargo.util.DefaultFileHandler.copyFile(DefaultFileHandler.java:156) ... 28 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException {code} The relevant part of maven pom: {code:title=pom.xml|type=xml} <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.1.1</version> <!-- <version>1.1.1</version> --> <executions> <execution> <id>start-container</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> </execution> <execution> <id>stop-container</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> <configuration> <wait>false</wait> <!-- Container configuration --> <container> <type>installed</type> <containerId>tomcat6x</containerId> <zipUrlInstaller> <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip</url> </zipUrlInstaller> <output>${project.build.directory}/tomcat/container.log</output> <append>false</append> <log>${project.build.directory}/tomcat/cargo.log</log> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>com.springsource.javax.mail</artifactId> </dependency> </dependencies> </container> <configuration> <configfiles> <configfile> <file>${basedir}/src/test/serverresources/context.xml</file> <todir>conf/Catalina/localhost</todir> </configfile> </configfiles> </configuration> </configuration> </plugin> {code}
    via by Ralph Engelmann,
  • filemap problem during install
    via by 402430,
    • java.io.FileNotFoundException: /home/openbravo/apache-tomcat-5.5.26/webapps/ob235mp1/WEB-INF/AcctServer.logpid800170 (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:70) at java.io.FileWriter.<init>(FileWriter.java:46)

    Users with the same issue

    Agócs Tamás
    1 times, last one,
    Unknown visitor1 times, last one,
    Vikram
    2 times, last one,
    olle.hallin
    5 times, last one,
    tzrlk
    1 times, last one,
    78 more bugmates