Hi

>From my understanding the render bean has a property that is a
MessageProvider class. The GreetingProvider is an interface however the
HelloWorldMessageProvider is a MessageProvider class.

Changing the <bean id="provider" class="GreetingProvider"/> to <bean
id="provider" class="HelloWorldMessageProvider"/> worked for me

Cheers
Craig

-----Original Message-----
From: java-ee-j2ee-programming-with-passion@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of
Bev Wright
Sent: 29 November 2008 17:17
To: Java EE (J2EE) Programming with Passion!
Subject: [java ee programming] Homework #22



I am having some issues with this homework.  I think the problem is with
the beans.xml file.

When trying to run, I get this error:
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'renderer' defined in file

Here's my XML file:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd";>
<beans>
    <bean id="renderer" class="StandardOutMessageRenderer">
        <property name="messageProvider">
            <ref local="provider"/>
        </property>
    </bean>
    <bean id="provider" class="GreetingProvider"/>
</beans>

I may also have issues with this step in the homework, I don't think I did
it right.
            Modify HelloWorldMessageProvider class so that its getMessage()
            method gets a message from the getGreeting() method of the
            GreetingProvider object.

Any help you can give would be appreciated.

Thanks,
Beverly






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to