Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1051
  • Last Modified:

org.springframework.beans.factory.BeanCreationException

Hi
i am crating instance using xml when i doing that time this error is occour !!
org.springframework.beans.factory.BeanCreationException

is it possible to create instance using xml

Code is

      <bean id="papaSubmitController" class="com.papa.controller.PapaSubmitController">
        <property name="sessionForm"><value>true</value></property>        
      <property name="commandName"><value>purchaseReq</value></property>
      <property name="commandClass"><value>papa_base.PurchaseReq</value></property>
      <!-- property name="commandClass"><value>papa_base.PurchaseReqDetails</value></property-->      
      <property name="successView"><value>PapaPRsaveSuccess</value></property>
      <property name="SubmitPRImpl" ref="com.tspl.papa.business.impl.SubmitPRImpl"></property>
      <property name="submitPRInter" ref="com.tspl.papa.business.impl.submitPRInter"></property>
         
    </bean>
thats in XML file

in controller
private SubmitPRInter submitPRInter;
private SubmitPRImpl submitPRImpl;
      public SubmitPRImpl getSubmitImpl() {
            return submitPRImpl;
      }


      public void setSubmitImpl(SubmitPRInter submitImpl) {
            this.submitPRImpl = submitPRImpl;
      }

      
 
      public SubmitPRInter getSubmitPRInter() {
            return submitPRInter;
      }


      public void setSubmitPRInter(SubmitPRInter submitPRInter) {
            this.submitPRInter = submitPRInter;
      }

submitPRInter.savePRDetails(purchaseReq,purchaseReqDetails);

like is iwrote my code ..
0
Sathish David  Kumar N
Asked:
Sathish David  Kumar N
  • 3
  • 3
1 Solution
 
objectsCommented:
>      
0
 
Sathish David Kumar NAuthor Commented:
ya i did that same error only coming .
0
 
objectsCommented:
is the bean you are ref'ing defined?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Sathish David Kumar NAuthor Commented:
ya
<bean id ="submitImpl"..... />
this id only iam using as ref !! is that correct !!
0
 
objectsCommented:
I'm referring to:

ref="com.tspl.papa.business.impl.SubmitPRImpl"

ref expects the name of a bean to assign the property to
0
 
Sathish David Kumar NAuthor Commented:
create  submitDAOImpl getter/setter  in submitPRImpl
and create prpperty in xxx-servlet.xml

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now