java.io.FileNotFoundException: class path resource [applicationContextRemoteAgent.xml] cannot be opened because it does not exist

Atlassian JIRA | Pete de Zwart | 8 years ago
  1. 0

    Launching the agent via the usual method: {noformat} pdezwart@Dschubba:~/Downloads[11:40:14](0,0)$ java -jar bamboo-agent-2.1.3.jar http://iclil/bamboo/agentServer/ log4j:ERROR Could not read configuration file from URL [http://iclil/bamboo/agentServer/GetResource.action?name=log4j.properties&fingerprint=1225283395682]. java.io.IOException: Server returned HTTP response code: 503 for URL: http://iclil/bamboo/agentServer/GetResource.action?name=log4j.properties&fingerprint=1225283395682 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1170) at java.net.URL.openStream(URL.java:1007) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:433) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:336) at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:57) at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:23) at java.lang.Thread.run(Thread.java:613) log4j:ERROR Ignoring configuration file [http://iclil/bamboo/agentServer/GetResource.action?name=log4j.properties&fingerprint=1225283395682]. 0 [Thread-3] ERROR com.atlassian.bamboo.agent.bootstrap.AgentBootstrap - Exiting due to fatal exception. org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContextRemoteAgent.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContextRemoteAgent.xml] cannot be opened because it does not exist Caused by: java.io.FileNotFoundException: class path resource [applicationContextRemoteAgent.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:307) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:173) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76) at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:170) at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:61) at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:23) at java.lang.Thread.run(Thread.java:613) {noformat} Trying the old {{-Dbamboo.agent.brokerUrl=tcp://$HOST:54663}} argument: {noformat} pdezwart@Dschubba:~/Downloads[11:40:49](0,1)$ java -jar bamboo-agent-2.1.3.jar -Dbamboo.agent.brokerUrl=tcp://iclil:54663 0 [main] ERROR com.atlassian.bamboo.agent.bootstrap.AgentBootstrap - Remote agent could not start. Retrying in 30 seconds. java.lang.IllegalArgumentException: Invalid uri '-Dbamboo.agent.brokerUrl=tcp:://iclil:54663/GetFingerprint.action?hostName=Dschubba.central.dezwart.net.au': incorrect scheme at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:219) at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:88) at com.atlassian.bamboo.agent.bootstrap.AgentContext.<init>(AgentContext.java:89) at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:77) at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:27) {noformat} Seems similar to [BAM-2008], but I am struggling trying to find relevant logs, as the {{catalina.out}} has nothing useful & there seems to be no log files in the server {{$BAMBOO_HOME}}.

    Atlassian JIRA | 8 years ago | Pete de Zwart
    java.io.FileNotFoundException: class path resource [applicationContextRemoteAgent.xml] cannot be opened because it does not exist
  2. 0

    Launching the agent via the usual method: {noformat} pdezwart@Dschubba:~/Downloads[11:40:14](0,0)$ java -jar bamboo-agent-2.1.3.jar http://iclil/bamboo/agentServer/ log4j:ERROR Could not read configuration file from URL [http://iclil/bamboo/agentServer/GetResource.action?name=log4j.properties&fingerprint=1225283395682]. java.io.IOException: Server returned HTTP response code: 503 for URL: http://iclil/bamboo/agentServer/GetResource.action?name=log4j.properties&fingerprint=1225283395682 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1170) at java.net.URL.openStream(URL.java:1007) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:433) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:336) at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:57) at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:23) at java.lang.Thread.run(Thread.java:613) log4j:ERROR Ignoring configuration file [http://iclil/bamboo/agentServer/GetResource.action?name=log4j.properties&fingerprint=1225283395682]. 0 [Thread-3] ERROR com.atlassian.bamboo.agent.bootstrap.AgentBootstrap - Exiting due to fatal exception. org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContextRemoteAgent.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContextRemoteAgent.xml] cannot be opened because it does not exist Caused by: java.io.FileNotFoundException: class path resource [applicationContextRemoteAgent.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:307) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:173) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76) at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:170) at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:61) at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:23) at java.lang.Thread.run(Thread.java:613) {noformat} Trying the old {{-Dbamboo.agent.brokerUrl=tcp://$HOST:54663}} argument: {noformat} pdezwart@Dschubba:~/Downloads[11:40:49](0,1)$ java -jar bamboo-agent-2.1.3.jar -Dbamboo.agent.brokerUrl=tcp://iclil:54663 0 [main] ERROR com.atlassian.bamboo.agent.bootstrap.AgentBootstrap - Remote agent could not start. Retrying in 30 seconds. java.lang.IllegalArgumentException: Invalid uri '-Dbamboo.agent.brokerUrl=tcp:://iclil:54663/GetFingerprint.action?hostName=Dschubba.central.dezwart.net.au': incorrect scheme at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:219) at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:88) at com.atlassian.bamboo.agent.bootstrap.AgentContext.<init>(AgentContext.java:89) at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:77) at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:27) {noformat} Seems similar to [BAM-2008], but I am struggling trying to find relevant logs, as the {{catalina.out}} has nothing useful & there seems to be no log files in the server {{$BAMBOO_HOME}}.

    Atlassian JIRA | 8 years ago | Pete de Zwart
    java.io.FileNotFoundException: class path resource [applicationContextRemoteAgent.xml] cannot be opened because it does not exist
  3. 0

    How to catch FileNotFoundException for new ClassPathXmlApplicationContext()

    Stack Overflow | 2 years ago
    java.io.FileNotFoundException: class path resource [com/cts/spring/config/dsf] cannot be opened because it does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring import context from dependency jar in web project

    Stack Overflow | 2 years ago
    java.io.FileNotFoundException: class path resource [spring-configuration.xml] cannot be opened because it does not exist
  6. 0

    Cannot load /WEB-INF/applicationContext.xml

    javalobby.org | 5 months ago
    java.io.FileNotFoundException: path resource [WEB-INF/abc.xml] cannot be opened because it does not exist

  1. stigkj 1 times, last 3 weeks ago
  2. kjhdofjosvs 1 times, last 4 weeks ago
  3. marcbouvierdav 1 times, last 2 months ago
  4. linxiaolong 2 times, last 3 months ago
  5. ruifung 2 times, last 3 months ago
18 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

    class path resource [applicationContextRemoteAgent.xml] 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:135)
    1 frame
  3. Spring Beans
    AbstractBeanDefinitionReader.loadBeanDefinitions
    1. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:307)
    2. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
    3. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
    4. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
    5. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:173)
    5 frames
  4. Spring Context
    ClassPathXmlApplicationContext.<init>
    1. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112)
    2. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
    3. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
    4. org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)
    5. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
    6. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
    7. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76)
    7 frames
  5. com.atlassian.bamboo
    AgentRunner.run
    1. com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.initApplicationContext(RemoteAgent.java:170)
    2. com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:61)
    3. com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:23)
    3 frames
  6. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:613)
    1 frame