|
From: Lars F. <lar...@gm...> - 2003-08-23 13:26:07
|
Dmitry,
attached are the two files.
Thanks
Lars
> Lars,
>
> can you please post entire contents of applicationContext.xml and
> cwx-servlet.xml ?
>
> Thanks,
> Dmitriy.
>
>
> -----Original Message-----
> From: Lars Fischer
> To: spr...@li...
> Sent: 8/23/2003 8:35 AM
> Subject: [Springframework-developer] Example classes needed
>
> Hi all Spring experts,
>
> can anyone provide me the example classes mentioned in several skeletons
>
> (e.g. exampleController, exampleBusinessObject, exampleDataAccessObject)
> ?
>
> The two provided sample applications don't reflect the skeletons very
> well.
> There should be one 'big' application showing all the stuff and many
> small
> ones to show single options (like in WebWork 1).
>
> I've defined the following in applicationContext.xml (and it works):
>
> <bean id="cwxDao" class="example.dao.CwxDaoHibernate">
> <property name="sessionFactory"><ref
> bean="cwxSessionFactory"/></property>
> </bean>
>
> When defining
>
> (cwx-servlet.xml)
>
> <!-- Controller for the initial "Hello" page -->
> <bean id="cwxController" class="example.web.CwxController">
> <property name="cwxDao"><ref external="cwxDao"/></property>
> </bean>
>
> (CwxController)
>
> private CwxDao cwxDao;
>
> public void setCwxDao(CwxDao cwxDao) {
> this.cwxDao = cwxDao;
> }
>
>
> I always get
>
> ERROR [com.interface21.web.servlet.DispatcherServlet] - <Servlet with
> name
> 'cwx' : initialization error>
> com.interface21.beans.factory.NoSuchBeanDefinitionException: No bean
> named
> [cwxDao] is defined {class
> com.interface21.beans.factory.xml.XmlBeanFactory:
> defined beans [messageSource,viewResolver,urlMapping,cwxController]}
>
> This is the second time I get almost useless error messages. This is one
> point where EJBs are far ahead (
> there is almost always an error message telling you what excactly is
> wrong).
>
> Another (dumb) question:
>
> What is the difference between a DAO *implementation* and a business
> object
> and where does
> e. g. Petclinic reflect this ? I'm asking this because of the diiference
> between the skeletons and the
> sample applications. The skeletons provide a DAO and a Business Object
> using
> the DAO definition,
> Petclinic does not. The samples should be as close as possible to the
> skeletons or the skeletons should
> at least provide the java classes (shouldn't be too hard).
>
> Thanks in advance
> Lars
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
> at the same time. Free trial click
> here:http://www.vmware.com/wl/offer/358/0
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
> |