Hi all! I'm working at a spring-integrated Eclipse RCP application,but i got a error while spring framework initializing at application start.
My code in Activator.java below:
...
public void start(BundleContext context) throws Exception {
super.start(context);
initializeApplicationContext();
plugin = this;
}
private void initializeApplicationContext() {
ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(
this.getClass().getClassLoader());
ctx = new ClassPathXmlApplicationContext(SPRING_CONFIGS);
}catch(Exception e){
e.printStackTrace();
} finally {
Thread.currentThread().setContextClassLoader(oldLoader);
}
}
...
The exception is:
2010-07-13 16:38:42,421 INFO [AbstractApplicationContext] - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@be76c7: display name [org.springframework.context.support.ClassPathXmlApplicationContext@be76c7]; startup date [Tue Jul 13 16:38:42 CST 2010]; root of context hierarchy
2010-07-13 16:38:42,656 INFO [XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [applicationContext.xml]
org.springframework.beans.factory.BeanDefinitionStoreException: I/O failure during classpath scanning; nested exception is java.io.FileNotFoundException: JAR entry net/interttimes/ not found in D:\Workspaces\MyEclipse 8.x\formicary-client2\lib\formicary-remote.jar
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:222)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at net.interttimes.formicary.rcp.Activator.initializeApplicationContext(Activator.java:62)
at net.interttimes.formicary.rcp.Activator.start(Activator.java:47)
...
Caused by: java.io.FileNotFoundException: JAR entry net/interttimes/ not found in D:\Workspaces\MyEclipse 8.x\formicary-client2\lib\formicary-remote.jar
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
... 65 more
My formicary-remote.jar's package name is start with 'net.interttimes.',so i don't understand it,why the package name cannot be parsed ?
Thank you for attention to my question!