ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Getting error with Bean Object property not writtable at sqlmap config initial load
Date Thu, 17 Feb 2005 18:16:42 GMT
Yep, there is still no netPrefixID2 property in the bean:


<resultMap id="netwk" class="net">
       <result property="netPrefixID2" column="NetPrefixID"/>
</resultMap>

Larry


On Thu, 17 Feb 2005 13:08:27 -0500, Jason Hall <JHall@cihi.ca> wrote:
> Sorry here is the correct to xml file. The original xml file had the wrong database field
of "O1" it should have been NetPrefixID.
> 
> Now. With the correct xml file netPrefixID2 is the property of Network.java and NetPrefixID
is the column of the database.
> 
> Here is the correct xml file.  Still getting the same original error.
> 
> -----------------------
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
> 
> <sqlMap namespace="network">
> 
> <typeAlias alias="net" type="Network"/>
> 
> <resultMap id="netwk" class="net">
>         <result property="netPrefixID2" column="NetPrefixID"/>
> </resultMap>
> 
>   <select id="getNetwork"  resultClass="netwk" parameterClass="java.lang.Integer">
>     select
>          NetPrefixID
>     from NETWORK_PREFIX
>     where netPrefixID = #value#
>   </select>
> 
> </sqlMap>
> 
> -----Original Message-----
> From: Larry Meadors [mailto:larry.meadors@gmail.com]
> Sent: Thursday, February 17, 2005 1:03 PM
> To: ibatis-user-java@incubator.apache.org
> Subject: Re: Getting error with Bean Object property not writtable at
> sqlmap config initial load
> 
> setNetPrefixID == netPrefixID, not netPrefixID2
> 
> On Thu, 17 Feb 2005 12:59:14 -0500, Jason Hall <JHall@cihi.ca> wrote:
> >
> >
> >
> > I'm get this error below. What's the problem.
> >
> > Cause: com.ibatis.common.beans.ProbeException: There is no WRITEABLE
> > property named 'netPrefixID2' in class 'Network'
> >
> >
> > Network.java:
> >
> >
> > import java.io.*;
> >
> > public class Network implements Serializable {
> >         private int netPrefixID2;
> >
> >
> >         public void setNetPrefixID(int netPrefixID2)
> >         {
> >                 this.netPrefixID2 = netPrefixID2;
> >         }
> >
> >         public int getNetPrefixID()
> >         {
> >                 return netPrefixID2;
> >         }
> >
> > }
> >
> >
> >
> >
> >
> > network.xml:
> >
> > <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> > <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
> > "http://www.ibatis.com/dtd/sql-map-2.dtd">
> >
> >
> >
> > <sqlMap namespace="network">
> >
> > <typeAlias alias="net" type="Network"/>
> >
> > <resultMap id="netwk" class="net">
> >         <result property="netPrefixID2" column="O1"/>
> > </resultMap>
> >
> >   <select id="getNetwork"  resultClass="netwk"
> > parameterClass="java.lang.Integer">
> >     select
> >          O1
> >     from NETWORK_PREFIX
> >     where netPrefixID = #value#
> >   </select>
> >
> >
> > </sqlMap>
>

Mime
View raw message