[ 
https://issues.apache.org/jira/browse/IBATIS-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeff Butler closed IBATIS-583.
------------------------------

    Resolution: Invalid

This is not a bug - this is the way the JavaBeans spec is written.  There are 
weird rules when the property's second letter is upper case.

If your property is sCustRefNumber, then the getter should be 
getsCustRefNumber().



> Result Map property does not work with columns starting with a single letter 
> eg S_CUST_REF_NUMBER
> -------------------------------------------------------------------------------------------------
>
>                 Key: IBATIS-583
>                 URL: https://issues.apache.org/jira/browse/IBATIS-583
>             Project: iBatis for Java
>          Issue Type: Bug
>          Components: SQL Maps
>    Affects Versions: 2.3.0, 2.3.3
>         Environment: *nix, Java 1.5
>            Reporter: Nesh Nenad Mijailovic
>
>    Looks like getter/setter for this field is not correct, example:
>    <result property="sCustRefNumber" column="sCustRefNumber" 
> jdbcType="VARCHAR" />
>    Got around the problem by setting <result property="SCustRefNumber" 
> column="SCustRefNumber" jdbcType="VARCHAR" /> in the result map.
>    private String sCustRefNumber;
>    @Column(name = "S_CUST_REF_NUMBER")
>    public String getSCustRefNumber() {
>        return sCustRefNumber;
>    }
>    public void setSCustRefNumber(String sCustRefNumber) {
>        this.sCustRefNumber = sCustRefNumber;
>    }
>    Caused by: java.lang.RuntimeException: Error occurred.  Cause: 
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  
> Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> java.lang.RuntimeException: Error parsing XPath '/sqlMap/resultMap/result'.  
> Cause: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property 
> named 'sCustRefNumber' in class 'com.myrepairstore.model.JobsEntity'
>       at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:109)
>       at 
> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:90)
>       at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:326)
>       at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:280)
>       at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
>       at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
>       at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>       at 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>       at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
>       at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>       at 
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
>       at 
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
>       at 
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
>       at 
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3862)
>       at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4365)
>       at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>       at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
>       at 
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
>       at 
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
>       at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
>       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
>       at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>       at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>       at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>       at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>       at 
> org.apache.catalina.core.StandardService.start(StandardService.java:523)
>       at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:572)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  
> Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> java.lang.RuntimeException: Error parsing XPath '/sqlMap/resultMap/result'.  
> Cause: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property 
> named 'sCustRefNumber' in class 'com.myrepairstore.model.JobsEntity'
>       at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
>       at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:106)
>       ... 39 more
> Caused by: java.lang.RuntimeException: Error parsing XPath 
> '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error 
> parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath 
> '/sqlMap/resultMap/result'.  Cause: com.ibatis.common.beans.ProbeException: 
> There is no WRITEABLE property named 'sCustRefNumber' in class 
> 'com.myrepairstore.model.JobsEntity'
>       at 
> com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
>       at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
>       at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
>       at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
>       at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)
>       ... 40 more
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> java.lang.RuntimeException: Error parsing XPath '/sqlMap/resultMap/result'.  
> Cause: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property 
> named 'sCustRefNumber' in class 'com.myrepairstore.model.JobsEntity'
>       at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
>       at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:55)
>       at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$11.process(SqlMapConfigParser.java:394)
>       at 
> com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
>       ... 44 more
> Caused by: java.lang.RuntimeException: Error parsing XPath 
> '/sqlMap/resultMap/result'.  Cause: com.ibatis.common.beans.ProbeException: 
> There is no WRITEABLE property named 'sCustRefNumber' in class 
> 'com.myrepairstore.model.JobsEntity'
>       at 
> com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
>       at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
>       at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
>       at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
>       at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
>       at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)
>       ... 47 more
> Caused by: com.ibatis.common.beans.ProbeException: There is no WRITEABLE 
> property named 'sCustRefNumber' in class 'com.myrepairstore.model.JobsEntity'
>       at com.ibatis.common.beans.ClassInfo.getSetterType(ClassInfo.java:273)
>       at 
> com.ibatis.common.beans.GenericProbe.getClassPropertyTypeForSetter(GenericProbe.java:251)
>       at 
> com.ibatis.common.beans.GenericProbe.getPropertyTypeForSetter(GenericProbe.java:135)
>       at 
> com.ibatis.sqlmap.engine.builder.xml.BaseParser.resolveTypeHandler(BaseParser.java:66)
>       at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$15.process(SqlMapParser.java:450)
>       at 
> com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
>       

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to