Results 1 to 3 of 3

Thread: Erroneous No setter for property 'xxx' errors in class 'yyy'

  1. #1
    Join Date
    Aug 2004
    Posts
    16

    Default Erroneous No setter for property 'xxx' errors in class 'yyy'

    I am getting weird "No setter for property 'xxx' errors in class 'yyy'". For instance the 'jndiName' property is only specified in the 'xappPropertiesFile' bean def. But the validator is complaining that there's no setter for 'jndiName' for every other bean in the applicationContext.xml (i.e. xappPropFileResource). The config file works fine in my application so I am not sure what the problem is.

    I had this problem w/ v 1.0.3 of the plugin and then updated to the 1.1.0 with the same results. I am running on Eclipse 3, OS X

    Here's the config file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http&#58;//www.springframework.org/dtd/spring-beans.dtd">
    <beans>
        <!-- config to read properties from dtsxappint.propertyfile -->
        <bean id="xappPropertiesFile" class="org.springframework.jndi.JndiObjectFactoryBean">
             <property name="jndiName">
                <value>java&#58;comp/env/dtsxappint.propertyfile</value>
    
            </property> 
        </bean>
        <bean id="xappPropFileResource" class="org.springframework.core.io.FileSystemResource">
            <constructor-arg>
                <ref bean="xappPropertiesFile"/>
            </constructor-arg>
        </bean>
        <!-- property placeholder post-processor -->
        <bean id="placeholderConfig"
            class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
            <property name="location">
                <ref bean="xappPropFileResource"/>
            </property> 
        </bean>
        <!-- Configure Pooling -->
        <bean id="proxyPoolFactory" class="com.trw.xappint.pool.ProgressProxyObjectFactory">
            <!--        <property name="progressAppServerURL"><value>AppServer&#58;//214.3.110.57&#58;31522/dts_DEVL04_as_soap</value></property>-->
            <property name="progressAppServerURL">
                <value>$&#123;url.progress.appserver&#125;</value>
            </property>
            <property name="proxyMap">
                <map>
                    <entry key="document">
                        <value>com.trw.dts.xappint.document.proxy.DocProxy</value>
                    </entry>
                    <entry key="processAuth">
                        <value>com.trw.dts.xappint.document.proxy.ProcessAuthProxy</value>
                    </entry>
    
                </map>
            </property>
        </bean>
    
        <bean id="proxyPoolConfig" class="com.trw.xappint.pool.GenericKeyedObjectPoolConfigBean">
    
            <!-- pool behavior config items
                see&#58; http&#58;//jakarta.apache.org/commons/pool/apidocs/org/apache/commons/pool/impl/GenericKeyedObjectPool.html
                for more details
                -->
            <!-- testOnBorrow and testOnReturn tell the pool validate objects as they are
                borrowed from and returned to the pool.  Should always be true -->
            <property name="testOnBorrow">
                <value>true</value>
            </property>
            <property name="testOnReturn">
                <value>true</value>
            </property>
            <!-- the following values may be tweaked in enviroments for optimal peformance
                the defaults appear to be adequate based on preliminary load tests -->
    
            <property name="maxActive">
                <value>25</value>
            </property>
            <property name="maxIdle">
                <value>10</value>
            </property>
            <!-- these values should not be changed with out reading the above link
    
            <property name="maxTotal"><value>-1</value></property>
            <property name="minEvictableIdleTimeMillis"><value>5000</value></property>
            <property name="numTestsPerEvictionRun"><value>true</value></property>
            <property name="testWhileIdle"><value>true</value></property>
            <property name="timeBetweenEvictionRunsMillis"><value>true</value></property>
            <property name="whenExhaustedAction"><value>true</value></property>
            -->
    
        </bean>
    
        <bean id="proxyPool" class="org.apache.commons.pool.impl.GenericKeyedObjectPool">
            <constructor-arg index="0">
                <ref bean="proxyPoolFactory"/>
            </constructor-arg>
    
            <constructor-arg index="1">
                <ref bean="proxyPoolConfig"/>
            </constructor-arg>
    
        </bean>
        <!-- services that will be exposed -->
        <bean id="progressSession" class="com.trw.dts.xappint.session.ProgressSession">
            <property name="proxyPool">
                <ref bean="proxyPool"/>
            </property>
    
        </bean>
        <bean id="document" class="com.trw.dts.xappint.document.Document">
            <property name="proxyPool">
                <ref bean="proxyPool"/>
            </property>
        </bean>
        <bean id="receiptUtil" class="com.trw.ets.xappint.receipt.ReceiptUtil">
            <property name="proxyPool">
                <ref bean="proxyPool"/>
            </property>
        </bean>
    	<bean id="ixAuthorization" class="com.trw.dts.xappint.document.IXAuthorizationImpl">
            <property name="proxyPool">
                <ref bean="proxyPool"/>
            </property>
        </bean>
    
        <bean id="glueBridgeRegistry" class="com.trw.springgluebridge.Registry"/>
    
        <!-- tracing proxy -->
        <!--
        <bean id="traceInterceptor" class="org.springframework.aop.interceptor.TraceInterceptor"/>
        <bean id="settersAndAbsquatulateAdvisor"
            class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
            <property name="advice">
                <ref local="traceInterceptor"/>
            </property>
            <property name="patterns">
                <list>
                    <value>.*DocProxy.*</value>
    
                </list>
            </property>
    
        </bean>
        -->
    
    
    </beans>

  2. #2
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default

    I can't reproduce the "No setter..." validation errors with your config file in a simple test project (no Java source code and only spring.jar in the project's Java build path).

    Spring IDE's validator creates "No setter" errors if the bean class' Java type was found the project's build path but no corresponding setter was found in the Java type or in one of it's super types. The implementation of v1.0.3 (and the current developer version of v1.1.0) is weak. If an error (JavaModelException) occured while looking for setters in the Java type or the super type then the "No setter..." validation problem was indicated too.

    I will fix this in the developer version of v1.1.0 and upload a new version to the updatesite. A mail to the developer list will indicate when this happened.

    Anyway, normally no JavaModelException will be thrown during lookup of super types or accessing a type's methods. This is only thrown if the corresponding element doesn't exist or isn't accessible.

    Is in your Java project something special regarding the Java build path and the spring.jar (or it's spring-xxx sub jars) which may prevent access to the corresponding information stored in JDT's Java model of your project?

    Cheers,
    Torsten

  3. #3

    Default

    I had this when I had old versions of the plugins left under eclipse/plugins. clear them all out and reinstall the plugins.

Similar Threads

  1. Cannot compile JasperReports
    By wfcheang in forum Web
    Replies: 6
    Last Post: Dec 5th, 2005, 01:46 AM
  2. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Replies: 3
    Last Post: Sep 4th, 2005, 11:11 PM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •