Matt,
Sorry, to bother you again, but I still have problem, probably due a lack of
knowledge cq experience.

In the core module I have defined  a personDao interface.
The personDao test is running.

I get a problem as soon as I run jetty in the web module.

It  probably has to do with the personManager.
This is the content of the
project3/web/src/main/webapp/WEB-INF/applicationContext.xml file

###################################
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";
       default-lazy-init="true">

        <bean id="personManager"
class="org.appfuse.service.impl.GenericManagerImpl">
            <constructor-arg ref ="personDao"/>

        </bean>
   </beans>
###############################################
When I run   mvn jetty:run-war I get the following error 
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'personController' defined in ServletContext resource
[/WEB-INF/dispatcher-servlet.xml]: Cannot resolve reference to bean
'personManager' while setting bean property 'personManager'; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'personManager' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'personDao' while setting constructor argument; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'personDao' is defined

The personDao is defined but apparently spring cannot find it.
What am I doing wrong?
Once again, thanks for your time.

By the way: I got confused about the action class as a PersonAction exists
in the service-tutorial


    





mraible wrote:
> 
> Controller should go in the web module, as stated in the tutorial.  
> You are correct that Actions are for Struts - maybe you're reading  
> the wrong tutorial?
> 
> Matt
> 
> On Jan 9, 2008, at 12:45 AM, os57741 wrote:
> 
>>
>> Matt, Thanks for answering.
>> Yes, I applied the proper names, but should I put the controller  
>> stuff in
>> the core module or in the web module (as generated by the archetype)?
>> And about the Action stuff: I have the idea that that is not used  
>> by Spring
>> MVC but by Struts? Is that right?
>>
>>
>>
>>
>> mraible wrote:
>>>
>>> If you're using Spring MVC, you should use $
>>> {groupId}.webapp.controller as your package name. You can find $
>>> {groupId} in pom.xml as the value for <groupId>.
>>>
>>> HTH,
>>>
>>> Matt
>>>
>>> On Jan 8, 2008, at 2:43 PM, os57741 wrote:
>>>
>>>>
>>>> Hi Everybody,
>>>> I am going through the tutorials. I have setup a modular Spring MVC
>>>> configuration.
>>>> Some tests work, some don't.
>>>> I suspect that I didn't put the packages in the correct location.  
>>>> The
>>>> Services tutorial is not clear on that.
>>>> The Dao stuff I have put in the core module and the controller
>>>> stuff in the
>>>> webapp module.
>>>> I am not sure if I understood well where to put the following
>>>> packages:
>>>> - service with the PersonManager interface
>>>> - service.impl with the PersonManagerImpl class
>>>>
>>>> I also wonder if there shouldn't be webapp.action package with a
>>>> PersonAction class.
>>>> Where else should I put the setPersonManager methods ?
>>>> Any help very much appreciated.
>>>>
>>>>
>>>>
>>>> -- 
>>>> View this message in context: http://www.nabble.com/Location-of-
>>>> Controller-and-Service-packages-in-Modular-Spring-MVC-
>>>> tp14699664s2369p14699664.html
>>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/Location-of- 
>> Controller-and-Service-packages-in-Modular-Spring-MVC- 
>> tp14699664s2369p14706620.html
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Location-of-Controller-and-Service-packages-in-Modular-Spring-MVC-tp14699664s2369p14761160.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to