Results 1 to 7 of 7
  1. #1
    yuchuang is offline Member
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    29
    Rep Power
    0

    Default What could this error be?

    Below is the error message. I'm not sure what error is this? Please help. Thank you.

    ???en.unknown - sg.gov.ncss.vcfms.db.DaoException: cause - java.sql.SQLException: Error executing 'insertTrgCrsCat' in 'sg/gov/ncss/vcfms/db/sqlmaps/VfsTrgCrsCatSQL.xml'. Check the Parameter Map (or inline parameters). Check the 'volunteerFlag' property. Cause: com.ibatis.common.beans.BeansException: There is no READABLE property named 'volunteerFlag' in class 'sg.gov.ncss.vcfms.training.beans.VfsTrgCrsCatDTO' ???

    What i'm using is struts and sql server 2000 as the DB.

  2. #2
    derrickD is offline Member
    Join Date
    Apr 2007
    Location
    USA
    Posts
    50
    Rep Power
    0

    Default

    As mentioned in a previous post to you, the ??en. usually means a mapping error. First take a look at all your mapping (xml) files.Can you include some code with this, especially your VfsTrgCrsCarSQL.xml file.

  3. #3
    peiceonly is offline Member
    Join Date
    Mar 2007
    Posts
    41
    Rep Power
    0

    Default

    Please give some attention to the "volunteerFlag" also. As derrickD it would be nice if you show us some code also

  4. #4
    yuchuang is offline Member
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    29
    Rep Power
    0

    Default

    Below is part of the codes for VfsTrgCrsCarSQL.xml.

    <result-map name="vfstrgcrscat_result" class="sg.gov.ncss.vcfms.training.beans.VfsTrgCrsC atDTO">
    <property name="volunteerFlag" column="vtcc_volunteer_flag"/>
    </result-map>

    <mapped-statement name="insertTrgCrsCat">
    INSERT INTO vfs_trg_crs_cat (vtcc_volunteer_flag)
    VALUES (#volunteerFlag#)
    </mapped-statement>

    There are other property as well but i only show the property for volunteerFlag.

  5. #5
    pegitha is offline Member
    Join Date
    Apr 2007
    Location
    Indiana
    Posts
    83
    Rep Power
    0

    Default

    So when you run the insert statement "INSERT INTO vfs_trg_crs_cat (vtcc_volunteer_flag) VALUES (#volunteerFlag#)" does the value of volunteerFlag look like a "Y" or something like that? What is the column vtcc_volunteer_flag in the database? Is it a string?
    Also, is there a really a space in the name class =sg.gov.ncss.vcfms.training.beans.VfsTrgCrsCatDTO' in your mapping or is that just an artifact of copying?

  6. #6
    yuchuang is offline Member
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    29
    Rep Power
    0

    Default

    volunteerFlag is a ddl where user will specify "yes" or "no". In the DB, the column name is called vtcc_volunteer_flag. The data type is char. The data recorded will be yes or no. In my mapping class, it is
    class =sg.gov.ncss.vcfms.training.beans.VfsTrgCrsCatDTO'
    without the space. Don't know why it just doesn't get inserted into the DB.

  7. #7
    pegitha is offline Member
    Join Date
    Apr 2007
    Location
    Indiana
    Posts
    83
    Rep Power
    0

    Default

    It is more or less a boolean then. When I have a char field in Oracle and it is a Yes/No type thing I make the field a boolean in java and in the hibernate mapping I use the org.hibernate.type.YesNoType. Here is an example of the mapping, that is Y if the person is a member and N if they are not.
    In my class it is boolean so I can say if(member).

    <property name="member" type="org.hibernate.type.YesNoType">
    <column name="MEMBER" />
    </property>

Posting Permissions

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