我的第一个春季项目IOException从类路径资源[spring.xml]解析XML文档,我有一个例外。

时间:2018-07-04 08:06:28

标签: spring netbeans exception-handling

从类路径资源[spring.xml]解析XML文档时出现IOException。在我的第一个netbeans春季计划中

This video help me to create this program

包springdemo1;

data<-mutate(data,pcosr=Internal_Revenue/Total_Income*100,
pcgrants=Grants/Total_Income*100)
data<-data %>%
select(YEAR,pcosr, pcgrants,Local_Bodies) %>% 
gather(key="variable",value="value",-YEAR, -Local_Bodies)
data<-subset(data,Local_Bodies=="vdc")

ggplot(data,aes(x=YEAR,y=value,fill=variable))+geom_line()+
labs( y="Percentage", 
color=NULL) +  # title and caption
scale_color_manual(labels = c("percentage OSR", "percentage Grants"), 
values = c("percentage OSR"="#00ba38", 
"percentage Grant"="#f8766d")) +  # line color
theme(axis.text.x = element_text(angle = 90, vjust=0.5, size = 8),  # rotate 
x axis text
panel.grid.minor = element_blank())  # turn off minor grid

}

  

我的例外情况

     

运行:   存在测试:正确   2018年7月4日1:07:54 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh   信息:刷新org.springframework.context.support.ClassPathXmlApplicationContext@d6993a:启动日期[IST 2018年7月4日星期三13:07:54];上下文层次结构的根   2018年7月4日1:07:54 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions   INFO:从类路径资源[spring.xml]加载XML bean定义   线程“主”中的异常org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[spring.xml]解析XML文档;嵌套异常为java.io.FileNotFoundException:类路径资源[spring.xml]无法打开,因为它不存在       在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:343)       在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)       在org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)处       在org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)       在org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)       在org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:251)       在org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)       在org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)       在org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)       在org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:540)       在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)       在org.springframework.context.support.ClassPathXmlApplicationContext。(ClassPathXmlApplicationContext.java:139)       在org.springframework.context.support.ClassPathXmlApplicationContext。(ClassPathXmlApplicationContext.java:83)       在springdemo1.SpringDemo1.main(SpringDemo1.java:29)   原因:java.io.FileNotFoundException:类路径资源[spring.xml]无法打开,因为它不存在       在org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)       在org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)       ...另外13个   C:\ Users \ zeroone \ AppData \ Local \ NetBeans \ Cache \ 8.2 \ executor-snippets \ run.xml:53:返回的Java:1   失败(总时间:0秒)

0 个答案:

没有答案