Announcement Announcement Module
Collapse
No announcement yet.
Strange IOC bug? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange IOC bug?

    I have an application which is running fine for some time
    I added few classes and when I was trying to wire them up I got
    property is not writable or has an invalid setter method
    As far as I can tell all is fine
    what was more strange is that I use the property name with lower case
    something like 'fieldName' and it fails
    But when I am using upper case for the property name it is working
    All other classes are wired using lower case for property names
    Any ideas?
    The property name is uIFlowManager it is defined as
    Code:
     private UIFlowManager uIFlowManager;
    with the appropaite methods

    Code:
      /**
         * @return Returns the uIFlowManager.
         */
        public UIFlowManager getUIFlowManager() {
            return uIFlowManager;
        }
    
        /**
         * @param flowManager
         *            The uIFlowManager to set.
         */
        public void setUIFlowManager(UIFlowManager flowManager) {
            uIFlowManager = flowManager;
        }
    this will work
    Code:
    <bean id="tenderItemModelToDTOTransformer"
      class="il.co.cis.tender.manager.transformer.TenderItemModelToDTO">
         <property name="dtoClass"
            value="il.co.cis.tender.manager.dto.TenderItemDTOImp" />
         <property name="tenderItemNegotiationManager"
              ref="tenderItemNegotiationManager" />
         <property name="UIFlowManager" ref="tenderItemUIFlowManager" />
    </bean>
    this will not
    Code:
    <bean id="tenderItemModelToDTOTransformer"
      class="il.co.cis.tender.manager.transformer.TenderItemModelToDTO">
         <property name="dtoClass"
            value="il.co.cis.tender.manager.dto.TenderItemDTOImp" />
         <property name="tenderItemNegotiationManager"
              ref="tenderItemNegotiationManager" />
         <property name="uIFlowManager" ref="tenderItemUIFlowManager" />
    </bean>

  • #2
    I dont actually know if it is related or not, but I remember a long standing bug in commons-beanutils. beanutils had problems with properties beginning with 2 capital letters. At that time I was using AndroMDA extensively and it was a known limitation of beanutils which in turn made a limitation on AndroMDA ...

    Your problem might be totally unrelated ...

    Comment


    • #3
      Actually the behavior with regards to two capital letters is defined in the JavaBeans specification. All libraries basing on java.beans classes will therefore encounter this.
      See this thread which is about the same topic.

      Regards,
      Andreas

      Comment


      • #4
        Thanks a lot for the precision ! I always understood that as a documented bug, and did read the spec. But once it is explained, it does make sense ...

        Always happy to learn something new !

        Comment


        • #5
          You are welcome

          Comment

          Working...
          X