PDA

View Full Version : Eclipse Plugin Dev and loading AppContext - problem2



ahchiu
Nov 8th, 2004, 11:54 AM
In the problem1 post, even if i can load the appContext.xml file using FileSystemXmlApplicationContext, I cannot load the beans defined in it.

For example,


FileSystemXmlApplicationContext appContext=
new FileSystemXmlApplicationContext("E:/workspace/com/xyz/myapplication/appContext.xml");
BeanFactory bf=(BeanFactory) appContext;


I got the following error:


org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'myBean' defined in file [E:/workspace/com/xyz/myapplication/appContext.xml]: Bean class [org.springframework.remoting.rmi.RmiProxyFactoryB ean] not found; nested exception is java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiProxyFactoryBe an
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiProxyFactoryBe an

where myBean uses org.springframework.remoting.rmi.RmiProxyFactoryBe an to access the rmi service
I have included the spring.jar into the runtime library in the plugin.xml and the into the Java Build Path as library
I use spring 1.1.1

Please help!!

robh
Nov 9th, 2004, 02:34 AM
Are you getting this problem when you run the example? If so you need to add spring.jar to the classpath of your eclipse project rather than to the eclipse plugin. There is nothing wrong with the code you have shown and it should work just fine. Try running this outside of Eclipse first and then try adding spring.jar to the project classpath.

Rob