Hi everyone !
I'm starting with Spring , and i'm trying every features of the spring core.
Right now i'm stuck with Lookup method injection (3.3.4.1), i let you consult the short paragraph about
just here :http://static.springframework.org/sp...s.html#d0e1058
In com.AO.DAO.DAOImpl, i have the following code :Code:<bean id="DataSource" class="com.AO.DAO.DAOImpl" autowire="byType" init-method="connect"> <lookup-method name="createResource" bean="File" /> </bean> <!-- This bean is abstract, it can't be instantiated as such --> <bean id="Resources" abstract="true" class="com.AO.resources.Resources" singleton="false"> <property name="read"><value>true</value></property> <property name="write"><value>true</value></property> </bean> <bean id="File" parent="Resources"> <property name="read"><value>true</value></property> <property name="id"><value>666</value></property> </bean>
When i launch my app i got this error :Code:protected IResources createResource() { return null; }
Well, what i am doing wrong ? Everything is here, but it failed in a very strange way...2005-06-23 11:39:12,296 INFO [org.springframework.beans.factory.xml.XmlBeanFacto ry] - <Creating shared instance of singleton bean 'DataSource'>
Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'DataSource' defined in resource loaded through InputStream: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter
at org.springframework.beans.factory.support.CglibSub classingInstantiationStrategy.instantiateWithMetho dInjection(CglibSubclassingInstantiationStrategy.j ava:69)
at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:53)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:322)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:223)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
at com.AO.demo.App.main(App.java:35)
Something appears to be missing but i have included Spring-beans.jar and spring-core.jar, and this features should belong to those "jars"...
Belaran,
:?:


Reply With Quote
