java - Spring MVC no setter found for property 'xxxx' in class 'xxxx' -


i'm getting 4 'no setter found property 'xxxx' in class com.rusapp.batch.trans.olfmwriter'. fifth bean in class not have error, inputqueue. rest have errors in xml below @ each of property lines.

the beans appear such:

<bean id="inputqueue" class="com.rusapp.batch.trans.olfmwriter">     <property name="inputqueue" value="${${env}_mq_fm_input_queue}" /> </bean>  <bean id="replyqueue" class="com.rusapp.batch.trans.olfmwriter">     <property name="replyqueue" value="${${env}_mq_fm_reply_queue}" /> </bean>  <bean id="mqconnectionfactory" class="com.rusapp.batch.trans.olfmwriter">     <property name="mqconnectionfactory" ref="mqconnection" /> </bean>  <bean id="jmsdestination"     class="com.rusapp.batch.trans.olfmwriter">     <property name="jmsdestination" ref="jmsdestinationresolver" /> </bean>  <bean id="jmsreplyto"     class="com.rusapp.batch.trans.olfmwriter">     <property name="jmsreplyto" ref="jmsdestinationresolverreceiver" /> </bean> 

the setters in class appear follows:

public static void setmqconnectionfactory(mqconnectionfactory _mqconnectionfactory) {     olfmwriter._mqconnectionfactory = _mqconnectionfactory; } public static void setreplyqueue(string _replyqueue) {     olfmwriter._replyqueue = _replyqueue; } public static void setjmsdestination(destination _jmsdestination) {     olfmwriter._jmsdestination = _jmsdestination; } public static void setjmsreplyto(destination _jmsreplyto) {     olfmwriter._jmsreplyto = _jmsreplyto; } public void setinputqueue(string inputqueue){     _inputqueue = inputqueue; } 

this not code , i'm not knowledgeable spring yet can't find wrong setter names. thought workspace error have persisted through several restarts of eclipse.

can find obvious faults code?

your setters static means don't conform java beans specification.

i think you'll want use methodinvokingfactorybean instead.

<bean abstract="true" id="abstractparent" class="org.springframework.beans.factory.config.methodinvokingfactorybean">     <property name="targetclass" value="com.rusapp.batch.trans.olfmwriter"/> </bean> <bean id="inputqueue" parent="abstractparent">     <property name="staticmethod" value="setinputqueue" />     <property name="arguments">         <list><value>${${env}_mq_fm_input_queue}</value></list>     </property> </bean> <bean id="replyqueue" parent="abstractparent">     <property name="staticmethod" value="setreplyqueue" />     <property name="arguments">         <list><value>${${env}_mq_fm_reply_queue}</value></list>     </property> </bean> etc... 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -