java.io.FileNotFoundException: /media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT/META-INF/context.xml (No such file or directory)

Apache's JIRA Issue Tracker | Glen Mazza | 4 years ago
  1. 0

    Hi, I switched from the Codehaus to the Apache Tomcat plugin for Apache CXF's REST archetype: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/pom.xml?r1=1417501&r2=1418739&diff_format=h For "mvn clean install" to work with the new plugin I needed to add an empty META-INF/context.xml file: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/archetypes/cxf-jaxrs-service/src/main/resources/archetype-resources/src/main/webapp/META-INF/ This file was never needed by the Codehaus plugin. If I didn't add it for the Apache one, "mvn clean install" returns this error: [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ testrest --- [INFO] Skipping execution of surefire because it has already been run for this configuration [INFO] [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ testrest --- [INFO] Packaging webapp [INFO] Assembling webapp [testrest] in [/media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT] [INFO] Processing war project [INFO] Copying webapp resources [/media/work1/opensource/testrest/src/main/webapp] [INFO] Webapp assembled in [29 msecs] [INFO] Building war: /media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT.war [INFO] WEB-INF/web.xml already added, skipping [INFO] [INFO] <<< tomcat7-maven-plugin:2.0:run-war (start-tomcat) @ testrest <<< [INFO] [INFO] --- tomcat7-maven-plugin:2.0:run-war (start-tomcat) @ testrest --- [INFO] Running war on http://localhost:56114/jaxrs-service [INFO] Creating Tomcat server configuration at /media/work1/opensource/testrest/target/tomcat [INFO] create webapp with contextPath: /jaxrs-service Dec 08, 2012 2:37:48 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-56114"] Dec 08, 2012 2:37:48 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Tomcat Dec 08, 2012 2:37:48 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.30 Dec 08, 2012 2:37:48 PM org.apache.catalina.startup.ContextConfig processContextConfig SEVERE: Missing context.xml: file:/media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT/META-INF/context.xml java.io.FileNotFoundException: /media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT/META-INF/context.xml (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:97) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at java.net.URL.openStream(URL.java:1037) at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:618) at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:599) at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:837) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Once I added the context.xml file (with just an empty <context/> element) to the project the new plugin ran fine like the old one. Is there something wrong with my archetype's pom (link at the top) requiring me to create this empty context.xml file? If not, then it looks like a bug in the plugin -- I shouldn't be required to create an empty META-INF/context.xml file when using this plugin -- it should be able to default to whatever defaults it is using with this empty file I'm now providing it.

    Apache's JIRA Issue Tracker | 4 years ago | Glen Mazza
    java.io.FileNotFoundException: /media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT/META-INF/context.xml (No such file or directory)
  2. 0

    ImportControl module throws java.io.FileNotFoundException

    GitHub | 3 years ago | oslater
    com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Cannot set property 'file' in module ImportControl to 'checkstyle_import_control.xml': Unable to load checkstyle_import_control.xml
  3. 0

    Illegal character in path at index 0: \\xsl\\index.xsl

    GitHub | 3 years ago | shailendrasoni
    java.io.FileNotFoundException: D:\Shailendra\pp\projects\tcp2\rultor\rultor-web\target\test-classes\META-INF\MANIFEST.MF (The system cannot find the path specified)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [#LOGBACK-893] Corrupted Joran exception output - QOS.ch JIRA

    qos.ch | 1 year ago
    java.io.FileNotFoundException: /SOME_PATH/logback.xml (Нет такого файла или каталога)
  6. 0

    CMU Sphinx / Forums / Sphinx4 Help:How to add new acoustic model to sphinx 4

    sourceforge.net | 1 year ago
    edu.cmu.sphinx.util.props.PropertyException: java.io.FileNotFoundException: new.cd_cont_100/means (No such file or directory)

  1. davidvanlaatum 1 times, last 3 weeks ago
  2. serious2monkeys 2 times, last 1 month ago
  3. davidvanlaatum 2 times, last 2 months ago
  4. balintn 1 times, last 7 months ago
  5. bpbhat77 1 times, last 10 months ago
9 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

    /media/work1/opensource/testrest/target/testrest-0.0.1-SNAPSHOT/META-INF/context.xml (No such file or directory)

    at java.io.FileInputStream.open()
  2. Java RT
    URL.openStream
    1. java.io.FileInputStream.open(Native Method)
    2. java.io.FileInputStream.<init>(FileInputStream.java:138)
    3. java.io.FileInputStream.<init>(FileInputStream.java:97)
    4. sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    5. sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    6. java.net.URL.openStream(URL.java:1037)
    6 frames
  3. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:618)
    2. org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:599)
    3. org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:837)
    4. org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
    5. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    6. org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    7. org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
    8. org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
    9. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
    10. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    11. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    11 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    5. java.lang.Thread.run(Thread.java:722)
    5 frames