Link to home
Start Free TrialLog in
Avatar of Sathish David  Kumar N
Sathish David Kumar NFlag for India

asked on

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 ..
Avatar of Mick Barry
Mick Barry
Flag of Australia image

>      
Avatar of Sathish David  Kumar N

ASKER

ya i did that same error only coming .
is the bean you are ref'ing defined?
ya
<bean id ="submitImpl"..... />
this id only iam using as ref !! is that correct !!
I'm referring to:

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

ref expects the name of a bean to assign the property to
ASKER CERTIFIED SOLUTION
Avatar of Sathish David  Kumar N
Sathish David Kumar N
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial